rkat is designed for three main workflows:
- interactive terminal use
- scripts and CI
- Unix pipes and chained command composition
Global flags
All commands accept the same realm and convention-root flags:--default-model <model> persists the default agent model into the
scope-resolved config (project/user/realm resolution included) and exits when
given without a command — rkat --default-model claude-fable-5 is the
one-liner for switching what every future run talks to. The model is
validated against the catalog and configured custom models.
By default, CLI commands use the current directory as the context root, derive a
stable workspace realm id from that path, and store realm state under
<context-root>/.rkat/realms/<realm>/. --context-root changes both the
derived workspace identity and the default project-local state root.
--state-root changes only where realm directories are stored.
Common commands
| Command | Purpose |
|---|---|
rkat <PROMPT> | Run a task directly from the terminal |
rkat run <PROMPT> | Explicit form of the default prompt command |
rkat run --resume[=<SESSION>] <PROMPT> | Continue a saved session |
rkat help <QUESTION> | Ask how to use Meerkat (embedded platform skill) |
rkat session ... | Inspect, delete, or interrupt sessions |
rkat realm ... | Inspect or manage realms |
rkat config ... | Read or update CLI/runtime config |
rkat auth ... | Log in, inspect auth profiles, test bindings, and refresh/logout credentials |
rkat blob ... | Inspect and retrieve stored blob content |
rkat mcp ... | Manage local/project MCP server config |
rkat mob ... | Pack, inspect, validate, deploy, and build mob artifacts |
rkat workgraph ... | Inspect WorkGraph items, ready work, snapshots, and events |
rkat skill ... | Manage configured skill sources and inspect available skills |
rkat models | List built-in models plus configured self-hosted aliases |
rkat capabilities | Show runtime capabilities |
rkat doctor | Check local setup, provider keys, and self-hosted server reachability |
rkat init | Create project config from the global template |
Prompt-first usage
Common run flags
-m, --model <MODEL>-o, --output <text|json|html>--json-s, --stream--no-stream--no-web-search--resume[=<SESSION>]--skill <PATH_OR_ID>repeatable-d, --max-duration <DURATION>-t, --tools <safe|workspace|full|none>--stdin <auto|blob|lines|off>--keep-alive--wait-for-mcp--mcp-auth <stored|interactive>-v, --verbose
Tool presets
rkat uses presets instead of many enable/disable booleans.
| Preset | Meaning |
|---|---|
safe | Builtins, skills, configured MCP, delegated-work-safe tools; no shell |
workspace | safe plus shell access |
full | All CLI-side capabilities, including memory and mob tools |
none | No tools |
--yolo is an alias for --tools full.
Provider and structured output controls
Use--param for common tuning and --params-json as the escape hatch:
--json is a convenience alias for --output json.
HTML output asks the agent to make the final answer a standalone local HTML artifact:
--html is a convenience alias for --output html. --browser is a compact
shortcut for HTML output plus --open-in-browser. HTML output writes the file
under the active realm’s presentation/html directory and prints the path.
Template defaults live under [presentation.html]:
--html-template <NAME> or --html-template-file <PATH>.
Config template paths are resolved relative to the active config base directory.
Streaming defaults
- In a TTY, text output streams by default.
- In pipes and scripts, streaming is off by default.
- JSON and HTML output stay non-streaming by default so stdout remains machine-friendly unless
--streamis explicitly requested.
Stdin modes and Unix pipes
rkat treats piped stdin as a first-class interface:
autodefault: if stdin is piped, read it as one blob of contextblob: always read full stdin to EOF before runninglines: keep stdin open and process one line at a timeoff: ignore stdin even if something is piped in
--line-format json treats each incoming line as JSON instead of plain text.
run —resume
SESSION_ID accepts:
- a full UUID
- a short prefix
last~N
last, so rkat run --resume "keep going" and rkat run --resume last "keep going" are equivalent.
Resume supports the same stdin model as run, plus per-turn tool overlays and provider params.
Self-hosted aliases work the same way:
session
config
--json (or --toml for set).
Examples:
models
self_hosted aliases and their server_id.
doctor
doctor checks the normalized /v1/models endpoint for each configured server and warns when configured aliases are missing from the returned model list.
For Gemma 4, prefer chat_completions in your server config unless you have validated a specific responses path for your serving stack.
Follow Self-hosting models for the full Gemma 4 examples.
mcp
rkat mcp is for local and project configuration only.
--scope on list or get to search all configured scopes.
HTTP OAuth is discovered when connecting, not stored in .rkat/mcp.toml.
Use rkat mcp login <NAME> to open the browser flow ahead of time, or
rkat run "..." --mcp-auth interactive to allow a TTY run to authenticate
when an HTTP MCP server first requires it. The default --mcp-auth stored
uses persisted tokens only.
mob
rkat mob is the artifact, typed callable run, and operational run-resource
surface. Runtime semantics still live in the shared mob runtime; the CLI only
binds to it.
Trust policy
--trust-policy strictrejects unsigned packs and unknown signers--trust-policy permissiveallows unsigned packs with warnings but still rejects invalid signatures
Web build prerequisites
The CLI does not compile wasm32 itself.--wasm is required and must point at
the prebuilt meerkat-web-runtime artifacts — either the wasm-pack --target web
output directory (which holds meerkat_web_runtime.js + meerkat_web_runtime_bg.wasm)
or that *_bg.wasm file (the sibling .js glue is copied alongside). Use the
committed sdks/web/wasm, or build it:
index.html (it includes the glue, a meerkat-bootstrap.js module, and the
mobpack).
skill
workgraph
rkat workgraph provides operator lookup plus narrow goal and attention controls for the active realm.
workgraph_* tools. The CLI exposes only the
narrow trusted goal/attention controls above; attention continuation injection
remains runtime-host owned rather than a REST-backed CLI command.
models
meerkat-models catalog (injected into meerkat-core as a ModelCatalog).
capabilities
doctor
- config readability
- common provider API keys
- MCP config loading
wasm-packavailability formob web build
init
.rkat/config.toml from the global template.