Sequence/docs

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

bash
curl -fsSL https://raw.githubusercontent.com/Bai-Funds/algo-sdk/main/install.sh | sh

The 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

bash
sequence login

Prompts for your API key and saves it to ~/.sequence/config.toml. You only need to do this once.

Tip

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)

bash
sequence login --sandbox

Prompts 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:

  1. SEQUENCE_API_KEY env var (highest priority)
  2. api_key from ~/.sequence/config.toml

Sandbox mode (--sandbox flag):

  1. SEQUENCE_SANDBOX_API_KEY env var
  2. sandbox_api_key from ~/.sequence/config.toml
  3. Falls back to live key if it has seq_test_ prefix

Config File

toml
# ~/.sequence/config.toml
api_key = "seq_live_..."
sandbox_api_key = "seq_test_..."
api_url = "https://api.sequencemkts.com"   # optional override

Or via environment:

bash
export SEQUENCE_API_KEY="seq_live_..."
export SEQUENCE_API_URL="https://your-custom-endpoint.example.com"
Warning

The CLI enforces HTTPS. It refuses to send your API key over unencrypted HTTP.

Verify

bash
sequence list

Returns your deployed algos (or an empty list) if the key is valid.


Global Flag

All commands that hit the API accept:

bash
sequence --sandbox <command>

This routes everything through sandbox infrastructure. Sandbox and live deployments are fully isolated - same symbol, same client, different modes.


Self-Update

bash
sequence update

Downloads the latest cli/v* release from GitHub, verifies SHA-256, and atomically replaces the binary. Also installs the sim-engine companion binary if present.


Next Steps