/hindsight-cc:setupfrom hindsight-cc
First-run setup wizard: configure the Hindsight LLM provider and write the config file
Ships in hindsight-cc. Installing the plugin adds it to Claude Code.
Run this once on first use of the plugin (or any time you want to change the LLM provider Hindsight uses for its memory operations). It walks you through choosing a provider and model, then writes a config file that the container-startup script reads when the Hindsight server is next created.
Perform the following steps IN ORDER. This is an interactive wizard, so ask each question and wait for the answer before moving on.
Run a quick check that Docker exists and the daemon is reachable:
command -v docker && docker info >/dev/null 2>&1 && echo "docker: ok" || echo "docker: unavailable"
If Docker is missing or the daemon is down, clearly WARN the user that the plugin needs Docker to run the Hindsight server, and that they should install or start Docker before they expect memory features to work. Do NOT hard-fail: continue the wizard so the config is still written and ready for later.
Use AskUserQuestion to ask which provider Hindsight should use. Offer these
options:
Note that Ollama and LM Studio run a model locally on the user's machine; the other four are cloud providers that need an API key.
Ask which model to use, presenting a sensible default for the chosen provider. Make clear these are suggestions the user can override with any model their provider supports:
gpt-5-nanoclaude-haiku-4-5gemini-2.0-flashllama-3.3-70b-versatilellama3.1Only for Ollama and LM Studio, ask for the LLM base URL with these suggested defaults:
http://localhost:11434/v1http://localhost:1234/v1Skip this question entirely for cloud providers (OpenAI, Anthropic, Gemini, Groq).
Only for OpenAI, Anthropic, Gemini, and Groq, ask for the provider API key. Treat this value as sensitive: do NOT echo it back in plaintext in any summary or confirmation. Skip this question entirely for local providers (Ollama, LM Studio).
Write ~/.config/hindsight-cc/config.env. Do this carefully so a secret is
never exposed in shell history or a process listing any more than necessary:
First create the directory with Bash:
mkdir -p ~/.config/hindsight-cc
Write the file contents with the Write tool (NOT with echo, cat, or a
heredoc that would put the API key inline on a command line). Resolve the
path to an absolute path first (e.g. $HOME/.config/hindsight-cc/config.env).
The format is plain KEY=value, one per line, no surrounding quotes. Write
ONLY the keys that apply to the chosen provider:
HINDSIGHT_API_LLM_PROVIDER and HINDSIGHT_API_LLM_MODELHINDSIGHT_API_LLM_API_KEY only for cloud providersHINDSIGHT_API_LLM_BASE_URL only for local providersOmit any inapplicable key entirely — the parser treats an absent key as unset and falls back to the built-in default or leaves it empty.
Example for a cloud provider (OpenAI):
HINDSIGHT_API_LLM_PROVIDER=openai
HINDSIGHT_API_LLM_MODEL=gpt-5-nano
HINDSIGHT_API_LLM_API_KEY=sk-...
Example for a local provider (Ollama):
HINDSIGHT_API_LLM_PROVIDER=ollama
HINDSIGHT_API_LLM_MODEL=llama3.1
HINDSIGHT_API_LLM_BASE_URL=http://localhost:11434/v1
Tighten permissions and confirm the file was written, with Bash:
chmod 600 ~/.config/hindsight-cc/config.env && ls -l ~/.config/hindsight-cc/config.env
Show the ls -l output to confirm the file exists with 0600 permissions.
Do NOT print the file's contents (it may contain an API key).
Tell the user what happens next:
${CLAUDE_PLUGIN_ROOT}/scripts/ensure-hindsight.sh recreate
(with the LLM API key, or for a local provider the base URL, in the
environment or config.env). It keeps the old
container as hindsight-prev for rollback and rolls back automatically if the
new one does not come up healthy. Or simply start a fresh session if no
container exists yet.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
4 commands in this plugin
/memory-searchHindsight Mermory Search SkillSearch memory bank for past context and decisions relevant to current task or query/memory-statusHindsight Memory Status SkillCheck Hindsight memory server status and current project info/reflectHindsight Reflection SkillReflect on technical decisions and past context when confidence is low. Use when uncertain about implementation approaches, architectural choices, or need deeper analysis before proceeding.Other plugins' commands for the same job
npx claudepluginhub gcswan/hindsight-cc --plugin hindsight-cc