Carbon Host

CLI

Carbon CLI reference and usage guide

Carbon CLI

The Carbon CLI (@carbonhost/cli) provides a command-line interface for managing your Carbon deployments and resources.

Installation

npm install -g @carbonhost/cli

Command Reference

Authentication

# Login to Carbon CLI
carbon login

The login command opens your browser to authenticate with Carbon. It will display a verification code that you should verify matches in the browser. After successful authentication, your API key will be saved locally.

Options:

  • --port, -p: Specify a custom port for the local authentication server (optional)

File Deployment

# Deploy a file to a star
carbon deploy <localPath> <starDirectory> --star <starId> [--watch]

The deploy command uploads a local file to a specified directory on your star (server).

Arguments:

  • localPath: Path to the local file you want to deploy
  • starDirectory: Target directory on the star where the file should be uploaded
  • --star, -s: The ID of the star to deploy to
  • --watch, -w: Watch for local file changes and auto-deploy (optional)

Examples:

# Deploy a single file
carbon deploy ./presets/paper-global.yml /config --star abc123
 
# Deploy and watch for changes
carbon deploy ./build/libs/PluginPortal.jar /plugins --star abc123 --watch

When using the watch flag, the CLI will monitor the specified file for changes and automatically upload new versions when detected. This is particularly useful during development.

Help

# Get general help
carbon help
 
# Get help for a specific command
carbon help <command>

The help command provides detailed information about available commands and their usage.

On this page