Skip to content

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.

Terminal window
pnpm add @stendar/cli
Terminal window
stendar init

This writes stendar.config.yaml with runtime, strategy, and audit sections.

Terminal window
stendar run ./strategy.yaml --config ./stendar.config.yaml

The command streams step-level lifecycle updates and handles SIGINT with graceful pause.

Terminal window
stendar quote USDC SOL 1000000 --chain solana-mainnet
stendar balance --chain solana-mainnet --token SOL
stendar positions --chain solana-mainnet

These commands operate on in-memory executions from the same CLI process:

Terminal window
stendar status
stendar status <execution-id>
stendar resume <execution-id>
stendar stop <execution-id>

Pause behavior:

  • Press Ctrl+C in a running stendar run ... session to pause gracefully.
  • The CLI traps SIGINT, calls engine.pause(executionId), and exits cleanly.
  • stendar resume <execution-id> works only when that execution is still present in the current in-memory CLI session.
Terminal window
stendar audit verify --config ./stendar.config.yaml

This validates the hash chain written by AuditLogger.

Native local-control-plane commands are exposed under stendar local .... Common examples:

Terminal window
stendar local health
stendar local capabilities
stendar local readiness
stendar local config get
stendar local config update
stendar local policy get
stendar local policy update
stendar local policy evaluate
stendar local agent runs list
stendar local agent runs create
stendar local agent runs get <runId>
stendar local agent runs cancel <runId>
stendar local agent runs retry <runId>
stendar local agent skills
stendar local agent context-pack preview
stendar local action list
stendar local action get <actionId>
stendar local action create
stendar 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.

Terminal window
stendar mcp

This prints the MCP stdio/HTTP binaries and the execution-mode environment variables:

  • STENDAR_MCP_PLANE=runtime|control|full
  • STENDAR_LOCAL_RUNTIME_TOKEN for control and full
  • STENDAR_MCP_DIRECT_RUNTIME_TOOLS=enabled only 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.