CLI Overview
The Sovrium CLI is the whole product surface of the self-hosted binary: it runs your app, manages its lifecycle, scaffolds and validates projects, and provisions the secrets and admin account a deployment needs.
Every invocation is a command, an optional config path, and flags. Anything else — ports, database, storage, AI — comes from the environment, never from a flag.
sovrium [command] [config] [flags]If the first positional argument looks like a config file (it ends in .json, .yaml, .yml, .ts, .mts, or contains a /), start is assumed. sovrium app.yaml and sovrium start app.yaml are the same command.
Commands
Four groups, documented on their own pages. sovrium --help prints the same list.
| Command | Group | What it does |
|---|---|---|
sovrium start [config] |
Lifecycle | Run the server (default command) |
sovrium stop |
Lifecycle | Stop the running server |
sovrium restart [config] |
Lifecycle | Stop, then relaunch in the background |
sovrium reload |
Lifecycle | Re-read the config with no downtime |
sovrium init [dir] |
Project | Scaffold a new project |
sovrium build [config] |
Project | Generate a static site |
sovrium schema |
Project | Print the JSON Schema |
sovrium validate <config> |
Project | Check a config against AppSchema |
sovrium design-system [config] |
Validation & Schema | Export the design system for an agent |
sovrium admin create <email> |
Admin & Maintenance | Provision an admin user |
sovrium secret generate |
Admin & Maintenance | Print fresh secrets as .env lines |
sovrium secret adopt |
Admin & Maintenance | Persist the encryption key in use |
sovrium update |
Admin & Maintenance | Update the binary |
sovrium --help |
Flags & Exit Codes | Print the command summary and exit |
Flags
Moved to Global Flags & Exit Codes.
Configuration Sources
Configuration is resolved in a fixed order, and the first source that answers wins:
- The config path argument —
sovrium start app.yaml. APP_SCHEMA_FILE— a path, for when a config is too large to pass inline.APP_SCHEMA— the config itself, as inline JSON, inline YAML, or anhttp(s)URL to fetch.- Nothing — the command fails with
Error: No configuration provided.
# From a file (any supported format)
sovrium start app.yaml
sovrium start config.json
sovrium start app.ts
# Inline JSON
APP_SCHEMA='{"name":"my-app"}' sovrium start
# Inline YAML
APP_SCHEMA='name: my-app' sovrium start
# Fetched over HTTP at boot
APP_SCHEMA='https://example.com/app.yaml' sovrium startSupported file extensions are .json, .yaml, .yml, .ts and .mts. The format is detected by extension, not by content, so a YAML document saved as .txt is rejected rather than sniffed.
Watch Mode
--watch (or -w) makes start watch the config file and reload the server when it changes. It is the only flag that changes how start runs.
sovrium start app.yaml --watchA bad edit never takes the server down. If the reloaded file fails to parse or fails schema validation, the reload is abandoned and the previous configuration keeps serving. Fix the file and save again to retry.
Examples
Per-command examples live with each command — see Lifecycle, Project, and Admin & Maintenance.
Exit Codes
Moved to Global Flags & Exit Codes.
Related Pages
- Configuration Files — the YAML and JSON formats the CLI reads.
- Environment Variables —
APP_SCHEMA,PORT,DATABASE_URL, and the build vars. - Troubleshooting — the startup errors these commands print.
Last updated August 28, 2026
This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.