- macOS (ARM64/Apple Silicon recommended)
- Rust toolchain (edition 2024, rustc 1.85+) β install via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Ollama β download from the website or install via Homebrew:
brew install ollama
Paste this prompt into Claude Code:
Install CLX for me: clone https://github.com/blackaxgit/clx, build with cargo build --release, then run ./target/release/clx install. After that, pull the required Ollama models: ollama pull qwen3:1.7b && ollama pull qwen3-embedding:0.6b. Finally, tell me to restart Claude Code.
curl -fsSL https://raw.githubusercontent.com/blackaxgit/clx/main/install.sh | bashgit clone https://github.com/blackaxgit/clx.git
cd clx
cargo build --release
./target/release/clx installThen install the Ollama models:
ollama pull qwen3:1.7b
ollama pull qwen3-embedding:0.6bclx install copies all binaries to ~/.clx/bin/. Add this to your ~/.zshrc (or ~/.bashrc):
export PATH="$HOME/.clx/bin:$PATH"Then reload your shell:
source ~/.zshrcThe install command sets up everything CLX needs to work with Claude Code:
- Creates
~/.clx/directory with subdirectories for config, data, logs, rules, and prompts - Copies binaries (
clx,clx-hook,clx-mcp) to~/.clx/bin/ - Initializes SQLite database for session storage and context persistence
- Configures Claude Code hooks in
~/.claude/settings.json:PreToolUseβ validates commands before executionPostToolUseβ logs command resultsPreCompactβ snapshots context before compressionSessionStart/SessionEndβ tracks session lifecycleSubagentStartβ monitors subagent activityUserPromptSubmitβ injects context on user prompts
- Registers MCP server (
clx-mcp) so Claude can use CLX tools - Injects CLX section into
~/.claude/CLAUDE.mdwith tool documentation
- Restart Claude Code to load the new hooks and MCP server.
- Verify CLX is working:
clx dashboardThis opens an interactive dashboard showing session history, validation stats, and system status.
You should see:
- Session tracking active (new sessions appear in the dashboard)
- Ollama status: connected
- Hook status: all hooks configured
# Remove hooks and MCP config (keeps ~/.clx/ data)
clx uninstall
# Remove everything including data
clx uninstall --purgeEnsure ~/.clx/bin is in your PATH:
echo 'export PATH="$HOME/.clx/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc# Start Ollama
ollama serve
# Verify it's running
curl http://127.0.0.1:11434/ollama pull qwen3:1.7b
ollama pull qwen3-embedding:0.6bCheck that ~/.claude/settings.json contains the CLX hooks:
grep clx ~/.claude/settings.jsonIf not, re-run clx install.
CLX sets ~/.clx/ to owner-only access (700). If you see permission errors:
chmod -R u+rwX ~/.clx/