Skip to content

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.

Every invocation follows the same shape — an optional global flag, a command, an optional subcommand, then flags:

Terminal window
revka [--config-dir <PATH>] <command> [subcommand] [flags]
Terminal window
revka onboard --api-key "sk-..." --provider openrouter
revka --config-dir /srv/revka daemon -p 8080
revka 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.

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.

Most subcommands operate purely on your local config and workspace and never reach the network unless the work itself requires it:

  • No daemon requiredonboard, agent, config schema, cron CRUD, 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) and revka status --format exit-code (does a GET /health against 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 to source directly from a shell init script.
  • Offline CI validation. revka self-test --quick skips 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.

--config-dir overrides the configuration directory for all commands. It is the only true global flag, and it must come before the subcommand:

Terminal window
revka --config-dir /custom/path daemon
  • Setting --config-dir also sets the REVKA_CONFIG_DIR environment 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_DIR before the call.

When you do not pass --config-dir, Revka resolves which config.toml to load through a three-level precedence chain:

  1. REVKA_WORKSPACE — if set, this workspace directory wins absolutely; the config directory is derived from it.
  2. ~/.revka/active_workspace.toml — a persisted marker file written by revka onboard that points at the selected workspace. This is why your workspace path persists between runs.
  3. 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 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:

FlagMeaning
--forceOverwrite an existing config without confirmation (and run the full wizard instead of provider-only update mode).
--reinitBack up the entire config directory with a timestamp suffix, then onboard from scratch. Cannot combine with --channels-only.
--channels-onlyRun 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.
--quickSkip interactive prompts and use quick setup with defaults.
--lang <en|ko>Wizard UI language. Overrides REVKA_LANG and $LANG.
Terminal window
revka onboard # interactive wizard in a TTY
revka onboard --quick # force quick setup
revka onboard --api-key "sk-..." --provider openrouter
revka onboard --channels-only # repair channels only
revka onboard --reinit # back up old config, start fresh

REVKA_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.

Terminal window
revka config schema # print to stdout
revka config schema > schema.json # save for tooling

The 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:

.vscode/settings.json
{
"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 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.

Before the env-override pass runs, Revka auto-loads the .env file from your active workspace (<workspace>/.env):

  1. The config file is loaded (config.toml resolved as described above).
  2. The workspace .env file, if present, is parsed line by line. Blank lines and # comments are skipped; each KEY=VALUE is set into the process environment — only if that key is not already set. Keys already present in the environment therefore take precedence over .env values.
  3. KUMIHO_SERVICE_TOKEN gets a final fallback: if it is still unset after .env loading, Revka reads it from the Kumiho CLI’s auth file at ~/.kumiho/kumiho_authentication.json (the control_plane_token field). Normal onboarding writes the token to the workspace .env, which takes precedence over this fallback.
  4. apply_env_overrides runs, layering the resulting environment over the loaded config.

A provider API key is resolved from several sources. The order is:

  1. An explicit api_key in config.toml.
  2. 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_KEY variables Revka recognizes.
  3. The generic REVKA_API_KEY (or legacy API_KEY).

For the provider env var per backend, and for OAuth/subscription providers, see revka models, providers & auth and the Provider catalog.

VariableOverridesNotes
REVKA_CONFIG_DIR--config-dir flagConfig + workspace directory. Read before config load.
REVKA_WORKSPACEworkspace_dirActive workspace directory (config dir is derived from it).
REVKA_API_KEY / API_KEYapi_keyGeneric provider API key.
REVKA_PROVIDER / PROVIDER (legacy)default_providerProvider ID. PROVIDER only wins if config still reads openrouter.
REVKA_MODEL / MODELdefault_modelModel ID.
REVKA_MODEL_PROVIDER / MODEL_PROVIDERdefault_providerCodex app-server style alias.
REVKA_TEMPERATUREdefault_temperatureFloat 0.02.0.
REVKA_GATEWAY_PORT / PORTgateway.portGateway listen port.
REVKA_GATEWAY_HOST / HOSTgateway.hostGateway bind host.
REVKA_REQUIRE_PAIRINGgateway.require_pairingBoolean.
REVKA_ALLOW_PUBLIC_BINDgateway.allow_public_bindBoolean.
REVKA_WEB_ROOTgateway.web_rootFilesystem path for dashboard assets.
REVKA_LANGlanguageWizard/UI language (en, ko).
REVKA_LOCALElocaleTool-description locale (wider set, e.g. zh-CN, ja-JP).
REVKA_EXTRA_HEADERSextra_headersFormat Name:Value,Name2:Value2.
REVKA_PROVIDER_TIMEOUT_SECSprovider HTTP timeoutInteger seconds.
RUST_LOGtracing log filtere.g. debug, info, revka=trace.
VariableEffect
REVKA_INTERACTIVE1 forces the interactive onboard wizard even without a TTY.
REVKA_AUTOSTART_CHANNELS1 starts channels immediately after onboarding completes.
VariableOverridesNotes
REVKA_OPEN_SKILLS_ENABLEDskills.open_skills_enabled1/0/true/false/yes/no/on/off.
REVKA_OPEN_SKILLS_DIRskills.open_skills_dirSkill directory path.
REVKA_SKILLS_ALLOW_SCRIPTSskills.allow_scriptsOpt in to script files in skills.
REVKA_SKILLS_PROMPT_MODEskills.prompt_injection_modefull or compact.
VariableOverridesNotes
REVKA_REASONING_ENABLED / REASONING_ENABLEDreasoning.enabledExtended-thinking toggle.
REVKA_REASONING_EFFORT / REVKA_CODEX_REASONING_EFFORTreasoning effortProvider-specific.
REVKA_WEB_SEARCH_ENABLED / WEB_SEARCH_ENABLEDweb search enableBoolean.
REVKA_WEB_SEARCH_PROVIDER / WEB_SEARCH_PROVIDERweb search providerString.
REVKA_BRAVE_API_KEY / BRAVE_API_KEYBrave Search API keyString.
REVKA_SEARXNG_INSTANCE_URL / SEARXNG_INSTANCE_URLSearXNG instanceURL.
REVKA_WEB_SEARCH_MAX_RESULTS / WEB_SEARCH_MAX_RESULTSmax resultsInteger.
REVKA_WEB_SEARCH_TIMEOUT_SECS / WEB_SEARCH_TIMEOUT_SECSsearch timeoutInteger.
VariableOverridesNotes
REVKA_STORAGE_PROVIDERstorage.providerString.
REVKA_STORAGE_DB_URLstorage.db_urlConnection URL.
REVKA_STORAGE_CONNECT_TIMEOUT_SECSstorage connect timeoutInteger.
REVKA_PROXY_ENABLEDproxy.enabledBoolean.
REVKA_HTTP_PROXY / HTTP_PROXYHTTP proxy URLURL.
REVKA_HTTPS_PROXY / HTTPS_PROXYHTTPS proxy URLURL.
REVKA_ALL_PROXY / ALL_PROXYall-traffic proxy (SOCKS5)URL.
REVKA_NO_PROXY / NO_PROXYproxy exclusionsComma-separated.
REVKA_PROXY_SCOPEproxy.scopeenvironment / revka / services.
REVKA_PROXY_SERVICESproxy servicesComma-separated service keys.
VariableOverridesNotes
REVKA_AUDIT_SIGNING_KEYaudit signing key32-byte hex (64 chars).
REVKA_WHATSAPP_APP_SECRETWhatsApp channel app secretString.
REVKA_NEXTCLOUD_TALK_WEBHOOK_SECRETNextcloud Talk webhook secretString.
VariableNotes
KUMIHO_SERVICE_TOKENKumiho auth token. Loaded from the workspace .env, or auto-injected from ~/.kumiho/kumiho_authentication.json if not already set.
KUMIHO_LOCAL_SERVER_ENDPOINTKumiho CE gRPC endpoint. Set automatically when CE (Community Edition) mode is active.
KUMIHO_UPSTASH_REDIS_URLRedis URL for Kumiho CE. Set automatically when CE mode is active.

See Kumiho graph memory and Kumiho setup for the full memory configuration.

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 (or UPSTASH_REDIS_URL) — the Redis URL for CE, defaulting to redis://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.

Terminal window
# Non-interactive bootstrap, config written under a custom directory
REVKA_CONFIG_DIR=/srv/revka \
REVKA_API_KEY="sk-..." \
REVKA_PROVIDER="openrouter" \
revka onboard --quick
# Offline validation suitable for CI
revka self-test --quick