Comprehensive local mirror of Claude Code and Claude Platform API documentation, automatically updated every 3 hours.
This tool provides local access to:
-
** Claude Code Documentation** (~48 docs) - CLI tool, hooks, MCP, integrations
- Source:
code.claude.com/docs/en/* - Stored in:
docs/claude-code/*.md
- Source:
-
** Claude Platform API Documentation** (~532 docs) - API reference, models, prompt engineering
- Source:
platform.claude.com/docs/en/* - Stored in:
docs/platform/*/*.md(hierarchical structure)
- Source:
Total: 580+ documentation pages with automatic updates and intelligent search across both sources.
New in this version:
- Dual Documentation Sources: Now includes both Claude Code CLI docs AND Platform API docs
- Smart Organization: Hierarchical structure for platform docs, flat structure for code docs
- Intelligent Search: Automatically searches across both documentation sources
- 580+ Pages: Comprehensive coverage of the entire Claude ecosystem
- Enhanced Performance: Optimized fetching and caching for large documentation sets
To update:
curl -fsSL https://raw.githubusercontent.com/brennacodes/claude-code-docs/main/install.sh | bash- ** Faster access** - Reads from local files instead of fetching from web
- ** Automatic updates** - Stays current with the latest documentation (updated every 3 hours)
- ** Comprehensive coverage** - Both CLI tool AND API documentation in one place
- ** Better search** - Claude can explore and reference documentation more effectively
- ** Track changes** - See what changed in docs over time via git history
- ** Changelog access** - Quick access to official Claude Code release notes
- β macOS: Fully supported (tested on macOS 12+)
- β Linux: Fully supported (Ubuntu, Debian, Fedora, etc.)
- β³ Windows: Not yet supported - contributions welcome!
This tool requires the following to be installed:
- git - For cloning and updating the repository (usually pre-installed)
- jq - For JSON processing in the auto-update hook (pre-installed on macOS; Linux users may need
apt install jqoryum install jq) - curl - For downloading the installation script (usually pre-installed)
- Claude Code - Obviously :)
Run this single command:
curl -fsSL https://raw.githubusercontent.com/brennacodes/claude-code-docs/main/install.sh | bashThis will:
- Install to
~/.claude-code-docs(or migrate existing installation) - Create the
/docsslash command to pass arguments to the tool and tell it where to find the docs - Set up a 'PreToolUse' 'Read' hook to enable automatic git pull when reading docs from the ~/.claude-code-docs`
Note: The command is /docs (user) - it will show in your command list with "(user)" after it to indicate it's a user-created command.
The /docs command provides instant access to documentation with intelligent multi-source search.
# Searches both Claude Code and Platform docs automatically
/docs hooks # Finds claude-code/hooks.md
/docs intro # Finds platform/intro.md
/docs streaming # Finds platform/build-with-claude/streaming.md
/docs memory # Finds claude-code/memory.md# Claude Code (CLI tool) documentation
/docs claude-code/hooks
/docs claude-code/mcp
/docs claude-code/settings
# Platform API documentation
/docs platform/intro
/docs platform/about-claude/models/overview
/docs platform/build-with-claude/streaming
/docs platform/build-with-claude/prompt-engineering/overview# Check sync status with GitHub
/docs -t # Show sync status
/docs -t hooks # Check sync, then read hooks docs
# See what's new
/docs what's new # Show recent documentation changes
# Access changelog
/docs changelog # Official Claude Code release notes
# List all available docs
/docs # Shows both sources with counts
# Uninstall
/docs uninstall # Get uninstall command# Claude understands natural queries across both sources
/docs what environment variables exist?
/docs explain the differences between hooks and MCP
/docs how do I use prompt engineering with Claude?
/docs what models are available and how do I choose?
/docs find all mentions of authenticationPrefer a different command name?
# Rename the command file
mv ~/.claude/commands/docs.md ~/.claude/commands/claude-docs.md
# Now use your custom name
/claude-docs hooks
/claude-docs introYou can use any name: /cdocs, /anthropic-docs, etc.
The documentation stays current through multiple mechanisms:
- Runs every 3 hours automatically
- Fetches from both
code.claude.comandplatform.claude.com - Updates the repository when changes are detected
- View status: GitHub Actions
- Checks for updates when you read documentation
- Pulls latest changes from GitHub if available
- You may see "π Updating documentation..." when this happens
# Re-run installer
curl -fsSL https://raw.githubusercontent.com/brennacodes/claude-code-docs/main/install.sh | bash
# Or manually pull in the installation directory
cd ~/.claude-code-docs && git pullIf you want to customize the update schedule on your local machine:
# Edit your crontab
crontab -e
# Add this line to update every hour (adjust schedule as needed)
0 * * * * cd ~/.claude-code-docs && git pull --quiet origin main 2>&1 | logger -t claude-docs
# Or every 6 hours at minute 0
0 */6 * * * cd ~/.claude-code-docs && git pull --quiet origin main 2>&1 | logger -t claude-docs
# Or daily at 9 AM
0 9 * * * cd ~/.claude-code-docs && git pull --quiet origin main 2>&1 | logger -t claude-docsNote: The GitHub Actions workflow already handles updates every 3 hours, so a local cron job is typically unnecessary unless you want more frequent checks or are working offline.
Regardless of which version you have installed, simply run:
curl -fsSL https://raw.githubusercontent.com/brennacodes/claude-code-docs/main/install.sh | bashThe installer will handle migration and updates automatically.
If /docs returns "command not found":
- Check if the command file exists:
ls ~/.claude/commands/docs.md - Restart Claude Code to reload commands
- Re-run the installation script
If documentation seems outdated:
- Run
/docs -tto check sync status and force an update - Manually update:
cd ~/.claude-code-docs && git pull - Check if GitHub Actions are running: View Actions
- "git/jq/curl not found": Install the missing tool first
- "Failed to clone repository": Check your internet connection
- "Failed to update settings.json": Check file permissions on
~/.claude/settings.json
To completely remove the docs integration:
/docs uninstallOr run:
~/.claude-code-docs/uninstall.shSee UNINSTALL.md for manual uninstall instructions.
- The installer modifies
~/.claude/settings.jsonto add an auto-update hook - The hook only runs
git pullwhen reading documentation files - All operations are limited to the documentation directory
- No data is sent externally - everything is local
- Repository Trust: The installer clones from GitHub over HTTPS. For additional security, you can:
- Fork the repository and install from your own fork
- Clone manually and run the installer from the local directory
- Review all code before installation
Test the multi-source documentation fetching system:
bin/testpython3 -m venv .venv
source .venv/bin/activate
pip install -r scripts/requirements.txt
python3 test/test_fetch.pyThe test script validates:
- β Both documentation sources (Claude Code & Platform API)
- β Sitemap discovery and parsing
- β File naming and organization
- β Content fetching and validation
- β Hierarchical structure for platform docs
Fetch documentation manually:
python3 -m venv .venv
source .venv/bin/activate
pip install -r scripts/requirements.txtpython3 scripts/fetch_claude_docs.pyls -la docs/claude-code/
ls -la docs/platform/!NOTE: Full fetch takes ~5 minutes and downloads 580+ documentation pages.
Major Changes:
-
Multi-Source Documentation Fetching
- Claude Code CLI docs:
code.claude.comβdocs/claude-code/*.md(49 pages) - Platform API docs:
platform.claude.comβdocs/platform/*/*.md(529 pages) - Total: 578+ documentation pages
- Claude Code CLI docs:
-
Intelligent File Organization
- Claude Code: Flat structure (
claude-code/hooks.md) - Platform: Hierarchical structure (
platform/about-claude/models/overview.md)
- Claude Code: Flat structure (
-
Smart Search
- Auto-searches both sources
- Explicit source selection with prefixes (
claude-code/orplatform/) - Natural language queries work across both documentation sets
-
Enhanced Testing
- Test suite in
test/directory - Simple test runner:
bin/test - Validates both documentation sources
- Test suite in
Technical Updates:
scripts/fetch_claude_docs.py: v3.0 β v4.0 (multi-source configuration)scripts/claude-docs-helper.sh.template: v0.3.3 β v0.4.0 (intelligent doc finding)install.sh: v0.3.3 β v0.4.0 (multi-source support)- New:
bin/testrunner andtest/test_fetch.pytest suite
File Structure:
claude-code-docs/
βββ bin/test # Test runner script
βββ docs/
β βββ claude-code/ # Claude Code CLI docs (49 files)
β β βββ hooks.md
β β βββ mcp.md
β β βββ ...
β βββ platform/ # Platform API docs (529 files)
β βββ intro.md
β βββ about-claude/models/overview.md
β βββ build-with-claude/streaming.md
βββ scripts/
β βββ fetch_claude_docs.py # v4.0 (multi-source)
β βββ claude-docs-helper.sh.template # v0.4.0
βββ test/test_fetch.py # Test suite
- Added Claude Code changelog integration (
/docs changelog) - Fixed shell compatibility for macOS users (zsh/bash)
- Improved documentation and error messages
- Added platform compatibility badges
- Fixed automatic update functionality
- Improved handling of local repository changes
- Better error recovery during updates
Contributions are welcome! This is a community project and we'd love your help:
- πͺ Windows Support: Want to help add Windows compatibility? Fork the repository and submit a PR!
- π Bug Reports: Found something not working? Open an issue
- π‘ Feature Requests: Have an idea? Start a discussion
- π Documentation: Help improve docs or add examples
You can also use Claude Code itself to help build features - just fork the repo and let Claude assist you!
As this is an early beta, you might encounter some issues:
- Auto-updates may occasionally fail on some network configurations
- Some documentation links might not resolve correctly
If you find any issues not listed here, please report them!
Documentation content belongs to Anthropic. This mirror tool is open source - contributions welcome!