⭐ This is an enhanced fork of ericbuess/claude-code-docs
Built on Eric Buess's excellent foundation, this fork adds Python-powered search, validation, and auto-regeneration features while maintaining graceful degradation - everything works with or without Python.
For the original, simpler implementation: ericbuess/claude-code-docs
Fast, searchable access to Claude Code documentation - locally, always up-to-date.
Stop hunting through scattered docs. This tool provides instant access to 270 actively maintained Claude documentation paths covering API references, guides, examples, and changelogs.
- 🤖 AI-Powered Search - Ask questions naturally, Claude understands intent and routes intelligently
- 📚 Complete Coverage - 270 active documentation paths, 268 files (~99% coverage)
- 🔍 Semantic Understanding - No primitive keyword matching, leverages Claude's language understanding
- ✅ Auto-Validated - Continuous validation detects broken links automatically
- 🔄 Always Fresh - Auto-updates every 3 hours from official sources
- 🎯 Graceful Degradation - Works with or without Python
- 🧪 Well-Tested - 600 tests (99.7% pass rate), 78% coverage
Documentation Files (268 total):
- Core Documentation (79 paths, 29%) - Guides, tutorials, best practices
- API Reference (78 paths, 29%) - Complete API docs, Admin API, Agent SDK
- Prompt Library (65 paths, 24%) - Ready-to-use prompt templates
- Claude Code (44 paths, 16%) - CLI-specific docs, hooks, skills, MCP
- Release Notes (2 paths) - Version history
- Resources (1 path) - Additional resources
- Uncategorized (1 path) - Home page
Python Features (optional, requires Python 3.9+):
- Full-text search across all content
- Fuzzy path matching
- HTTP validation
- Auto-regeneration of manifests
One command:
curl -fsSL https://raw.githubusercontent.com/costiash/claude-code-docs/main/install.sh | bashWhat it does:
- Clones repository to
~/.claude-code-docs - Installs 268 documentation files
- Sets up
/docscommand in Claude Code - Enables auto-updates
Python features activate automatically if Python 3.9+ is installed.
Method 1: Direct Install (interactive)
curl -fsSL https://raw.githubusercontent.com/costiash/claude-code-docs/main/install.sh | bashWorks on: Local terminals, iTerm2, Terminal.app, SSH with -t flag
Method 2: Auto-Install (CI/CD-friendly)
CLAUDE_DOCS_AUTO_INSTALL=yes curl -fsSL https://raw.githubusercontent.com/costiash/claude-code-docs/main/install.sh | bashWorks on: All environments including GitHub Actions, Docker, cron jobs, SSH without -t
Method 3: Download First (most reliable)
curl -fsSL https://raw.githubusercontent.com/costiash/claude-code-docs/main/install.sh -o install.sh
bash install.shWorks on: All interactive shells
- Required: macOS 12+ or Linux (Ubuntu, Debian, Fedora, etc.)
- Required: git, jq, curl (usually pre-installed)
- Optional: Python 3.9+ (enables search/validation features)
Quick access (no freshness check):
/docs hooks # Read hooks documentation instantly
/docs mcp # Read MCP documentation
/docs memory # Read memory featuresWith freshness check:
/docs -t # Check sync status with GitHub
/docs -t hooks # Check sync, then read hooks docsSpecial commands:
/docs what's new # Show recent documentation changes with diffs
/docs changelog # Read official Claude Code release notes
/docs uninstall # Get uninstall commandThe /docs command is AI-powered - it leverages Claude's semantic understanding instead of primitive keyword matching. Ask questions naturally and Claude will intelligently route to the appropriate search functions.
How it works:
- Claude analyzes your request semantically
- Determines if you want direct documentation, content search, or path discovery
- Routes to appropriate helper functions automatically
- Presents results naturally with context
Examples:
# Complex semantic queries
/docs what are the best practices and recommended workflows using Claude Agent SDK in Python according to the official documentation?
→ Claude extracts: "best practices workflows Agent SDK Python"
→ Executes content search automatically
→ Returns relevant documentation with natural explanations
# Questions about features
/docs what environment variables exist and how do I use them?
→ Claude searches documentation content
→ Provides answer with documentation links
# Comparative questions
/docs explain the differences between hooks and MCP
→ Claude searches for both topics
→ Compares and explains naturally
# Discovery queries
/docs show me everything about memory features
→ Claude finds memory-related documentation
→ Lists and summarizes available docs
# Topic-specific searches
/docs find all mentions of authentication
→ Claude performs content search
→ Returns matching documentation sections
# Combined workflows
/docs -t what's new with extended thinking and how does it work?
→ Claude checks for updates
→ Searches for extended thinking documentation
→ Combines recent changes with explanationBehind the scenes: When Python 3.9+ is available, the AI routes to:
--search-contentfor semantic information searches--searchfor path discovery- Direct lookups for specific topics
Without Python 3.9+: The AI gracefully explains limitations and suggests available alternatives.
For power users who want direct access to helper functions:
# Fuzzy search across 270 paths (requires Python 3.9+)
~/.claude-code-docs/claude-docs-helper.sh --search "keyword"
# Full-text content search (requires Python 3.9+)
~/.claude-code-docs/claude-docs-helper.sh --search-content "term"
# Validate all paths - check for 404s (requires Python 3.9+)
~/.claude-code-docs/claude-docs-helper.sh --validate
# Show installation status and available features
~/.claude-code-docs/claude-docs-helper.sh --status
# Show all commands
~/.claude-code-docs/claude-docs-helper.sh --helpNote: Most users should use the AI-powered /docs command instead of calling these directly. The AI provides better results through semantic understanding and intelligent routing.
Single Installation - Always installs complete repository:
- 268 documentation files (.md format)
- 7 Python scripts for enhanced features
- 270 active paths tracked in manifest
- Full test suite (600 tests)
Graceful Degradation - Features adapt to environment:
- Without Python: Basic documentation reading via
/docscommand - With Python 3.9+: Full-text search, fuzzy matching, validation, auto-regeneration
No separate "modes" - Everything is installed once, features activate when Python is available.
Documentation stays current through:
- Automated Updates - GitHub Actions fetches new docs every 3 hours
- Pre-Command Check -
/docschecks for GitHub updates automatically - Auto-Regeneration - Manifests regenerate from sitemaps on each fetch
- Visual Feedback - See "🔄 Updating documentation..." when updates occur
Manual update:
cd ~/.claude-code-docs && git pullForce reinstall:
curl -fsSL https://raw.githubusercontent.com/costiash/claude-code-docs/main/install.sh | bashProblem: /docs returns "command not found"
Solution:
- Check:
ls ~/.claude/commands/docs.md - Restart Claude Code
- Re-run installer if needed
"Installation cancelled" when using curl | bash:
The installer needs to read your response, but stdin is consumed by the pipe in some environments.
Solutions:
- Auto-install:
CLAUDE_DOCS_AUTO_INSTALL=yes curl ... | bash - Download first:
curl ... -o install.sh && bash install.sh - SSH with
-t:ssh -t user@server 'curl ... | bash'
"Running in non-interactive mode":
This appears in CI/CD, Docker, cron, or SSH without -t. Use CLAUDE_DOCS_AUTO_INSTALL=yes.
Other issues:
- "git/jq/curl not found": Install the missing tool
- "Failed to clone": Check internet connection
- "Failed to update settings.json": Check file permissions
Problem: Documentation seems outdated
Solution:
/docs -tto force check and update- Manual:
cd ~/.claude-code-docs && git pull - Check GitHub Actions
- Reinstall as last resort
Check your installation:
~/.claude-code-docs/claude-docs-helper.sh --versionOr:
cat ~/.claude-code-docs/README.md | head -1- ✅ macOS: Fully supported (tested on macOS 12+)
- ✅ Linux: Fully supported (Ubuntu, Debian, Fedora, etc.)
- ⏳ Windows: Not yet supported - contributions welcome!
Complete removal:
/docs uninstallOr manually:
~/.claude-code-docs/uninstall.shSee UNINSTALL.md for manual removal instructions.
Defense-in-Depth Approach:
- Input sanitization (alphanumeric + safe chars only)
- Path traversal protection (prevents
../attacks) - Shell injection prevention (heredocs, env vars)
- Comprehensive security testing (13 test cases)
Operational Security:
- All operations limited to documentation directory
- No external data transmission
- HTTPS-only GitHub clones
- You can fork and install from your own repository
Validation:
- 598/600 tests passing (99.7% pass rate)
- 78% code coverage
- Automated security testing in CI/CD
Contributions are welcome! See CONTRIBUTING.md for:
- Architecture overview
- Development setup
- Testing requirements
- PR guidelines
- Security standards
Quick start for contributors:
# Fork the repository
git clone https://github.com/YOUR_USERNAME/claude-code-docs.git
cd claude-code-docs
# Setup Python environment (optional, for enhanced features)
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Run tests
pytest tests/ -v # Should see: 598 passed, 2 skipped
# Test coverage
pytest --cov=scripts --cov-report=term # Should see: ~78%- Eric Buess - Creator of claude-code-docs, the foundation for this project
- Anthropic - For Claude Code and the documentation
The original ericbuess/claude-code-docs provides a simpler, shell-only implementation. This fork extends it with optional Python features for users who need advanced search and validation.
Documentation content belongs to Anthropic. Tool code is open source - contributions welcome!