Hubfly Hubfly CLI GitHub

Open-source terminal for Hubfly

Ship containers, tunnels, shells, and build configs from one CLI.

Hubfly CLI connects your local machine to Hubfly Dashboard and regional runtime services. Use it for authenticated project management, local image deploys, SSH tunnels, command execution, logs, and build-plan validation.

Go

single binary

API v1

dashboard compatible

Local

build and upload

hubfly deploy

$ hubfly login --token hf_...
Successfully logged in as Bonheur

$ hubfly deploy --project testing --region eu-1 --yes
Hubfly Deploy
Project      testing
Region       EUROPE
Container    api
Build        Dockerfile
Resources    1 CPU, 1024 MB RAM, 20 GB storage
Ports        http:80

Deploy build id: build_7c1c...
Local build
Image upload
Waiting for deployment
Deployment succeeded

Install

Get the binary

The installer downloads the latest release for Linux or macOS and puts the binary on your path. Windows users can download release assets from GitHub.

Linux / macOS

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

Verify

hubfly version

Build from source

git clone https://github.com/hubfly-space/hubfly-cli.git
cd hubfly-cli
go build -o hubfly .

Command map

Everything the CLI does

Commands use the dashboard API by default and can be pointed at a different API with HUBFLY_API_URL.

Authentication

Store, clear, and verify your Hubfly token.

hubfly login
hubfly login --token hf_...
hubfly logout
hubfly whoami

Projects TUI

Browse projects, containers, tunnel actions, and runtime controls.

hubfly projects
hubfly projects --org team-slug

Deploy

Build locally, stream the image to a regional service, and wait for the deployment.

hubfly deploy
hubfly deploy advanced
hubfly deploy --project api --region eu-1 --yes

Build config

Create, validate, edit, or explain hubfly.build.json.

hubfly build init
hubfly build validate --json
hubfly build edit
hubfly build explain

Runtime access

Open tunnels, SSH into a container, execute commands, or stream logs.

hubfly tunnel api 8080 80
hubfly ssh api
hubfly ssh api -- ls -la /app
hubfly exec api -- printenv
hubfly logs api --follow

Automation

Run local tunnel control as an HTTP service for desktop apps or scripts.

hubfly service
hubfly service --port 5600
hubfly update --check
hubfly update

Deploy pipeline

How a local deploy works

The CLI handles local build work. The dashboard API creates the session and the regional runtime receives the compressed image archive. Failed local builds are reported back through the authenticated CLI deploy session endpoint.

Step 1

Resolve config

Load or create build config.

Step 2

Create session

Dashboard returns build ID and upload token.

Step 3

Build image

Docker builds on your machine.

Step 4

Upload and wait

Region deploys the uploaded image.

hubfly deploy \
  --project testing \
  --region eu-1 \
  --config ./hubfly.build.json \
  --dockerfile ./Dockerfile \
  --yes

Local automation

Service mode for local tunnel control

Use service mode when another local tool needs to start, stop, or inspect Hubfly tunnels without driving the interactive TUI.

HTTP endpoints

local only

GET /health

POST /start

POST /stop

GET /status

Environment

HUBFLY_API_URL

Overrides the dashboard API host. Default: https://api.hubfly.space.

Debugging

--debug

Prints API method, URL, masked auth, and response details.

Storage

~/.hubfly

Token config, managed SSH keys, known hosts, and debug logs.

Updates

hubfly update

Checks GitHub releases and replaces the local binary.