Reflexio Docs
CLI Reference

setup

Interactive wizards for plain CLI, OpenClaw, and Claude Code integration.

reflexio setup

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 or Claude Code.

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.

reflexio setup init [--skip-llm]

Prop

Type

What it asks

Storage

Choose one of:

  • Local SQLite — local Reflexio server, no extra credentials.
  • Managed Reflexio (reflexio.ai) — prompts for a Reflexio API key and verifies via whoami.
  • Self-hosted Reflexio — prompts for server URL + 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 automatically when you choose the Managed Reflexio storage option, or 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 integration for OpenClaw. Registers the reflexio-context hook plugin, copies the Reflexio skill into ~/.openclaw/skills/reflexio, and runs the same provider / storage prompts as init.

reflexio setup openclaw [--uninstall]

Prop

Type

Prerequisites

  • openclaw CLI on your PATH (install from openclaw.ai).

Next steps after install

  1. reflexio services start
  2. openclaw gateway restart
  3. Start a conversation — Reflexio will capture and learn automatically.

reflexio setup claude-code

Install (or remove) the Reflexio integration for a Claude Code project. Copies the Reflexio skill and rules file into .claude/, then merges two hooks into .claude/settings.json:

  • SessionStart — checks if the Reflexio server is running and starts it in the background if not.
  • UserPromptSubmit — runs reflexio search on every user prompt and injects the results as context Claude sees.
reflexio setup claude-code [OPTIONS]

Prop

Type

Behavior

The wizard runs the same storage and LLM-provider prompts as init, then:

  1. Copies the skill file into .claude/skills/reflexio/SKILL.md.
  2. Copies .claude/rules/reflexio.md (always-in-context instructions).
  3. With --expert, also copies .claude/commands/reflexio-extract/SKILL.md.
  4. Sets REFLEXIO_USER_ID=claude-code in ~/.reflexio/.env.
  5. Merges the SessionStart and UserPromptSubmit hooks into .claude/settings.json, overwriting any existing Reflexio entries.

Examples

# Install normal skill in the current project
reflexio setup claude-code

# Install the expert skill in a specific project
reflexio setup claude-code --expert --project-dir ~/code/my-agent

# Remove everything
reflexio setup claude-code --uninstall

No Stop hook is installed. Conversation capture is left to the expert skill's mid-session publish or the /reflexio-extract command, so you keep control over when extraction runs.