N°06 / Ship

CLI reference

The banger CLI is the primary way to deploy and manage strategies from your terminal. It uses the same HTTP API the dashboard does, so anything you can do here you can do from the dashboard, and vice versa.

Install

uv pip install banger banger-cli

Authenticate

banger login
# Paste your API key (bk_live_...) from /settings

Stored at <user_config_dir>/banger/credentials.json with 0600 permissions on POSIX. Override the API URL with --api-url for self-hosted setups.

Or set BANGER_API_KEY directly in your env (env wins over the saved file).

Commands

banger init <name>

banger init my_strategy --venue polymarket
# → my_strategy.py scaffolded in cwd

Drops a starter file with the right imports, a Strategy subclass, a stub on_market_tick, and sensible default risk.

banger deploy <file>

banger deploy my_strategy.py --paper       # default
banger deploy my_strategy.py --live        # prompts for confirmation
banger deploy my_strategy.py --paper --name custom_name

Uploads the file as a Strategy in your account, then creates a deployment in the requested mode.

banger status

banger status               # all deployments
banger status --status running
banger status -s paused

Renders a table of your deployments with id, strategy id, mode, status, and started-at.

banger logs <deployment-id>

banger logs <id>           # follow (default)
banger logs <id> --no-follow

Streams a deployment’s logs. (SSE endpoint coming in v0.0.3 — currently stubs out.)

banger stop <deployment-id>

banger stop <id>          # confirms before stopping
banger stop <id> -y       # skip confirmation

banger whoami / banger logout

banger whoami      # print API URL + key prefix
banger logout      # clear saved credentials

Environment variables

VarDefaultPurpose
BANGER_API_URLhttps://api.banger.fiOverride for self-hosted or staging
BANGER_API_KEYBearer token. Overrides saved credentials.

See also