Installation¶
Requirements¶
Required:
- uv — Python package installer
At least one of:
- OpenCode — Open-source AI coding assistant
- Claude Code — Anthropic's VS Code extension or CLI
Recommended:
- Git — Version control (required for
/baseline --pathto properly locate repository root)
Optional:
- GitHub CLI
gh— For/issue,/pr,/ctxbranch creation - Context7 MCP — For research features via
@research-subagent
Install with uv¶
The recommended way to install ContextHarness:
Or run without installing:
Initialize in Your Project¶
Navigate to your project directory and run:
Tool Selection¶
By default, ContextHarness installs support for both OpenCode and Claude Code. You can choose a specific tool:
Creates configurations for both tools:
.opencode/— OpenCode agents and commands.claude/— Claude Code agents and commandsopencode.json— OpenCode configuration.mcp.json— Claude Code MCP configurationAGENTS.md— OpenCode memory fileCLAUDE.md— Claude Code memory file
Creates:
.opencode/agent/— Agent definitions.opencode/command/— Slash commands.opencode/skill/— Installed skillsopencode.json— Configuration fileAGENTS.md— Memory file
Folder Naming Differences
OpenCode uses singular folder names (agent/, command/, skill/), while Claude Code uses plural names (agents/, commands/, skills/).
Shared Session Storage¶
Regardless of which tool you use, sessions are stored in a shared location:
.context-harness/
├── sessions/ # Named session directories
│ └── {session-name}/
│ └── SESSION.md
├── templates/
│ └── session-template.md
└── README.md
Options¶
ch init --force # Overwrite existing files (preserves sessions and skills)
ch init --target ./path # Install in specific directory
ch init --tool opencode # Install for OpenCode only
ch init --tool claude-code # Install for Claude Code only
ch init --tool both # Install for both tools (default)
Verify Installation¶
Tip: Both
chandcontext-harnesscommands work identically. Usechfor convenience.
Next Steps¶
- Quick Start — Start your first session
- Context7 MCP Setup — Enable research features