Production infrastructure for AI agents
Website · Documentation · Guides · Core · Template · Discord
systemprompt-cli
One binary to run the infrastructure you own: agent orchestration, MCP governance, analytics, profiles, cloud deployment, and self-hosted operations. Every command runs two ways, an interactive mode for humans and a non-interactive mode for agents, over the same code path.
Layer: Entry — application boundary. Binary: systemprompt. Library: systemprompt_cli. Part of the systemprompt-core workspace.
Overview
The CLI exposes systemprompt.io through eight top-level domains:
| Domain | Purpose |
|---|---|
core |
Skills, content, files, contexts, plugins, hooks, artefacts |
infra |
Service lifecycle, database, jobs, log streaming |
admin |
Users, agents, configuration, session, setup wizard, bridge enrolment, access-control baseline |
cloud |
Authentication, tenants, profiles, deploy, sync, secrets, custom domains, Dockerfile, database |
analytics |
Overview, conversations, agents, tools, requests, sessions, content, traffic, costs |
web |
Content types, templates, assets, sitemap, validation |
plugins |
Extension discovery, configuration, execution, capability inspection, MCP server management |
build |
Build core workspace, build MCP extensions |
Architecture
Top-level modules. docs.rs carries the file-level detail.
src/
├── lib.rs # Entry point: pub async fn run(), command routing, output finalisation
├── descriptor.rs # CommandDescriptor: declares initialisation needs per command
├── cli_settings.rs # CliConfig, OutputFormat, VerbosityLevel
├── interactive.rs # Interactive menu mode
├── runner/ # args (clap Commands enum), bootstrap, profile routing, structured output
├── session/ # Session lifecycle (JWT, context, persistence)
├── presentation/ # Output rendering: tables, JSON, YAML, widgets
├── shared/ # Cross-cutting utilities (parsers, paths, docker, profile)
└── commands/ # One module per domain (see the domain table above)
The top-level Commands enum in src/runner/args.rs dispatches to per-domain *Commands subcommand enums declared in each commands/<domain>/mod.rs.
Core Modules
| Module | Purpose |
|---|---|
lib.rs |
pub async fn run() entry point, top-level routing, output finalisation |
runner/args.rs |
clap-derived Cli and Commands definitions |
runner/bootstrap.rs |
Initialisation sequence: profile → credentials → secrets → paths → validation |
cli_settings.rs |
CliConfig, OutputFormat, VerbosityLevel |
descriptor.rs |
CommandDescriptor constants (NONE, PROFILE_ONLY, PROFILE_AND_SECRETS, PROFILE_SECRETS_AND_PATHS, FULL) declared per command |
runner/routing/ |
ExecutionTarget (local vs remote SSE streaming) |
session/ |
JWT session tokens, active context, on-disk persistence |
presentation/ |
Format-aware renderer, render state, terminal widgets |
shared/ |
CommandResult<T>, docker utilities, value parsers, process helpers, profile/project detection |
Command Requirements
Each command variant declares a CommandDescriptor indicating what bootstrap state it needs:
NONE— standalone (no profile, no secrets, no database)PROFILE_ONLY— profile loadedPROFILE_AND_SECRETS— profile and secrets loadedPROFILE_SECRETS_AND_PATHS— profile, secrets, and resolved pathsFULL— profile, secrets, paths, validation, database pool
runner/bootstrap.rs walks the descriptor and short-circuits unneeded steps.
Output System
All commands return CommandResult<T>:
table
.with_title
.with_hints
Artefact variants: Table, List, Card, Text, CopyPasteText, Chart, Form, Dashboard. The renderer picks a representation based on --json, --yaml, or interactive TTY.
Usage
[]
= "0.21"
Dual-Mode Operation
Every command supports two modes:
| Mode | Audience | Behaviour |
|---|---|---|
| Interactive | Humans | Prompts, confirmations, coloured output |
| Non-interactive | Agents | All inputs via flags, structured output, no prompts |
# Interactive
# Non-interactive
Standard Flags
| Flag | Short | Purpose |
|---|---|---|
--yes |
-y |
Skip confirmation |
--dry-run |
Preview without executing | |
--force |
Override safety checks | |
--json |
JSON output | |
--yaml |
YAML output | |
--non-interactive |
Disable prompts | |
--quiet |
Minimal output | |
--verbose |
Detailed output |
License
BSL-1.1 (Business Source License). Source-available for evaluation, testing, and non-production use. Production use requires a commercial licence. Each version converts to Apache 2.0 four years after publication. See LICENSE.
systemprompt.io · Documentation · Guides · Live Demo · Template · crates.io · docs.rs · Discord
Entry layer · Own how your organisation uses AI.