Skip to content

CLI Commands

Quick-reference for every command available in the Astromesh CLI tools.

The daemon process. Bootstraps the runtime, starts the API server, and manages the agent lifecycle.

CommandDescription
astromeshdStart the daemon with auto-detected configuration
astromeshd --config PATHStart with an explicit configuration directory
astromeshd --port PORTOverride the API server port (default: runtime.yaml, else 8000)
astromeshd --host HOSTOverride the bind address (default: runtime.yaml, else 0.0.0.0)
astromeshd --log-level LEVELSet logging level: debug, info, warning, error (default: info)
astromeshd --pid-file PATHCustom PID file location (default: astromeshd.pid in the platform data dir, /var/lib/astromesh/ on Linux)
astromeshd --foregroundRun in foreground mode, without init-system integration
Terminal window
# Development: debug logging, default config
astromeshd --log-level debug
# Production: explicit config, custom port
astromeshd --config /etc/astromesh --port 9000
# Foreground, no init-system integration
astromeshd --foreground

For detailed daemon documentation, see Daemon (astromeshd).

The CLI client. Communicates with a running daemon via the REST API.

There are no global flags besides --help (and shell completion). The daemon address comes from the ASTROMESH_DAEMON_URL environment variable (default http://localhost:8000). JSON output is a per-command --json flag.

init, validate, config and centinela are not part of astromesh-cli itself: they are registered by the astromesh-node plugin (astromeshctl.plugins entry point), and orbit by astromesh-orbit. Install those packages to get them. astromeshctl version prints the CLI and core versions.

CommandFlagsDescription
astromeshctl status--jsonShow daemon version, uptime, mode, PID, and agent count
astromeshctl doctor--jsonRun health checks on runtime, providers, and backends
astromeshctl version—Show the astromesh-cli and astromesh core versions
CommandFlagsDescription
astromeshctl agents list--jsonList all loaded agents with model, orchestration pattern, and status
CommandFlagsDescription
astromeshctl providers list--jsonList configured providers with health status, latency, and circuit breaker state

Provided by the astromesh-node plugin.

CommandFlagsDescription
astromeshctl config validate--path PATHValidate runtime.yaml and agent YAML files without starting the daemon
astromeshctl init--role, --dev, --non-interactiveInteractive configuration wizard to generate runtime.yaml and agent templates
astromeshctl validate--path PATHValidate all project YAML configs (checks syntax, required fields, kind matching)

init flags:

FlagDescription
--roleNode role: full, gateway, worker, inference
--devForce dev mode (writes to local ./config/)
--non-interactiveAccept all defaults without prompting (for CI/scripts)

validate flags:

FlagDefaultDescription
--path./configPath to config directory to validate
CommandFlagsDescription
astromeshctl new agent <name>--provider, --model, --orchestration, --tools, --output-dir, --forceGenerate a new agent YAML configuration
astromeshctl new workflow <name>--output-dir, --forceGenerate a new workflow YAML configuration
astromeshctl new tool <name>--description, --output-dir, --forceScaffold a new custom tool Python file

new agent flags:

FlagDefaultDescription
--providerollamaLLM provider
--modelllama3.1:8bModel name
--orchestrationreactOrchestration pattern
--tools—Tools to include (repeatable)
--output-dir./config/agentsOutput directory
--forcefalseOverwrite existing file

new workflow flags:

FlagDefaultDescription
--output-dir./config/workflowsOutput directory
--forcefalseOverwrite existing file

new tool flags:

FlagDefaultDescription
--descriptionA custom toolTool description
--output-dir.Output directory
--forcefalseOverwrite existing file
CommandFlagsDescription
astromeshctl run <agent> "query"--session, --json, --timeout, --workflow, --inputExecute an agent with a query
astromeshctl dev--host, --port, --config, --no-openStart the dev server with hot-reload

run flags:

FlagDefaultDescription
--sessionauto-generated UUIDSession ID for multi-turn conversations
--jsonfalseOutput raw JSON response
--timeout60.0Request timeout in seconds
--workflowfalseRun as workflow instead of agent
--input—Workflow input data as JSON string

dev flags:

FlagDefaultDescription
--host0.0.0.0Bind host
--port8000Bind port
--config./configConfig directory
--no-openfalseSkip opening browser
CommandFlagsDescription
astromeshctl traces list <agent>--last, --jsonList recent traces for an agent
astromeshctl trace <trace_id>--jsonShow detailed trace with span tree
astromeshctl metrics--agent, --jsonShow aggregated runtime metrics
astromeshctl cost--jsonShow cost summary

traces list flags:

FlagDefaultDescription
--last10Number of recent traces to show
--jsonfalseOutput raw JSON
CommandFlagsDescription
astromeshctl tools list--jsonList all available built-in tools
astromeshctl tools test <name> '<args>'--jsonTest a tool in isolation with JSON arguments
CommandFlagsDescription
astromeshctl ask "question"--context, --dry-run, --session, --jsonAsk the built-in Astromesh Copilot

ask flags:

FlagDefaultDescription
--context—Path to a context file (must be under config/ or docs/, max 100KB)
--dry-runfalseRun in dry-run mode (no side effects)
--sessionauto-generated UUIDSession ID for multi-turn conversation
--jsonfalseOutput raw JSON
CommandFlagsDescription
astromeshctl services--jsonList services enabled on this node and their status

These commands require mesh mode to be enabled.

CommandFlagsDescription
astromeshctl peers list--jsonList known peer nodes with address, status, and last seen time
astromeshctl mesh status--jsonShow cluster overview: node count, leader, alive/suspect/dead breakdown
astromeshctl mesh nodes--jsonDetailed node table with agent assignments, active requests, CPU, and memory
astromeshctl mesh leave—Gracefully leave the cluster (notify peers)
Terminal window
# Check if the daemon is running
astromeshctl status
# Run health checks
astromeshctl doctor
# Scaffold a new agent
astromeshctl new agent my-bot --provider openai --model gpt-4o
# Scaffold a workflow and a custom tool
astromeshctl new workflow data-pipeline
astromeshctl new tool web_scraper --description "Scrape web pages"
# Start the dev server with hot-reload
astromeshctl dev
# Run an agent from the CLI
astromeshctl run support-agent "What are your business hours?"
# Run an agent and get JSON output
astromeshctl run support-agent "Hello" --json
# Validate all config files
astromeshctl validate
# View recent traces for an agent
astromeshctl traces list support-agent --last 5
# Inspect a specific trace
astromeshctl trace abc-123-def-456
# View metrics and cost
astromeshctl metrics --agent support-agent
astromeshctl cost
# List and test tools
astromeshctl tools list
astromeshctl tools test get_current_time '{}'
# Ask the copilot for help
astromeshctl ask "What pattern should I use for a research agent?"
astromeshctl ask "Is this config valid?" --context config/agents/my-bot.agent.yaml
# List agents in JSON format
astromeshctl agents list --json
# Validate config before deploying
astromeshctl config validate --path /etc/astromesh
# Connect to a remote daemon
ASTROMESH_DAEMON_URL=http://10.0.1.10:8000 astromeshctl status
# Check mesh cluster health
astromeshctl mesh status
# Generate dev config non-interactively
astromeshctl init --dev --non-interactive
# View detailed node info in mesh
astromeshctl mesh nodes --json
CodeMeaning
0Success — and also when the daemon is unreachable for the read-only commands (status, doctor, agents list, providers list, services, peers list, mesh …) and when new refuses to overwrite a file: they print the error and exit 0
1Error in run, traces list, trace, metrics, cost, tools, ask; validate and config validate when they find an error or the config directory doesn’t exist (astromesh-node v0.1.6+, so they work as a CI gate)
2Invalid arguments (Typer usage error); also centinela failures