The official Cubbit CLI (Command-Line Interface) for managing your DS3 composer infrastructure.
The Cubbit CLI is a powerful command-line tool designed to provide comprehensive management capabilities for your DS3 composer environment. Built with Go and featuring an intuitive interface, it streamlines operations across your entire infrastructure stack.
- Swarm Management - Create, configure, and manage distributed swarms
- Tenant Operations - Complete tenant lifecycle management and configuration
- Infrastructure Control - Deploy and manage Nexus, Redundancy Classes, nodes, and agents
- User & Account Management - Handle tenant accounts and user administration
- Gateway Configuration - Set up and manage gateway operations
- Interactive Workflows - User-friendly guided processes for complex tasks
The CLI leverages modern Go libraries including Cobra for command structure and Bubble Tea for terminal user interfaces, supporting both automated scripting and interactive modes.
- Go 1.24.1 or higher
- Git (for source installation)
Download the latest release for your platform from our releases page.
Install directly using Go's package manager:
go install github.com/cubbit/composer-cli@latestThis will download, compile, and install the ds3-composer binary to your $GOPATH/bin directory. Make sure $GOPATH/bin is in your system's PATH.
-
Clone the repository:
git clone https://github.com/cubbit/composer-cli.git cd composer-cli -
Build the CLI:
# Build for current platform go build -o build/ds3-composer . # Cross-compile for specific platform (example for macOS) env GOOS=darwin GOARCH=amd64 go build -o build/ds3-composer .
-
Install to your PATH:
# Linux/macOS sudo cp build/ds3-composer /usr/local/bin/ # Windows: Copy build/ds3-composer.exe to a directory in your PATH
ds3-composer version-
Initialize configuration (optional - creates config file at
$HOME/.config/cubbit/config.toml):ds3-composer config init
-
Authenticate with your composer account:
ds3-composer auth login --profile <profile_name>
This will open your browser for secure authentication and automatically configure your API key.
Optional: Specify custom endpoints
You can provide custom API endpoints via a TOML file:
ds3-composer auth login --profile <profile_name> --endpoints <path/to/endpoints.toml>
Example
endpoints.toml:base = "https://api.example.com" iam = "https://iam.example.com" dash = "https://dash.example.com" ch = "https://ch.example.com"
All keys are optional. When
baseis provided, the CLI derives default URIs foriam,dash, andchby appending path suffixes. Individual endpoints (iam,dash,ch) override the derived values. -
Verify your setup:
ds3-composer config view
# Display help and available commands
ds3-composer --help
# View command structure
ds3-composer docs tree
# Manage configuration profiles
ds3-composer config [command]
# Manage tenants
ds3-composer tenant [command]
# Manage swarms
ds3-composer swarm [command]
# Manage infrastructure locations
ds3-composer infrastructure location [command]The CLI uses a profile-based configuration system stored in $HOME/.config/cubbit/config.toml (or $XDG_CONFIG_HOME/cubbit/config.toml). This allows you to manage multiple environments and accounts efficiently.
The CLI uses configuration version v2 with strict validation for configuration files.
version = "v2"
[active]
profile = "composer"
[profile.composer]
output = "human"
api_key = "<your_api_key>"
organization_id = "<your_organization_id>"
updated_at = 2025-01-01T00:00:00Z
[profile.composer.endpoints]
iam = "https://iam.eu00wi.cubbit.services"
dash = "https://dashboard.cubbit.eu/api"
ch = "https://api.eu00wi.cubbit.services/composer-hub"
[profile.dev]
output = "human"
api_key = "<your_api_key>"
organization_id = "<your_organization_id>"
updated_at = 2025-01-01T00:00:00Z
[profile.dev.endpoints]
iam = "http://localhost:8181/iam"
dash = "http://localhost:8181/api"
ch = "http://localhost:8181/composer-hub"You can specify custom API endpoints using a TOML file with the --endpoints flag during auth login:
base = "https://api.example.com"
iam = "https://iam.example.com"
dash = "https://dash.example.com"
ch = "https://ch.example.com"All keys are optional. When base is set without individual endpoints, the CLI derives defaults by appending path suffixes (/iam, /api, /composer-hub). Individual endpoints override derived values.
| Field | Profile Option | Description | Required |
|---|---|---|---|
output |
Output format | human (default) |
Yes |
api_key |
Authentication API key | - | Yes |
organization_id |
Organization identifier | - | Yes |
updated_at |
Profile last-updated timestamp | ISO 8601 | Yes |
endpoints |
API endpoint set | iam, dash, ch |
Yes |
# Switch between profiles
ds3-composer config switch-profile <profile_name>
# List available profiles
ds3-composer config profiles
# View current configuration
ds3-composer config view
# Edit configuration in $EDITOR
ds3-composer config edit
# Validate configuration
ds3-composer config validateAuthentication is handled through API keys generated via secure browser-based login or inline password-based flow.
-
Run the login command:
ds3-composer auth login --profile <profile_name>
-
Choose an authentication method when prompted:
- Browser-based: Opens your browser for device-code authentication
- Inline: Enter username, organization, and password directly
- API key: Provide an existing API key
-
For browser-based login, copy the displayed one-time device code and enter it in the browser to complete authorization.
-
The CLI will automatically update your configuration with the new API key and organization ID.
For scripting and automation, you can provide credentials via flags:
# Using username/password
ds3-composer auth login --profile <profile_name> --username <user> --organization <org> --password <pass>
# Using an API key
ds3-composer auth login --profile <profile_name> --api-key <key>
# Using environment variables
API_KEY=<key> ds3-composer auth login --profile <profile_name>Warning: Providing credentials via CLI flags may expose them in shell history and process lists. Prefer environment variables or interactive prompts.
# Logout from specific profile
ds3-composer auth logout --profile <profile_name>
# Logout from all profiles
ds3-composer auth logout --allFor complex operations and guided workflows, use interactive mode:
ds3-composer --interactiveInteractive mode provides step-by-step assistance for gateway configuration and installation processes.
The CLI provides multiple modes for automation and scripting:
- Quiet mode - Suppresses non-essential output
- Silent mode - Redirects all output to /dev/null
# Quiet mode example
ds3-composer tenant list --quiet
# Silent mode example
ds3-composer swarm deploy --silent- ✅ Cross-platform Support - Linux, macOS, Windows
- ✅ Profile-based Configuration - Manage multiple environments and accounts
- ✅ Interactive Workflows - Guided setup processes
- ✅ Automation-friendly - Scriptable with multiple output formats
- ✅ Comprehensive Documentation - Built-in help system
- ✅ Secure Authentication - Browser-based OAuth flow with device code
- Cubbit Official Documentation: docs.cubbit.io
- Command Reference: Run
ds3-composer docsfor detailed command documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: docs.cubbit.io
Please include the following information when reporting issues:
- CLI version (
ds3-composer version) - Operating system and version
- Complete error messages
- Steps to reproduce
We welcome contributions from the community! Please see our Contributing Guide for:
- Code style guidelines
- Development setup instructions
- Pull request process
- Issue reporting guidelines
This project is licensed under the MIT License. See the LICENSE file for complete details.
For a complete history of changes and new features, see CHANGELOG.md.
Need help? Check our documentation or open an issue.