Emend
Local OSS

setup

Interactive wizards for plain CLI and OpenClaw integration.

emend setup

Interactive wizards that write credentials and provider keys to ~/.emend/.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 Emend wired into OpenClaw.

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

emend setup init

Configure Emend without installing any integration. Writes EMEND_URL / EMEND_API_KEY / LLM provider keys / storage backend to ~/.emend/.env. Run this if you're using the emend CLI directly from your shell.

emend setup init [--skip-llm]
PropType
--skip-llmflag

What it asks

FieldDetail
StorageChoose one of: Local SQLite — local Emend server, no extra credentials. Local OSS with a custom URL — prompts for the OSS server URL and optional API key.
LLM providerPick 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 providerIf the chosen LLM provider does not support embeddings (everything except OpenAI and Gemini), you are prompted to pick an embedding-capable provider separately.

emend setup openclaw

Install (or remove) the openclaw-smart integration for OpenClaw. Registers the emend-openclaw-smart plugin into openClaw, writes the openclaw CLI path and the OPENCLAW_SMART_USE_LOCAL_CLI=1 opt-in to ~/.emend/.env, and runs the plugin's first-run installer so the next session doesn't pay a cold-install cost.

emend setup openclaw [--uninstall] [--repair] [--purge] [--embedding=auto|local|openai|gemini]
PropType
--uninstallflag
--purgeflag
--repairflag
--embeddingauto | local | openai | gemini

Prerequisites

  • openclaw CLI on your PATH (install from openclaw.ai). The setup wizard captures its absolute path and writes it to OPENCLAW_BIN so the emend backend's openclaw_provider LiteLLM plugin can spawn it for extraction.

What gets installed

  • The emend-openclaw-smart plugin into openClaw's plugin registry.
  • ~/.emend/.env keys: OPENCLAW_BIN (absolute path) and OPENCLAW_SMART_USE_LOCAL_CLI=1.
  • ~/.openclaw-smart/ state directory (sessions, install markers, logs).
  • A ~/.emend/openclaw-plugin-root symlink to the active plugin install so slash commands resolve to one stable path.

Skill commands

After install, the plugin exposes five user-invokable skills inside openClaw:

SkillWhat it does
emendAlways-on contract: trust injected context, cite with [oc:…], stay quiet
learnForce-publish the current session for immediate extraction
showPrint currently-known skills + preferences for this project as markdown
dashboardOpen the local emend web UI (http://localhost:3001)
restartRestart the local emend backend cleanly
clear-allDelete all locally-stored skills + preferences (destructive, prompts first)

Next steps after install

  • emend services start (the SessionStart hook also auto-starts the backend).
  • openclaw gateway restart.
  • Start a conversation — openclaw-smart will capture and learn automatically.