Skip to content

CLI reference

Install with npm install --global @banh/cli@alpha. The command is banh.

Command Purpose
banh --version / --help Version or usage.
banh validate <workflow.yaml> Parse and compile without loading a model.
banh run <workflow.yaml> --input <file> Run locally with a file.
banh run <workflow.yaml> --text <text> Run locally with a string.
Option Behavior
--json Print the result as JSON on stdout.
--verbose Print runtime events on stderr.
--model-dir <dir> Use an existing ONNX model bundle.
--cache-dir <dir> Set the model download cache.
--revision <rev> Pin a model repository revision.

A bundle contains laya.onnx, laya.onnx.data, laya_config.json, tokenizer/tokenizer.json and tokenizer/tokenizer_config.json.

Remote inference uses --provider, --model, --base-url, --model-id and --timeout-ms. See inference providers.

Early release with self-service signup while places are available. Commands target https://api.banh.dev; override with --api-url. Data commands accept --json.

Command Purpose
banh login [--no-browser] Sign in and save a local session.
banh logout Remove the local session.
banh whoami --json Show account and identity.
banh deploy <workflow.yaml> Upload a new workflow version.
banh invoke <workflow> --input <file> Run with JSON input.
banh invoke <workflow> --text <text> Run with text input.
banh runs <workflow> [--limit] [--offset] List recent runs.
banh inspect <run-id> Show a run and its decisions.
banh keys create | list | revoke <id> Manage invocation keys.
banh billing status Plan, usage and period.
banh billing checkout <starter|pro> Start a subscription.
banh billing plan <starter|pro> Upgrade now or downgrade at period end.
banh billing portal Open billing management.
banh billing cancel Stop renewal at period end.

Keys and billing changes require the account owner. See authentication, billing and limits.