CLI Reference
astromeshctl is the command-line interface for managing an Astromesh Node. It communicates with the running astromeshd daemon over HTTP (default: http://localhost:8000).
Global Flags
Section titled “Global Flags”| Flag | Default | Description |
|---|---|---|
--host | localhost | Daemon host |
--port | 8000 | Daemon port |
--json | false | Output in JSON format (all commands) |
--config | platform default | Path to config directory |
--help | — | Show help |
--version | — | Show version |
astromeshctl version
Section titled “astromeshctl version”Print version information.
astromeshctl versionOutput:
Astromesh Node v0.18.0Daemon: /opt/astromesh/bin/astromeshdCLI: /opt/astromesh/bin/astromeshctlPython: 3.12.xPlatform: linux/amd64astromeshctl init
Section titled “astromeshctl init”Interactive configuration wizard. Generates runtime.yaml, providers.yaml, and a default agent.
sudo astromeshctl init [flags]| Flag | Description |
|---|---|
--profile <name> | Pre-select a profile (full, gateway, worker, inference, minimal, rag, edge) |
--provider <name> | Pre-select a provider (ollama, openai, anthropic, groq, gemini, onnx) |
--model <name> | Pre-select a model |
--non-interactive | Skip prompts; use provided flags and defaults |
--output <dir> | Write config to a custom directory |
Example:
sudo astromeshctl init --profile worker --provider openai --model gpt-4o --non-interactiveastromeshctl status
Section titled “astromeshctl status”Display the current runtime status.
astromeshctl status [--json]Output:
┌──────────────────────────────────────┐│ Astromesh Status │├──────────────┬───────────────────────┤│ Status │ ● Running ││ Version │ 0.18.0 ││ Uptime │ 4h 12m 33s ││ Profile │ full ││ PID │ 4521 ││ Agents │ 3 loaded ││ Providers │ 2 healthy, 0 degraded ││ Memory │ 156.0 MB │└──────────────┴───────────────────────┘JSON output:
{ "status": "running", "version": "0.18.0", "uptime_seconds": 15153, "profile": "full", "pid": 4521, "agents_loaded": 3, "providers": { "healthy": 2, "degraded": 0 }, "memory_mb": 156.0}astromeshctl start
Section titled “astromeshctl start”Start the daemon service (delegates to the platform service manager).
sudo astromeshctl startastromeshctl stop
Section titled “astromeshctl stop”Stop the daemon service gracefully.
sudo astromeshctl stopastromeshctl restart
Section titled “astromeshctl restart”Restart the daemon service.
sudo astromeshctl restartastromeshctl reload
Section titled “astromeshctl reload”Reload configuration without restarting (sends SIGHUP on Linux/macOS).
sudo astromeshctl reloadastromeshctl doctor
Section titled “astromeshctl doctor”Run a full health diagnostics check.
astromeshctl doctor [--json]Output:
Astromesh Doctor━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OK Daemon Running (PID 4521)OK API Server Responding on :8000OK Provider: ollama Connected (llama3.1:8b available)OK Provider: openai Connected (gpt-4o available)OK Memory: sqlite /var/lib/astromesh/memory/conversations.dbOK Config All files valid
Result: Healthyastromeshctl logs
Section titled “astromeshctl logs”Tail the daemon logs.
astromeshctl logs [flags]| Flag | Default | Description |
|---|---|---|
--follow / -f | false | Follow log output |
--lines / -n | 50 | Number of lines to show |
--level | all | Filter by log level (debug, info, warning, error) |
Example:
astromeshctl logs -f -n 100astromeshctl logs --level errorastromeshctl agents
Section titled “astromeshctl agents”Manage agents loaded by the daemon.
astromeshctl agents list
Section titled “astromeshctl agents list”astromeshctl agents list [--json]Output:
┌──────────────┬──────────────────────────┬──────────────────┬─────────┐│ Name │ Description │ Model │ Pattern │├──────────────┼──────────────────────────┼──────────────────┼─────────┤│ default │ Default assistant │ ollama/llama3.1:8b │ react ││ researcher │ Research assistant │ openai/gpt-4o │ react ││ summarizer │ Document summarizer │ openai/gpt-4o │ pipeline│└──────────────┴──────────────────────────┴──────────────────┴─────────┘astromeshctl agents info <name>
Section titled “astromeshctl agents info <name>”astromeshctl agents info default [--json]astromeshctl agents reload
Section titled “astromeshctl agents reload”Reload all agent definitions from disk (equivalent to astromeshctl reload):
sudo astromeshctl agents reloadastromeshctl providers
Section titled “astromeshctl providers”astromeshctl providers list
Section titled “astromeshctl providers list”astromeshctl providers list [--json]Output:
┌─────────┬────────┬─────────────────────────┬──────────┐│ Name │ Type │ Endpoint │ Status │├─────────┼────────┼─────────────────────────┼──────────┤│ ollama │ ollama │ http://localhost:11434 │ ● Healthy││ openai │ openai │ https://api.openai.com │ ● Healthy│└─────────┴────────┴─────────────────────────┴──────────┘astromeshctl providers health
Section titled “astromeshctl providers health”Run health checks on all configured providers:
astromeshctl providers health [--json]astromeshctl config
Section titled “astromeshctl config”astromeshctl config validate
Section titled “astromeshctl config validate”Validate configuration files without starting the daemon:
astromeshctl config validate [--config <dir>]Output:
Validating /etc/astromesh/runtime.yaml ... OKValidating /etc/astromesh/providers.yaml ... OKValidating /etc/astromesh/agents/default.agent.yaml ... OK
All configuration files are valid.astromeshctl config show
Section titled “astromeshctl config show”Print the merged active configuration:
astromeshctl config show [--json]astromeshctl config edit
Section titled “astromeshctl config edit”Open the config directory in the system editor:
sudo astromeshctl config editastromeshctl memory
Section titled “astromeshctl memory”astromeshctl memory stats
Section titled “astromeshctl memory stats”Display memory backend usage:
astromeshctl memory stats [--json]astromeshctl memory clear <agent>
Section titled “astromeshctl memory clear <agent>”Clear conversational memory for a specific agent:
astromeshctl memory clear defaultastromeshctl memory clear --all # Clear for all agentsastromeshctl tools
Section titled “astromeshctl tools”astromeshctl tools list
Section titled “astromeshctl tools list”List all registered tools:
astromeshctl tools list [--json]JSON Output
Section titled “JSON Output”All commands support --json for scripting and automation:
astromeshctl status --json | jq '.agents_loaded'astromeshctl providers list --json | jq '.[] | select(.status == "healthy") | .name'