CLI
rustiz is the server, the scheduler, the MCP server and a CLI for agents, all
in one binary. Run rustiz --help or rustiz <command> --help for the
complete, current reference.
Two modes
- Local (default). Without
--url, API commands run the same router in-process againstDATABASE_URL. No server is needed. Posts are still only published whilerustiz serve,rustiz workerorrustiz mcpis running somewhere against that database. - Remote. With
--url(orRUSTIZ_URL) andRUSTIZ_API_KEY, the CLI talks to a server over HTTP, either your own or a hosted one.
API commands print exactly one JSON document on stdout. Diagnostics go to stderr.
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 1 | Server or runtime failure |
| 2 | Bad usage or HTTP 400 |
| 3 | Authentication |
| 4 | Not found |
| 5 | Conflict: the post is being published |
Global options
| Option | Env | Default |
|---|---|---|
--config <path> | RUSTIZ_CONFIG | ~/.rustiz/config.env |
--database-url <url> | DATABASE_URL | sqlite://rustiz.db (init writes the real path) |
--url <url> | RUSTIZ_URL | unset (local mode) |
--api-key <key> | RUSTIZ_API_KEY | from the config file; never printed |
Real environment variables override the config file.
Running
| Command | Purpose |
|---|---|
rustiz init [--dir <path>] [--name <org>] | First-time setup: config file, database, first API key. Safe to rerun |
rustiz serve [--port 5000] [--host 0.0.0.0] [--no-worker] | HTTP API, MCP and the scheduler |
rustiz worker | The scheduler only |
rustiz mcp [--api-key <key>] | MCP over stdio, with the scheduler and the local OAuth callback in-process |
rustiz migrate | Apply database migrations and exit |
rustiz providers [--status] | List platforms; --status adds readiness as JSON |
rustiz org create <name> · org list · org rotate-key <id> | Organizations and keys (plain-text output). Rotating a key revokes MCP OAuth tokens |
Channels
rustiz channels list
rustiz channels connect <provider> [--open] [--fields <file|->] [--external-url <url>] \
[--name <n>] [--description <d>] [--timeout 300]
rustiz channels connect-status <connectionId>
rustiz channels delete <id>
- OAuth providers print a login URL. In local mode the CLI also serves the
platform callback on
127.0.0.1:<port of FRONTEND_URL>and waits until the account appears.--openlaunches the browser. - Credential providers take
--fields(a JSON file, or-for stdin). - Telegram, Moltbook and Farcaster print what the human must do. Finish
with
connect-status.
Posts
rustiz posts list [--start <iso>] [--end <iso>] [--customer <id>]
rustiz posts get <id>
rustiz posts create --channel <id> [--channel <id> ...] --content "<p>Hi</p>" \
[--date <iso>] [--type draft|schedule|now] [--media <path|url> ...]
rustiz posts create --json post.json # a full CreatePostDto, same as POST /public/v1/posts
rustiz posts update <id> [--content ...] [--date ...] [--publish] [--republish] [--json <file|->]
rustiz posts reschedule <id> --date <iso> [--publish] [--republish]
rustiz posts delete <id> # also deletes the other posts in its group
--type defaults to schedule, which needs --date. posts list defaults to
the window from 7 days ago to 30 days ahead.
Media, analytics and slots
rustiz media list
rustiz media upload ./shot.png # png/jpg/gif/webp/mp4/mov/webm/pdf
rustiz media upload-url https://cdn.example.com/clip.mp4
rustiz media delete <id>
rustiz analytics <channel-id> [--days 7]
rustiz notifications
rustiz find-slot <channel-id>
Using it from an agent without MCP
Any agent that can run shell commands can drive Rustiz through the CLI. The JSON output and exit codes are stable to parse:
id=$(rustiz channels list | jq -r '.[] | select(.identifier=="bluesky") | .id')
rustiz posts create --channel "$id" --content "<p>Shipped.</p>" --type now