Hubfly spaceDocs
Console

Hubfly space CLI Quick Start

The hubfly CLI is the fastest way to deploy code, inspect projects, open private tunnels, stream logs, run shell commands, and automate Hubfly space from CI.

Deploy with your coding agent

Install the portable Hubfly space CLI skill to give Codex, Claude Code, Cursor, and other compatible agents a safe inspect, approve, deploy, and verify workflow.

Install The CLI

On Linux and macOS, install the latest release with the shell installer:

terminal

$ curl -fsSL https://raw.githubusercontent.com/hubfly-space/hubfly-cli/main/install.sh | bash
$ hubfly version

The installer downloads the right release archive from GitHub for your OS and CPU, then installs hubfly to /usr/local/bin or ~/.local/bin if the system path is not writable.

PlatformInstall PathNotes
Linuxcurl ... | bashSupports amd64 and arm64.
macOScurl ... | bashSupports Intel and Apple Silicon.
WindowsManual release downloadDownload the hubfly_windows_*.zip asset from GitHub releases and add it to PATH.
Source buildgo build -o hubfly .Use this when developing the CLI locally.

PATH check

If install succeeds but hubfly version is not found, add ~/.local/bin to your shell PATH and open a new terminal.

First Deploy

Start from an app directory that has a Dockerfile or a framework the Hubfly space builder can detect. Then log in and deploy.

1. Log in

terminal

$ hubfly login
Please authenticate to continue. Go to https://dashboard.hubfly.space/cli/auth to get the token
Enter your API token: hf_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

2. Deploy from the current folder

terminal

$ cd my-app
$ hubfly deploy

3. Use a non-interactive deploy when scripting

terminal

$ hubfly deploy --project my-api --region eu-1 --yes
$ hubfly deploy --project new --region rw-kigali-1 --yes

hubfly deploy creates or reuses hubfly.build.json, checks the latest hubfly-builder release unless you pin one, builds a local Docker image, uploads it to the target region, shows a diff, and waits for the deployment unless --detach is set.

Daily Commands

GoalCommand
Check the signed-in userhubfly whoami
Open the project/container terminal UIhubfly projects
Deploy the current apphubfly deploy
Deploy with a Dockerfilehubfly deploy --dockerfile ./deploy/Dockerfile --yes
Follow container logshubfly logs web-app --follow
Run one command in a containerhubfly exec web-app -- printenv
Open a shellhubfly ssh web-app
Forward a private databasehubfly tunnel postgres-db 5432 5432
Check for a CLI updatehubfly update --check

Use In CI

In CI, create a Dashboard personal access token and store it as a secret named HUBFLY_TOKEN. Use --yes so the deploy can run without prompts.

name: Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Hubfly space CLI
        run: curl -fsSL https://raw.githubusercontent.com/hubfly-space/hubfly-cli/main/install.sh | bash
      - name: Deploy
        env:
          HUBFLY_TOKEN: ${{ secrets.HUBFLY_TOKEN }}
        run: hubfly deploy --project my-api --region eu-1 --yes --detach

Filter every CLI command, flag, and example from one place.

Showing 19 commands
hubfly loginauth
Docs

Authenticate CLI session interactively via browser or headless personal access token.

Flags & Options

--tokenPersonal access token string for headless / non-interactive CLI authentication
$ hubfly login --token hf_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
hubfly logoutauth
Docs

Invalidate local CLI auth session and clear stored tokens from ~/.hubfly/config.json.

$ hubfly logout
hubfly whoamiauth
Docs

Display currently authenticated account user name, email, and organization binding.

$ hubfly whoami
hubfly projectstui
Docs

Launch persistent Bubble Tea terminal UI to browse projects, containers, metrics, and tunnels.

Flags & Options

--orgFilter project workspace list by organization ID or slug
$ hubfly projects --org org_prod_123
hubfly deploydeploy
Docs

Build working directory locally, upload image to regional builder, and update bound container.

Flags & Options

--project <id|name|new>Target existing project ID/name or create a new project
--region <region>Target deployment region (required for non-interactive new project deploys)
--yesSkip interactive confirmation prompts and diff confirmation
--config <path>Custom path to hubfly.build.json or project workspace directory
--detachReturn immediately after upload without waiting for container healthcheck
--dockerfile <path>Force Dockerfile mode and override default Dockerfile location
--builder-version <tag>Pin specific hubfly-builder release tag (e.g. v1.7.1)
$ hubfly deploy --project edge-api --region eu-west-1 --yes --detach
hubfly build initconfig
Docs

Initialize or refresh local hubfly.build.json configuration file with project defaults.

Flags & Options

--forceOverwrite existing build configuration file with defaults
--printPrint generated JSON structure directly to stdout
$ hubfly build init --dockerfile ./deploy/Dockerfile
hubfly build validateconfig
Docs

Verify local build configuration file and inspect build source validity before deployment.

Flags & Options

--jsonOutput structured validation response in JSON format for CI
$ hubfly build validate --json
hubfly build explainconfig
Docs

Inspect what hubfly-builder auto-detects and explain generated Dockerfile/run steps.

Flags & Options

--jsonOutput detection report as JSON
$ hubfly build explain --json
hubfly stack planstack
Docs

Inspect local Compose file and preview changes, resources, ports, and volumes.

Flags & Options

--file <path>Custom Compose file path (defaults to docker-compose.yml)
--jsonOutput machine-readable stack summary in JSON format
$ hubfly stack plan --file docker-compose.prod.yml
hubfly stack upstack
Docs

Deploy Compose stack services to Hubfly space cloud with dependency ordering and volume creation.

Flags & Options

--project <id|name|new>Target Hubfly space project for stack allocation
--region <region>Target deployment region
--yesSkip interactive prompts
--remove-orphansRemove managed containers no longer present in Compose file
--no-buildSkip local Docker builds for build-backed services
$ hubfly stack up --project ecommerce-stack --region eu-west-1 --yes
hubfly stack statusstack
Docs

Show live runtime status for all services declared in local stack state.

$ hubfly stack status
hubfly stack logsstack
Docs

Stream combined stdout and stderr logs for all or selected stack services.

Flags & Options

-f, --followContinuously tail live stack logs
$ hubfly stack logs api db -f
hubfly stack downstack
Docs

Tear down stack services in reverse dependency order.

Flags & Options

--volumesDelete associated stack persistent storage volumes
$ hubfly stack down --volumes --yes
hubfly tunneltunnels
Docs

Establish encrypted Yamux WebSocket tunnel from localhost port to private container port.

$ hubfly tunnel postgres-db 5432 5432
hubfly sshtunnels
Docs

Open interactive PTY shell session or run non-interactive command inside container.

$ hubfly ssh api-server -- ls -la /app/data
hubfly exectunnels
Docs

Execute single command with 55s timeout inside target container.

$ hubfly exec web-app -- printenv
hubfly logstunnels
Docs

Stream real-time container log output directly to local terminal.

Flags & Options

-f, --followKeep log connection open and stream new lines
$ hubfly logs web-app -f
hubfly serviceservice
Docs

Run CLI as background tunnel daemon with CORS-enabled REST API for desktop/IDE tools.

Flags & Options

--port <port>Custom HTTP port for daemon listener (default: 5600)
$ hubfly service --port 5600
hubfly updateservice
Docs

Check for new hubfly-cli GitHub releases and automatically update local binary.

Flags & Options

--checkOnly check for available updates without downloading binary
$ hubfly update --check

Config And Storage

Local CLI state lives under ~/.hubfly. CI can skip local files by setting HUBFLY_TOKEN.

  • ~/.hubfly/config.json: saved login token and profile data.
  • ~/.hubfly/tools: downloaded helper tools such as hubfly-builder.
  • ~/.hubfly/keys: generated key material for CLI connection flows.
  • ~/.hubfly/known_hosts: Hubfly space-managed SSH host keys.
  • ~/.hubfly/logs/debug.log: TUI debug output when HUBFLY_DEBUG=1 or --debug is used.

Token handling

Treat HUBFLY_TOKEN and personal access tokens as secrets. Do not commit them to source control or paste them into build logs.
Something unclear or out of date? Emailsupport@hubfly.spaceBack to top