Skip to main content

Linux Machine Setup Guide

Authoritative step-by-step guide for bootstrapping the full AI workflow on a fresh Linux machine after cloning this repo. Written for AI agents (Claude, Codex, Gemini) to execute directly. Run steps in order — ordering constraints are load-bearing. Full AI stack covered: Claude Code · opencode · pi · headroom · Gemini CLI · wiki toolchain (qmd + LightRAG)

TL;DR — AI Agent Quickstart


Prerequisites

System packages

Node.js (via nvm)

ollama (local models)

Models pulled by install.sh:
  • nomic-embed-text — embeddings for qmd and LightRAG
  • qwen2.5:3b — local LLM fallback for wiki-mcp synthesis

Step 1: Clone repositories

Order matters. Dotfiles commits symlinks with absolute paths pointing to ~/repos/llm-wiki. Clone llm-wiki first or stow creates broken symlinks in ~/.claude/rules/.
If already inside the cloned repo: skip the first clone.

Step 2: Stow dotfiles

Each dotfiles module maps to a different AI tool’s config directory:
Verify Claude:
Verify opencode:

Step 3: Set environment variables

Add to ~/.zshrc:
Reload: source ~/.zshrc Key uses by tool:

Step 4: Install AI tools

Claude Code

Pi (council Voice B + AFK loop worker)

Pi is used as a stateless subprocess in the council workflow:

opencode

opencode is used for: TUI sessions with open models, council Voice C, warm-server pattern for headless API calls.

Gemini CLI

Gemini CLI is configured via ~/.gemini/ (stowed in Step 2). On first use, authenticate:

Wiki toolchain (uv + wiki-chat/index/mcp + git hook + ollama models)

What it does:
  1. Installs uv (Python package manager via curl)
  2. Copies wiki-chat, wiki-index, wiki-mcp~/.local/bin/
  3. Installs post-commit git hook (auto-runs qmd indexing after wiki commits)
  4. Pulls ollama models: nomic-embed-text, qwen2.5:3b
Exits 1 if ollama not found — start ollama serve first.

headroom (context compression)

Requires uv from step above:
Usage patterns:
See Headroom for deployment modes and CCR details.

Step 5: First Claude Code run — plugin installation

This triggers download of all enabled plugins from ~/.claude/settings.json: Plugin cache: ~/.claude/plugins/cache/ — downloaded fresh, not in dotfiles. The qmd CLI comes from the plugin, not npm. After this step, qmd is in PATH.

Step 6: Build wiki LightRAG index (one-time)

Cost warning: Uses Claude Haiku by default when ANTHROPIC_API_KEY is set. ~200 wiki pages costs ~0.300.30–0.80 (claimed, unverified). To use local ollama instead (free, slower):
Time: 30–60 min with Haiku; 2–4 hours with local qwen2.5:3b. Progress:
After this, the post-commit hook handles incremental updates automatically.

Step 7: Verify


Gotchas and ordering constraints


File ownership map