Files
Eliott van Nuffel df38148149
Some checks failed
Native Verification / Build Docs (pull_request) Successful in 1m12s
Native Verification / Build App-Service Native (pull_request) Successful in 1m27s
Native Verification / Build Daemon Native (pull_request) Successful in 42s
Lint and Test Charts / lint-test (pull_request_target) Failing after 19s
Lint and Test Charts / test-version (pull_request_target) Successful in 0s
Lint and Test Charts / push-image (pull_request_target) Failing after 15s
Lint and Test Charts / upload-cli (pull_request_target) Failing after 1m15s
Lint and Test Charts / upload-daemon (pull_request_target) Failing after 1m12s
Lint and Test Charts / push-deps (pull_request_target) Has been skipped
Lint and Test Charts / push-deps-arm64 (pull_request_target) Has been skipped
Lint and Test Charts / push-image-arm64 (pull_request_target) Has been cancelled
Lint and Test Charts / upload-package (pull_request_target) Has been cancelled
Lint and Test Charts / install-test (pull_request_target) Has been cancelled
continue beOS rebrand and add native verification
2026-03-10 13:48:45 +01:00
..
2026-03-10 08:05:41 +01:00
2026-03-09 09:05:07 +01:00

beOS Pro CLI

This directory contains the code for beos-cli, the command-line interface for administering a beOS Pro installation. It provides a modular, pipeline-based architecture for orchestrating complex system operations.

Key responsibilities include:

  • Cluster management: Installing, upgrading, restarting, and maintaining a beOS Pro cluster.
  • Node management: Adding to or removing nodes from a beOS Pro cluster.

Execution Model

For most commands, beos-cli is executed through a four-tier hierarchy:

Pipeline ➜ Module ➜ Task ➜ Action

Example: install pipeline

Pipeline: Install beOS Pro
├── ...other modules
└── Module: Bootstrap OS
    ├── ...other tasks
    ├── Task: Check Prerequisites
    │   └── Action: run-precheck.sh
    └── Task: Configure System
        └── Action: apply-sysctl

Repository layout

cli/
├── cmd/                  # Cobra command definitions
│   ├── main.go           # CLI entry point
│   └── ctl/
│       ├── root.go
│       ├── os/           # OS-level maintenance commands
│       ├── node/         # Cluster node operations
│       └── gpu/          # GPU management
└── pkg/
    ├── core/
    │   ├── action/       # Re-usable action primitives
    │   ├── module/       # Module abstractions
    │   ├── pipeline/     # Pipeline abstractions
    │   └── task/         # Task abstractions
    └── pipelines/        # Pre-built pipelines
    │   ├── ...           # actual modules and tasks for various commands and components

Build from source

Prerequisites

  • Go 1.24+
  • GoReleaser (optional, for cross-compiling and packaging)

Sample commands

# Clone the repo and enter the CLI folder
cd cli

# 1) Build for the host OS/ARCH
go build -o beos-cli ./cmd/main.go

# 2) Cross-compile for Linux amd64 (from macOS, for example)
GOOS=linux GOARCH=amd64 go build -o beos-cli ./cmd/main.go

# 3) Produce multi-platform artifacts (tar.gz, checksums, etc.)
goreleaser release --snapshot --clean

Development workflow

Add a new command

  1. Create the command file in cmd/ctl/<category>/.
  2. Define a pipeline in pkg/pipelines/.
  3. Implement modules & tasks inside the relevant pkg/ sub-packages.

Test your build

  1. Upload the self-built beos-cli binary to a machine that's running beOS Pro.
  2. Replace the existing CLI binary on the machine using sudo cp -f beos-cli /usr/local/bin.
  3. Execute arbitrary commands using beos-cli