GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cubbit/composer-cli: Cubbit DS3 Composer official CLI

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets
assets
 
 
constants
constants
 
 
docs
docs
 
 
playground
playground
 
 
requirements
requirements
 
 
src
src
 
 
utils
utils
 
 
.cz.yaml
.cz.yaml
 
 
.gitignore
.gitignore
 
 
.goreleaser.yml
.goreleaser.yml
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
package.json
package.json
 
 

Repository files navigation

Cubbit CLI

Go Version Version License

The official Cubbit CLI (Command-Line Interface) for managing your DS3 composer infrastructure.

Overview

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.

Key Capabilities

  • 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.

Installation

Prerequisites

  • Go 1.24.1 or higher
  • Git (for source installation)

Option 1: Pre-built Binaries (Recommended)

Download the latest release for your platform from our releases page.

Option 2: Go Install

Install directly using Go's package manager:

go install github.com/cubbit/composer-cli@latest

This will download, compile, and install the ds3-composer binary to your $GOPATH/bin directory. Make sure $GOPATH/bin is in your system's PATH.

Option 3: Build from Source

  1. Clone the repository:

    git clone https://github.com/cubbit/composer-cli.git
    cd composer-cli
  2. 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 .
  3. 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

Verify Installation

ds3-composer version

Quick Start

Initial Setup

  1. Initialize configuration (optional - creates config file at $HOME/.config/cubbit/config.toml):

    ds3-composer config init
  2. 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 base is provided, the CLI derives default URIs for iam, dash, and ch by appending path suffixes. Individual endpoints (iam, dash, ch) override the derived values.

  3. Verify your setup:

    ds3-composer config view

Basic Commands

# 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]

Configuration

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.

Configuration Version

The CLI uses configuration version v2 with strict validation for configuration files.

Configuration Example

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"

Endpoints Configuration

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.

Configuration Options

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

Profile Management

# 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 validate

Authentication

Authentication is handled through API keys generated via secure browser-based login or inline password-based flow.

Login Process

  1. Run the login command:

    ds3-composer auth login --profile <profile_name>
  2. 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
  3. For browser-based login, copy the displayed one-time device code and enter it in the browser to complete authorization.

  4. The CLI will automatically update your configuration with the new API key and organization ID.

Non-interactive Login

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

# Logout from specific profile
ds3-composer auth logout --profile <profile_name>

# Logout from all profiles
ds3-composer auth logout --all

Interactive Mode

For complex operations and guided workflows, use interactive mode:

ds3-composer --interactive

Interactive mode provides step-by-step assistance for gateway configuration and installation processes.

Advanced Usage

Scripting and Automation

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

Features

  • ✅ 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

Documentation

  • Cubbit Official Documentation: docs.cubbit.io
  • Command Reference: Run ds3-composer docs for detailed command documentation

Support

Getting Help

  • Issues: GitHub Issues
  • Discussions: GitHub Discussions
  • Documentation: docs.cubbit.io

Reporting Bugs

Please include the following information when reporting issues:

  • CLI version (ds3-composer version)
  • Operating system and version
  • Complete error messages
  • Steps to reproduce

Contributing

We welcome contributions from the community! Please see our Contributing Guide for:

  • Code style guidelines
  • Development setup instructions
  • Pull request process
  • Issue reporting guidelines

License

This project is licensed under the MIT License. See the LICENSE file for complete details.

Changelog

For a complete history of changes and new features, see CHANGELOG.md.


Need help? Check our documentation or open an issue.

About

Cubbit DS3 Composer official CLI

www.cubbit.io

Topics

clicubbitds3

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

10 stars

Watchers

5 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.