CLI: Install & Login
The sequence CLI manages the full lifecycle - scaffold algos, build WASM, deploy, manage bundles, run backtests, and drive the research engine.
Install
curl -fsSL https://raw.githubusercontent.com/Bai-Funds/algo-sdk/main/install.sh | shThe installer verifies the SHA-256 checksum and adds ~/.local/bin (macOS/Linux) or ~/.sequence/bin (Windows) to your PATH. Restart your terminal after installing.
Login
sequence loginPrompts for your API key and saves it to ~/.sequence/config.toml. You only need to do this once.
sequence init also prompts for your API key if none is configured - so you can skip straight to sequence init my-algo.
Sandbox (Paper Trading)
sequence login --sandboxPrompts for a seq_test_... key and saves it separately. You can have both live and sandbox keys configured at the same time.
Key Resolution Order
Live mode:
SEQUENCE_API_KEYenv var (highest priority)api_keyfrom~/.sequence/config.toml
Sandbox mode (--sandbox flag):
SEQUENCE_SANDBOX_API_KEYenv varsandbox_api_keyfrom~/.sequence/config.toml- Falls back to live key if it has
seq_test_prefix
Config File
# ~/.sequence/config.toml
api_key = "seq_live_..."
sandbox_api_key = "seq_test_..."
api_url = "https://api.sequencemkts.com" # optional overrideOr via environment:
export SEQUENCE_API_KEY="seq_live_..."
export SEQUENCE_API_URL="https://your-custom-endpoint.example.com"The CLI enforces HTTPS. It refuses to send your API key over unencrypted HTTP.
Verify
sequence listReturns your deployed algos (or an empty list) if the key is valid.
Global Flag
All commands that hit the API accept:
sequence --sandbox <command>This routes everything through sandbox infrastructure. Sandbox and live deployments are fully isolated - same symbol, same client, different modes.
Self-Update
sequence updateDownloads the latest cli/v* release from GitHub, verifies SHA-256, and atomically replaces the binary. Also installs the sim-engine companion binary if present.