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 embeddings)

Model pulled by install.sh:
  • nomic-embed-text — embeddings for qmd and LightRAG
No local LLM is pulled: LightRAG extraction and synthesis use OpenCode Go. A self-hosted llama.cpp server is planned for the LLM (LLAMACPP_BASE_URL slot reserved, not wired yet) and later for embeddings, which stay on ollama until then (OpenCode has no embeddings endpoint).

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 the ollama embedding model: nomic-embed-text
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)

Usage warning: Requires OPENCODE_GO_API_KEY_LIGHTRAG; without it wiki-index exits with an error before touching the index. A full build runs several LLM calls per page and can exhaust the plan’s 5-hour usage limit (limits), hence --yes. Time: not measured with OpenCode Go. Progress:
After this, the post-commit hook handles incremental updates automatically.

Step 7: Verify


Gotchas and ordering constraints


File ownership map