bizos-cli
v0.3.1
Published
BizOS command-line tool — a thin, secure client over the BizOS /api/cli/* API.
Readme
bizos-cli — the bizos command line
A thin, secure command-line client over the BizOS API (/api/cli/*). Run and
follow agent tasks, read and write documents, and check your credits from the
terminal — or pipe --json into scripts and agents.
Ads, leads, creatives and landing pages live in the dashboard, not here: the CLI covers the day-to-day core you would otherwise click through.
Install
npm install -g bizos-cli
# or run from source:
npm install && npm run build && node dist/index.js --helpRequires Node ≥ 18. The binary is named bizos.
Quickstart
bizos login # paste your API key (validated, then stored 0600)
bizos whoami # org, plan, credits
bizos tasks list
bizos tasks create "Draft a cold email for ACME"
bizos tasks run tsk_123 --yes # spends 1 credit
bizos tasks watch tsk_123 # follow it to completion
bizos docs list
bizos credits
bizos logoutRunning work — and following it
A task runs on a queue, so bizos tasks run usually returns while the agent is
still working:
id=$(bizos tasks create "Draft a cold email for ACME" --json | jq -r .task.id)
bizos tasks run "$id" --yes
bizos tasks watch "$id" # polls until done/cancelled/blockedbizos tasks watch exits non-zero if the task ends as anything other than
done, so it can gate a CI step. Use --interval / --timeout to tune polling.
Create an API key at app.bizos.lol → Settings → API keys.
How your key is stored & secured
- Stored via
confat~/.config/bizos/config.json(XDG). The file ischmod 0600(owner read/write only) after every write. - The key is never written to the working directory, environment echo, or logs.
- It is shown only once, masked (
bzk_live_a1b2…••••), on the login confirmation. - The HTTP client sends it as
Authorization: Bearer <key>— never in the URL/query. --verboseredacts theAuthorizationheader in its output.- Non-HTTPS base URLs are refused (except explicit
localhostfor development).
Overrides
| What | How |
|---|---|
| Base URL | --api-url https://… or BIZOS_API_URL (default https://app.bizos.lol) |
| API key (CI) | BIZOS_API_KEY (takes precedence over the stored key) |
Global flags
--json— print only machine-readable JSON (no spinner/color). Great for scripts.--api-url <url>— override the API base URL.--no-color— disable colored output.--verbose— log requests (auth header redacted).
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | generic error |
| 2 | auth required (run bizos login) |
| 3 | payment required (out of credits) |
| 4 | rate limited |
Credit-spending commands
tasks run spends 1 credit. It prompts for confirmation; pass --yes/-y
to skip. That POST is never auto-retried. On 402 the CLI prints the top-up
hint (app.bizos.lol/billing).
Use with Claude Code
The CLI is agent-friendly. Add --json to every command and Claude Code (or any
agent) gets structured output with no ANSI noise:
# Authenticate the environment without an interactive prompt (CI/agent):
export BIZOS_API_KEY="bzk_live_…"
# Read state as JSON:
bizos whoami --json
bizos tasks list --json
# Pipe into jq:
bizos tasks list --json | jq -r '.items[] | "\(.id)\t\(.status)\t\(.text)"'Tips for agents:
- Prefer
BIZOS_API_KEYoverbizos loginin non-interactive environments. - Credit-spending actions require
--yeswhen run non-interactively. - Exit codes are meaningful — branch on
2(re-auth),3(out of credits),4(back off and retry).
Commands
bizos login | logout | whoami
bizos tasks list | create <text> | run <id> [--yes] | get <id> | watch <id>
bizos docs list [--folder <id>] [--all] | get <id> | create --title <t> [--file <p> | --content <md>]
bizos credits
bizos notifications [read <id>]Run bizos <command> --help for details on any command.
