systemprompt-cli
Command-line interface for SystemPrompt operations
On this page
Command-line interface for managing SystemPrompt infrastructure, agents, content, and cloud deployments.
Overview
The CLI crate provides the systemprompt binary - a comprehensive tool for managing all aspects of your SystemPrompt deployment. It's designed to be both human-friendly and agent-executable.
Layer Position
Entry Layer
├── systemprompt-api
├── systemprompt-cli ← You are here
Depends on: All lower layers
Binary: systemprompt
Installation
# From crates.io
cargo install systemprompt-cli
# From source
cargo build --release -p systemprompt-cli
Command Structure
systemprompt <domain> <subcommand> [args]
Domains
| Domain | Purpose |
|---|---|
core |
Content, playbooks, skills, files, contexts |
infra |
Services, database, jobs, logs |
admin |
Users, agents, config, session |
cloud |
Cloud deployment, sync, profiles |
analytics |
Metrics & insights |
web |
Frontend configuration |
plugins |
MCP servers, extensions |
build |
Build MCP extensions |
Core Commands
Playbooks
# List playbooks
systemprompt core playbooks list
# Show playbook
systemprompt core playbooks show guide_start
# Raw output (for piping)
systemprompt core playbooks show guide_start --raw
Content
# List content
systemprompt core content list --source blog
# Show content
systemprompt core content show post-123
# Search content
systemprompt core content search "rust tutorial"
Infrastructure Commands
Services
# Start all services
systemprompt infra services start --all
# Start specific service
systemprompt infra services start api
# Check status
systemprompt infra services status
# Stop services
systemprompt infra services stop --all
Database
# Run migrations
systemprompt infra db migrate
# Check status
systemprompt infra db status
# Execute query
systemprompt infra db query "SELECT COUNT(*) FROM users"
# Backup database
systemprompt infra db backup --output backup.sql
Jobs
# List jobs
systemprompt infra jobs list
# Run job manually
systemprompt infra jobs run daily_cleanup
# View job history
systemprompt infra jobs history
# View job logs
systemprompt infra jobs logs daily_cleanup
Admin Commands
Agents
# List agents
systemprompt admin agents list
# Show agent
systemprompt admin agents show assistant
# Send message
systemprompt admin agents message assistant "Hello, how are you?"
# View agent tools
systemprompt admin agents tools assistant
# Restart agent
systemprompt admin agents restart assistant
Users
# List users
systemprompt admin users list
# Create user
systemprompt admin users create --email user@example.com
# Delete user
systemprompt admin users delete user-123
Config
# Show current config
systemprompt admin config show
# Validate config
systemprompt admin config validate
# Set secret
systemprompt admin config set-secret database.password "secret"
Cloud Commands
Authentication
# Login to cloud
systemprompt cloud auth login
# Logout
systemprompt cloud auth logout
# Check session
systemprompt cloud auth status
Tenants
# Create local tenant
systemprompt cloud tenant create --type local
# Create cloud tenant
systemprompt cloud tenant create --region iad
# List tenants
systemprompt cloud tenant list
Profiles
# Create profile
systemprompt cloud profile create local
# List profiles
systemprompt cloud profile list
# Switch profile
systemprompt cloud profile use production
# Show current
systemprompt cloud profile show
Sync
# Sync content to database
systemprompt cloud sync local content --direction to-db -y
# Sync from database to files
systemprompt cloud sync local content --direction to-disk -y
# Sync specific source
systemprompt cloud sync local content --direction to-db --source blog -y
Deploy
# Deploy to cloud
systemprompt cloud deploy --profile production
# Deploy with verbose output
systemprompt cloud deploy --profile production -v
Global Options
| Flag | Description |
|---|---|
-v, --verbose |
Increase output verbosity |
-q, --quiet |
Suppress non-essential output |
--profile <name> |
Use specific profile |
--json |
Output as JSON |
-h, --help |
Show help |
-V, --version |
Show version |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid arguments |
| 3 | Configuration error |
| 4 | Network error |
| 5 | Authentication error |
Related Crates
- systemprompt-api - HTTP server
- systemprompt-runtime - AppContext used by CLI
- systemprompt-config - Configuration