@bytevion/cli
v0.9.3
Published
Byte — control your LLM optimization gateway from the terminal.
Readme
@bytevion/cli
Drive the Byte optimization gateway from the terminal: connect a provider, mint a Byte key, wire your coding tools, and read the savings without leaving the shell.
npm i -g --no-fund @bytevion/cli # Node 20 or newer (--no-fund silences the npm funding banner)
bytevion # interactive home menu
bytevion setup # guided setup: sign in, provider, key, toolThe binary is published as both bytevion and byte (a working alias), so any command below also runs as byte ....
Quickstart
bytevion login # approve the device in your browser
bytevion providers add --provider deepseek --api-key sk-... # or run `bytevion setup`
bytevion keys create my-key --preset lowest_latency
bytevion connect # detect installed tools and wire them in one pass
bytevion run "hello from byte"
bytevion usageIf no browser opens during bytevion login (common in a locked-down or remote shell), the CLI
prints the approval URL to open manually. You can also skip the browser entirely with
bytevion login --no-browser and paste the URL yourself.
Commands
| Command | What it does |
|---|---|
| bytevion | Interactive home menu (run with no arguments in a terminal) |
| bytevion setup (aliases init, onboard) | Guided wizard: sign in, connect provider, create key, wire a tool |
| bytevion connect | Auto-detect installed tools, wire every one that supports it, then smoke-test the gateway |
| bytevion login / logout / whoami | Device-code sign in, sign out, and identity |
| bytevion config | Show the full active profile: base URL, dashboard, org, email, active key, preset/mode |
| bytevion providers add\|list\|show\|rotate\|test\|compare\|enable\|disable | Manage upstream provider keys (bring your own key), toggle compare, and enable/disable a model by its byte alias |
| bytevion keys create\|list\|use\|rotate\|revoke | Manage Byte API keys (optional per-key --preset / --opt); use switches the active key for this terminal |
| bytevion opt show\|set\|preset | Inspect and tune optimizations |
| bytevion integrate <tool> | Wire one coding tool or SDK (--list to see all, --write to apply) |
| bytevion sync | Re-apply the current key and model to every wired tool after a rotate or model switch |
| bytevion run "<prompt>" | One-off prompt through the gateway |
| bytevion compare "<prompt>" | Run direct vs Byte and compare cost, latency, and quality |
| bytevion metrics <request-id> | Full cost, latency, and quality breakdown for one request |
| bytevion usage / bytevion stats | Usage and savings |
| bytevion dash (aliases monitor, top) | Live terminal dashboard |
| bytevion env | Print shell exports for an SDK or tool, plus the active config (--show for config only) |
| bytevion doctor | Connectivity, auth, provider, and gateway health |
| bytevion batch submit\|list\|poll | Offline, cost-optimized batch jobs |
| bytevion mcp add\|list\|remove\|test | Register and manage Byte-hosted MCP servers |
| bytevion sessions | List and revoke terminal sessions; clear-memory clears stored session memory |
Every command accepts --json for machine output and --profile <name> for multiple workspaces.
Keys
bytevion keys list shows each key's last-4 suffix, bound preset, and a Primary marker on the key
this terminal is using. To switch which key this terminal uses, re-supply its secret (it is shown
only once at create/rotate and cannot be retrieved):
bytevion keys use 12 --key byte_sk_live_... # or set $BYTE_API_KEY and run `bytevion keys use 12`Per-key optimization control: bytevion keys create edge --preset manual --opt "routing=on,prefix_cache=off"
binds layer overrides to the key. bytevion keys rotate 12 --preset maximum --sync rotates and rebinds.
Providers (presets)
bytevion providers add --provider <id> --api-key <key> infers the base URL and the gateway mode from the id.
One-click (bearer key): openai, anthropic, deepseek, gemini, xai, groq, mistral,
mistral-codestral, openrouter, together, fireworks, perplexity, cerebras, sambanova,
deepinfra, moonshot, zhipu, qwen, nebius, hyperbolic, novita, anyscale, octoai,
baseten, lambda, nvidia-nim, github-models, writer, ai21, friendli, featherless,
targon, inference-net, nscale.
Embeddings: voyage, jina. Local, no key needed: ollama, lmstudio, vllm.
Advanced (need a deployment URL or non-bearer auth): azure, bedrock, vertex, cohere,
cloudflare-workers-ai, databricks, lepton.
For anything else that speaks the OpenAI-compatible shape, use custom with --provider-base-url.
After adding a provider, bytevion providers list shows the byte alias for each connection. Use
bytevion providers enable <alias> to activate a model the gateway should route to, and
bytevion providers disable <alias> to take one out of rotation.
Tools you can wire (bytevion integrate, bytevion connect)
Byte wires dozens of coding tools, agents, and SDKs. Run bytevion integrate --list for the full
catalog and per-tool readiness. Common targets: Claude Code, Codex CLI, opencode, Cursor, Cline,
Aider, Continue, Roo Code, Windsurf, Zed, Goose, Kilo Code, Open Interpreter, Tabby, Cody, GitHub
Copilot (BYOK) and Copilot CLI, Qwen Code, Kimi CLI, Gemini CLI, Plandex, Amazon Q, JetBrains AI,
LiteLLM proxy, and the OpenAI and Anthropic SDKs.
bytevion integrate <tool> --write writes the tool's config and keeps a timestamped backup of the
prior file. bytevion connect runs this across every detected tool at once. Optimization presets are
balanced, max_savings, lowest_latency, reliability_first, and maximum (bytevion integrate
accepts all but maximum).
Environment
BYTE_TOKEN (control-plane token, for CI), BYTE_API_KEY (gateway key), BYTE_PROVIDER_KEY
(provider key for non-interactive providers add), BYTE_PROFILE, BYTE_BASE_URL, BYTE_HOME
(credential and config directory, default ~/.byte), BYTE_NO_MENU=1 (disable the home menu),
BYTE_PLAIN / BYTE_TUI (rendering), NO_COLOR, and CI.
Credentials are written to $BYTE_HOME/credentials.json with 0600 permissions. BYTE_TOKEN and
BYTE_API_KEY override the on-disk store. Set BYTE_HOME to keep separate credential stores per
machine or per workspace (for example a CI runner versus your laptop).
The npm funding banner on a global install is governed by your own npm config, not this package, so
pass npm i -g --no-fund (or set fund=false in your ~/.npmrc) to suppress it.
Exit codes
0 ok, 2 usage, 3 auth, 4 not configured, 5 offline, 6 upstream.
