CLI
@stendar/cli ships the stendar binary.
The CLI covers DeFi strategy runtime workflows and native local control-plane operations under stendar local .... MCP control and full modes are available as additional host surfaces for the same local trust loop.
Install
Section titled “Install”pnpm add @stendar/cliInitialize config
Section titled “Initialize config”stendar initThis writes stendar.config.yaml with runtime, strategy, and audit sections.
Run a strategy
Section titled “Run a strategy”stendar run ./strategy.yaml --config ./stendar.config.yamlThe command streams step-level lifecycle updates and handles SIGINT with graceful pause.
Runtime utility commands
Section titled “Runtime utility commands”stendar quote USDC SOL 1000000 --chain solana-mainnetstendar balance --chain solana-mainnet --token SOLstendar positions --chain solana-mainnetStrategy session commands
Section titled “Strategy session commands”These commands operate on in-memory executions from the same CLI process:
stendar statusstendar status <execution-id>stendar resume <execution-id>stendar stop <execution-id>Pause behavior:
- Press
Ctrl+Cin a runningstendar run ...session to pause gracefully. - The CLI traps
SIGINT, callsengine.pause(executionId), and exits cleanly. stendar resume <execution-id>works only when that execution is still present in the current in-memory CLI session.
Audit verification
Section titled “Audit verification”stendar audit verify --config ./stendar.config.yamlThis validates the hash chain written by AuditLogger.
Control-plane commands
Section titled “Control-plane commands”Native local-control-plane commands are exposed under stendar local .... Common examples:
stendar local healthstendar local capabilitiesstendar local readiness
stendar local config getstendar local config update
stendar local policy getstendar local policy updatestendar local policy evaluate
stendar local agent runs liststendar local agent runs createstendar local agent runs get <runId>stendar local agent runs cancel <runId>stendar local agent runs retry <runId>stendar local agent skillsstendar local agent context-pack preview
stendar local action liststendar local action get <actionId>stendar local action createstendar local action dry-run <actionId>stendar local action approve <actionId>stendar local action reject <actionId>stendar local action execute <actionId>stendar local action cancel <actionId>stendar local action retry <actionId>Use these commands to inspect local runtime health, manage local config and policy state, operate agent runs and context-pack previews, and move actions through proposal, dry-run, approval/rejection, execution, cancellation, and retry. Additional local command families exist for wallets, workflows, audits, tools, modules, sandboxing, remote MCP, trust, connectors, packages, brokers, and trading; run stendar local --help and nested --help commands for the complete reference and payload options.
MCP entrypoints
Section titled “MCP entrypoints”stendar mcpThis prints the MCP stdio/HTTP binaries and the execution-mode environment variables:
STENDAR_MCP_PLANE=runtime|control|fullSTENDAR_LOCAL_RUNTIME_TOKENforcontrolandfullSTENDAR_MCP_DIRECT_RUNTIME_TOOLS=enabledonly when direct runtime execution should be exposed
For controlled agent workflows, MCP control or full mode provides another host surface for money-affecting operations to flow through action proposal, dry-run, approval, execution, and audit. Native CLI control-plane commands are also available under stendar local ....
For framework integrations, use the public LangChain and Vercel AI adapter packages.