Menu
CLI

reflexio setup

Interactive wizards for plain CLI and OpenClaw integration.

Interactive wizards that write credentials and provider keys to ~/.reflexio/.env and — for the integration commands — install hooks into the host tool. Use init if you just want the CLI configured; use the integration commands when you also want Reflexio wired into OpenClaw.

All setup commands are interactive — they prompt for provider choice and API keys. Use them in a real terminal, not in a CI job.


reflexio setup init

Configure Reflexio without installing any integration. Writes REFLEXIO_URL / REFLEXIO_API_KEY / LLM provider keys / storage backend to ~/.reflexio/.env. Run this if you're using the reflexio CLI directly from your shell.

Terminal
reflexio setup init [--skip-llm]
PropTypeDefaultDescription
--skip-llm?flagfalseSkip the LLM provider prompt.

What it asks

Storage

Choose one of:

  • Local SQLite - local Reflexio server, no extra credentials.
  • Local OSS with a custom URL - prompts for the OSS server URL and optional API key.

LLM provider

Pick from OpenAI, Anthropic, Gemini, DeepSeek, OpenRouter, MiniMax, DashScope, xAI, Moonshot, or ZAI. Writes the provider's API key env var (e.g. OPENAI_API_KEY) into the .env.

Skipped when --skip-llm is set.

Embedding provider

If the chosen LLM provider does not support embeddings (everything except OpenAI and Gemini), you are prompted to pick an embedding-capable provider separately.


reflexio setup openclaw

Install (or remove) the Reflexio plugin for OpenClaw. After choosing an LLM provider and storage, it builds and installs the native plugin bundled with this SDK (plugin id reflexio-openclaw-smart) with capability consent, grants the conversation-hook access OpenClaw requires for third-party plugins, points the plugin at your Reflexio URL and API key, and checks that the Gateway loads it with its hooks registered. Setup exits non-zero if that check fails.

Terminal
reflexio setup openclaw [--uninstall] [--purge] [--plugin-path PATH] [--embedding=auto|local|openai|gemini]
PropTypeDefaultDescription
--uninstall?flagfalseDisable and uninstall the plugin, remove OpenClaw server bindings from ~/.reflexio/.env (including retired names), and delete setup markers.
--purge?flagfalseWith --uninstall: also delete ~/.openclaw-smart/, the session buffers left by plugin versions before 0.2. Destructive.
--plugin-path?pathbundled SDK pluginInstall from a local plugin directory or packed .tgz instead of the bundled runtime. For plugin development.
--embedding?auto | local | openai | geminiautoEmbedding provider — local uses the in-process MiniLM, openai/gemini use their respective APIs, auto lets runtime auto-detection pick. Skips the interactive prompt.

Prerequisites

  • OpenClaw 2026.9.33 or newer with its openclaw CLI on your PATH.
  • Its supported Node runtime (24.22.1–24.x, or 26.12.1 and newer). Setup uses that runtime to build the bundled plugin; no separate npm plugin publication or compiler download is needed.

What gets configured

All in OpenClaw's own config (openclaw.json), under plugins.entries.reflexio-openclaw-smart:

  • hooks.allowConversationAccess: true — without it OpenClaw blocks the plugin's prompt and turn hooks.
  • config.url — your REFLEXIO_URL, or http://localhost:8061 for local storage.
  • config.apiKey — your REFLEXIO_API_KEY for managed or self-hosted Reflexio. It is written through stdin, never on the command line.

The plugin also retains config.search.top_k, config.search.timeout_ms and config.publish.max_content_length. These control retrieval breadth, search latency and published content size. See the plugin policy guide for defaults and cleanup of obsolete Python/embedded configuration when upgrading.

Every nonempty current user message can retrieve relevant context, including short names, identifiers and non-English requests. This can also add lookups for brief acknowledgments; empty messages and incognito sessions still skip retrieval. Plugin 0.3 retires config.search.min_prompt_length. If explicitly configured, remove it before upgrading to adopt this behavior. Setup refuses the old setting before changing the installation or settings; it does not silently discard it.

In-conversation commands

CommandWhat it does
/reflexio statusWhether Reflexio is reachable, and how many searches or publishes failed
/reflexio showPreferences and skills learned for this agent workspace
/reflexio learnPublish anything queued and ask Reflexio to extract from this session now

Next steps after install

  1. For local storage, start the backend: reflexio services start.
  2. Start a conversation, then check /reflexio status.

Extract with OpenClaw's own model (optional)

Instead of an API key, Reflexio can extract through the model OpenClaw is signed in to. Set REFLEXIO_OPENCLAW_EXECUTABLE in the Reflexio server environment to the absolute path of its OpenClaw executable. The server uses that executable to call openclaw infer model run with OpenClaw's configured model. An unset or blank binding disables this route. A configured path that cannot execute fails validation. Run an OpenClaw Gateway alongside: two embedded OpenClaw processes on one state directory contend for it.

For an upgrade, remove OPENCLAW_SMART_USE_LOCAL_CLI and OPENCLAW_BIN, including blank assignments. If extraction through OpenClaw was enabled, set the new binding to the same absolute executable. If it was disabled, leave the binding unset even if the old path was set.