systemprompt-cli 0.10.2

Unified CLI for systemprompt.io AI governance: agent orchestration, MCP governance, analytics, profiles, cloud deploy, and self-hosted operations.
Documentation

Production infrastructure for AI agents

Website · Documentation · Guides · Core · Template · Discord


systemprompt-cli

Crates.io Docs.rs License: BSL-1.1

Unified CLI for systemprompt.io: agent orchestration, MCP governance, analytics, profiles, cloud deployment, and self-hosted operations. Every command supports both human-friendly interactive mode and agent-friendly non-interactive mode.

Layer: Entry — application boundary. Binary: systemprompt. Library: systemprompt_cli. Part of the systemprompt-core workspace.

Overview

The CLI exposes the systemprompt.io platform 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

src/
├── lib.rs                 # Entry point: pub async fn run(), command routing
├── args.rs                # Top-level Commands enum (clap parsing)
├── bootstrap.rs           # Profile → credentials → secrets → paths → validation
├── cli_settings.rs        # CliConfig, OutputFormat, VerbosityLevel
├── descriptor.rs          # CommandDescriptor: declares initialisation needs per command
├── environment.rs         # Process environment resolution
├── interactive.rs         # Interactive menu mode
├── paths.rs               # CLI-local path helpers
├── session/               # Session lifecycle (JWT, context, persistence)
├── presentation/          # Output rendering: tables, JSON, YAML, widgets
├── routing/               # Local vs remote (SSE) command execution
├── shared/                # Cross-cutting utilities (parsers, paths, docker, profile)
│
└── commands/
    ├── mod.rs             # Domain module re-exports
    ├── admin/             # Users, agents, config, session, setup, bridge, access-control
    ├── analytics/         # Overview, conversations, agents, tools, requests,
    │                      # sessions, content, traffic, costs
    ├── build/             # Core workspace and MCP extension builds
    ├── cloud/             # Auth, init, tenant, profile, deploy, status, restart,
    │                      # sync, secrets, dockerfile, db, domain, templates
    ├── core/              # Artefacts, content, files, contexts, skills, plugins, hooks
    ├── infrastructure/    # Services, db, jobs, logs
    ├── plugins/           # List, show, run, validate, config, capabilities, mcp
    ├── web/               # Content types, templates, assets, sitemap, validate
    └── shared/            # Cross-domain command helpers

The top-level Commands enum in src/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
args.rs clap-derived Cli and Commands definitions
bootstrap.rs Initialisation sequence: profile → credentials → secrets → paths → validation
cli_settings.rs CliConfig, OutputFormat, VerbosityLevel
descriptor.rs CommandDescriptor constants (NONE, PROFILE_ONLY, FULL, etc.) declared per command
session/ JWT session tokens, active context, on-disk persistence
routing/ ExecutionTarget (local vs remote SSE streaming)
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 loaded
  • PROFILE_AND_SECRETS — profile and secrets loaded
  • FULL — profile, secrets, paths, validation, database pool

bootstrap.rs walks the descriptor and short-circuits unneeded steps.

Output System

All commands return CommandResult<T>:

CommandResult::table(data)
    .with_title("Title")
    .with_hints(json!({ "columns": [...] }))

Artefact variants: Table, List, Card, Text, CopyPasteText, Chart, Form, Dashboard. The renderer picks a representation based on --json, --yaml, or interactive TTY.

Usage

[dependencies]
systemprompt-cli = "0.9.2"
cargo install systemprompt-cli

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
systemprompt admin agents create

# Non-interactive
systemprompt --non-interactive --json admin agents create --name myagent

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

Related Documentation

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.