CLI overview & environment
The revka command surface, global flags, config-dir resolution, the config schema export, and the environment-variable reference.
Revka ships as a single Rust binary, revka, that covers the entire lifecycle of a memory-native AI agent: first-run setup, interactive and single-shot agent sessions, the HTTP/WebSocket gateway and its embedded dashboard, channel integrations, scheduling, OS service management, emergency-stop safety, memory inspection, model catalog management, hardware control, and diagnostics. This page is the map of that surface — the command groups, the one global flag, how Revka finds your config directory, how to export the config schema, and the complete environment-variable reference.
Every command runs offline. A running daemon is required only for operations that talk to the gateway (for example revka pair token or revka status --format exit-code); everything else works without one. Because environment variables shadow the equivalent config.toml keys, Revka is fully scriptable in CI/CD and container deployments.
If you are starting from scratch, install the binary first (Installation), then run revka onboard and follow the Quickstart.
Command shape
Section titled “Command shape”Every invocation follows the same shape — an optional global flag, a command, an optional subcommand, then flags:
revka [--config-dir <PATH>] <command> [subcommand] [flags]revka onboard --api-key "sk-..." --provider openrouterrevka --config-dir /srv/revka daemon -p 8080revka doctor traces --event tool_call --contains "shell"Run revka --help, or revka <command> --help, for the authoritative flag list of any command on your installed version.
Command groups
Section titled “Command groups”The commands fall into a handful of functional groups. Each links to its dedicated reference page.
This page covers the three things that span all of those groups: the --config-dir flag, the revka config schema export, and the environment-variable layer. First-run setup (revka onboard) is its own page — its flag reference is summarized below and covered fully in the Onboarding wizard.
Offline-first design
Section titled “Offline-first design”Most subcommands operate purely on your local config and workspace and never reach the network unless the work itself requires it:
- No daemon required —
onboard,agent,config schema,cronCRUD,memory,estop,skills,workflows,completions,doctor, and the hardware/peripheral commands all run standalone. - Daemon required — operations that call the gateway, such as
revka pair token(exchanges a pairing code over HTTP) andrevka status --format exit-code(does aGET /healthagainst the configured gateway). - Completions are side-effect free.
revka completions <shell>writes only to stdout — it loads no config and emits no logs — so the output is safe tosourcedirectly from a shell init script. - Offline CI validation.
revka self-test --quickskips the network checks (gateway health, memory round-trip), making it suitable for air-gapped or CI environments. It exits non-zero if any test fails.
Global flag: --config-dir
Section titled “Global flag: --config-dir”--config-dir overrides the configuration directory for all commands. It is the only true global flag, and it must come before the subcommand:
revka --config-dir /custom/path daemon- Setting
--config-diralso sets theREVKA_CONFIG_DIRenvironment variable for the process, so any child process Revka spawns sees the same directory. - An empty string is rejected with an error.
- It is equivalent to exporting
REVKA_CONFIG_DIRbefore the call.
Config directory resolution
Section titled “Config directory resolution”When you do not pass --config-dir, Revka resolves which config.toml to load through a three-level precedence chain:
REVKA_WORKSPACE— if set, this workspace directory wins absolutely; the config directory is derived from it.~/.revka/active_workspace.toml— a persisted marker file written byrevka onboardthat points at the selected workspace. This is why your workspace path persists between runs.- Default —
~/.revka/config.toml.
REVKA_CONFIG_DIR (or the --config-dir flag it backs) overrides the entire config directory and is applied before the config file is loaded.
For the full set of config.toml sections and keys, see the Configuration overview.
revka onboard flag reference
Section titled “revka onboard flag reference”revka onboard is the first command you run. It auto-detects whether to run the interactive wizard or the non-interactive quick setup based on your terminal and the flags you pass. The full walkthrough lives in the Onboarding wizard page; the flags are:
| Flag | Meaning |
|---|---|
--force | Overwrite an existing config without confirmation (and run the full wizard instead of provider-only update mode). |
--reinit | Back up the entire config directory with a timestamp suffix, then onboard from scratch. Cannot combine with --channels-only. |
--channels-only | Run the fast channel-repair wizard only. Cannot combine with --api-key, --provider, --model, --memory, --force, or --quick. |
--api-key <KEY> | Provider API key. Triggers quick (scriptable) setup. |
--provider <ID> | Provider name, e.g. openrouter, anthropic, openai. Triggers quick setup. |
--model <MODEL_ID> | Model override. Triggers quick setup. |
--memory <kumiho|none> | Memory backend selection for quick setup. |
--quick | Skip interactive prompts and use quick setup with defaults. |
--lang <en|ko> | Wizard UI language. Overrides REVKA_LANG and $LANG. |
revka onboard # interactive wizard in a TTYrevka onboard --quick # force quick setuprevka onboard --api-key "sk-..." --provider openrouterrevka onboard --channels-only # repair channels onlyrevka onboard --reinit # back up old config, start freshREVKA_INTERACTIVE=1 forces the interactive wizard even without a TTY, and REVKA_AUTOSTART_CHANNELS=1 auto-launches channels on completion.
revka config schema — JSON Schema export
Section titled “revka config schema — JSON Schema export”revka config schema dumps the machine-readable JSON Schema (draft 2020-12) for the entire config.toml contract to stdout. The schema documents every available key, its type, default, and description, making it the source of truth for the config format.
revka config schema # print to stdoutrevka config schema > schema.json # save for toolingThe most common use is editor validation. Point your editor’s JSON-Schema support at the exported file to get autocompletion and inline validation while you edit config.toml. In VS Code, for example:
{ "evenBetterToml.schema.associations": { ".*/config\\.toml$": "./schema.json" }}This is a read-only, offline command — it needs no daemon and the emitted schema is independent of your config values.
Environment variables
Section titled “Environment variables”Environment variables shadow the equivalent config.toml fields without modifying the file, which makes them the natural way to configure Revka in CI/CD and containers. They are applied after the config file is loaded, in an apply_env_overrides pass.
.env loading semantics
Section titled “.env loading semantics”Before the env-override pass runs, Revka auto-loads the .env file from your active workspace (<workspace>/.env):
- The config file is loaded (
config.tomlresolved as described above). - The workspace
.envfile, if present, is parsed line by line. Blank lines and#comments are skipped; eachKEY=VALUEis set into the process environment — only if that key is not already set. Keys already present in the environment therefore take precedence over.envvalues. KUMIHO_SERVICE_TOKENgets a final fallback: if it is still unset after.envloading, Revka reads it from the Kumiho CLI’s auth file at~/.kumiho/kumiho_authentication.json(thecontrol_plane_tokenfield). Normal onboarding writes the token to the workspace.env, which takes precedence over this fallback.apply_env_overridesruns, layering the resulting environment over the loaded config.
Provider key precedence
Section titled “Provider key precedence”A provider API key is resolved from several sources. The order is:
- An explicit
api_keyinconfig.toml. - A provider-specific environment variable, e.g.
OPENROUTER_API_KEY,ANTHROPIC_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY,GROQ_API_KEY,MISTRAL_API_KEY,DEEPSEEK_API_KEY,XAI_API_KEY,MOONSHOT_API_KEY,GLM_API_KEY,ZAI_API_KEY, and the other*_API_KEYvariables Revka recognizes. - The generic
REVKA_API_KEY(or legacyAPI_KEY).
For the provider env var per backend, and for OAuth/subscription providers, see revka models, providers & auth and the Provider catalog.
Core reference
Section titled “Core reference”| Variable | Overrides | Notes |
|---|---|---|
REVKA_CONFIG_DIR | --config-dir flag | Config + workspace directory. Read before config load. |
REVKA_WORKSPACE | workspace_dir | Active workspace directory (config dir is derived from it). |
REVKA_API_KEY / API_KEY | api_key | Generic provider API key. |
REVKA_PROVIDER / PROVIDER (legacy) | default_provider | Provider ID. PROVIDER only wins if config still reads openrouter. |
REVKA_MODEL / MODEL | default_model | Model ID. |
REVKA_MODEL_PROVIDER / MODEL_PROVIDER | default_provider | Codex app-server style alias. |
REVKA_TEMPERATURE | default_temperature | Float 0.0–2.0. |
REVKA_GATEWAY_PORT / PORT | gateway.port | Gateway listen port. |
REVKA_GATEWAY_HOST / HOST | gateway.host | Gateway bind host. |
REVKA_REQUIRE_PAIRING | gateway.require_pairing | Boolean. |
REVKA_ALLOW_PUBLIC_BIND | gateway.allow_public_bind | Boolean. |
REVKA_WEB_ROOT | gateway.web_root | Filesystem path for dashboard assets. |
REVKA_LANG | language | Wizard/UI language (en, ko). |
REVKA_LOCALE | locale | Tool-description locale (wider set, e.g. zh-CN, ja-JP). |
REVKA_EXTRA_HEADERS | extra_headers | Format Name:Value,Name2:Value2. |
REVKA_PROVIDER_TIMEOUT_SECS | provider HTTP timeout | Integer seconds. |
RUST_LOG | tracing log filter | e.g. debug, info, revka=trace. |
Onboarding behaviour
Section titled “Onboarding behaviour”| Variable | Effect |
|---|---|
REVKA_INTERACTIVE | 1 forces the interactive onboard wizard even without a TTY. |
REVKA_AUTOSTART_CHANNELS | 1 starts channels immediately after onboarding completes. |
Skills
Section titled “Skills”| Variable | Overrides | Notes |
|---|---|---|
REVKA_OPEN_SKILLS_ENABLED | skills.open_skills_enabled | 1/0/true/false/yes/no/on/off. |
REVKA_OPEN_SKILLS_DIR | skills.open_skills_dir | Skill directory path. |
REVKA_SKILLS_ALLOW_SCRIPTS | skills.allow_scripts | Opt in to script files in skills. |
REVKA_SKILLS_PROMPT_MODE | skills.prompt_injection_mode | full or compact. |
Reasoning & web search
Section titled “Reasoning & web search”| Variable | Overrides | Notes |
|---|---|---|
REVKA_REASONING_ENABLED / REASONING_ENABLED | reasoning.enabled | Extended-thinking toggle. |
REVKA_REASONING_EFFORT / REVKA_CODEX_REASONING_EFFORT | reasoning effort | Provider-specific. |
REVKA_WEB_SEARCH_ENABLED / WEB_SEARCH_ENABLED | web search enable | Boolean. |
REVKA_WEB_SEARCH_PROVIDER / WEB_SEARCH_PROVIDER | web search provider | String. |
REVKA_BRAVE_API_KEY / BRAVE_API_KEY | Brave Search API key | String. |
REVKA_SEARXNG_INSTANCE_URL / SEARXNG_INSTANCE_URL | SearXNG instance | URL. |
REVKA_WEB_SEARCH_MAX_RESULTS / WEB_SEARCH_MAX_RESULTS | max results | Integer. |
REVKA_WEB_SEARCH_TIMEOUT_SECS / WEB_SEARCH_TIMEOUT_SECS | search timeout | Integer. |
Storage & proxy
Section titled “Storage & proxy”| Variable | Overrides | Notes |
|---|---|---|
REVKA_STORAGE_PROVIDER | storage.provider | String. |
REVKA_STORAGE_DB_URL | storage.db_url | Connection URL. |
REVKA_STORAGE_CONNECT_TIMEOUT_SECS | storage connect timeout | Integer. |
REVKA_PROXY_ENABLED | proxy.enabled | Boolean. |
REVKA_HTTP_PROXY / HTTP_PROXY | HTTP proxy URL | URL. |
REVKA_HTTPS_PROXY / HTTPS_PROXY | HTTPS proxy URL | URL. |
REVKA_ALL_PROXY / ALL_PROXY | all-traffic proxy (SOCKS5) | URL. |
REVKA_NO_PROXY / NO_PROXY | proxy exclusions | Comma-separated. |
REVKA_PROXY_SCOPE | proxy.scope | environment / revka / services. |
REVKA_PROXY_SERVICES | proxy services | Comma-separated service keys. |
Security & channel secrets
Section titled “Security & channel secrets”| Variable | Overrides | Notes |
|---|---|---|
REVKA_AUDIT_SIGNING_KEY | audit signing key | 32-byte hex (64 chars). |
REVKA_WHATSAPP_APP_SECRET | WhatsApp channel app secret | String. |
REVKA_NEXTCLOUD_TALK_WEBHOOK_SECRET | Nextcloud Talk webhook secret | String. |
Kumiho graph memory
Section titled “Kumiho graph memory”| Variable | Notes |
|---|---|
KUMIHO_SERVICE_TOKEN | Kumiho auth token. Loaded from the workspace .env, or auto-injected from ~/.kumiho/kumiho_authentication.json if not already set. |
KUMIHO_LOCAL_SERVER_ENDPOINT | Kumiho CE gRPC endpoint. Set automatically when CE (Community Edition) mode is active. |
KUMIHO_UPSTASH_REDIS_URL | Redis URL for Kumiho CE. Set automatically when CE mode is active. |
See Kumiho graph memory and Kumiho setup for the full memory configuration.
CE mode auto-injection (KUMIHO_*)
Section titled “CE mode auto-injection (KUMIHO_*)”When [kumiho].mode = "local_ce" (self-hosted Community Edition), Revka points api_url at the CE default http://127.0.0.1:9190 and auto-injects the CE endpoint environment for the Kumiho MCP client, so you do not have to wire it up by hand:
KUMIHO_LOCAL_SERVER_ENDPOINT— set to the CE server endpoint.KUMIHO_UPSTASH_REDIS_URL(orUPSTASH_REDIS_URL) — the Redis URL for CE, defaulting toredis://127.0.0.1:6379.
CE mode is tokenless, loopback-only, and single-user. The token precedence for the MCP client is KUMIHO_SERVICE_TOKEN over KUMIHO_AUTH_TOKEN — the service token (written by Revka onboarding) is read first, falling back to KUMIHO_AUTH_TOKEN. revka doctor probes the CE health endpoints (/api/_live, /api/_health) to confirm Neo4j, the event stream, and embeddings are reachable. See Kumiho setup for starting and validating a CE backend.
Examples
Section titled “Examples”# Non-interactive bootstrap, config written under a custom directoryREVKA_CONFIG_DIR=/srv/revka \REVKA_API_KEY="sk-..." \REVKA_PROVIDER="openrouter" \ revka onboard --quick
# Offline validation suitable for CIrevka self-test --quickREVKA_GATEWAY_HOST=0.0.0.0 \REVKA_GATEWAY_PORT=8080 \REVKA_ALLOW_PUBLIC_BIND=true \ revka daemon
# Lightweight health probe (Docker HEALTHCHECK)revka status --format exit-codeRUST_LOG=revka=debug revka daemonrevka --config-dir /srv/revka doctor