Local mirror of Claude Code documentation files from https://docs.anthropic.com/en/docs/claude-code/, updated every 3 hours.
- Faster than web fetching - Read from local files
- Always up-to-date - Auto-updates every 3 hours via GitHub Actions
- Track documentation evolution - See exactly what changed in docs over time with git diffs
- Empower Claude Code - Gives Claude the ability to deeply explore many doc files easily by referencing the manifest
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 :)
Platform Support: macOS and Linux are fully supported. Windows support contributions welcome!
Run this single command from wherever you want to store the docs:
curl -fsSL https://raw.githubusercontent.com/ericbuess/claude-code-docs/main/install.sh | bashHaving sync issues? If /docs -t shows your docs are >3 hours out of date, you may have an older version with a sync bug. Just re-run the installer above to fix it - it's safe to run multiple times.
This will:
- Clone the repository (or use existing if found)
- Create the
/docsslash command - Set up automatic git pull when reading 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 optional freshness checking.
/docs hooks # Instantly read hooks documentation
/docs mcp # Instantly read MCP documentation
/docs memory # Instantly read memory documentationYou'll see: 📚 Reading from local docs (run /docs -t to check freshness)
/docs -t # Show when docs were last updated
/docs -t hooks # Check freshness, then read hooks docs
/docs -t mcp # Check freshness, then read MCP docsThe -t flag shows:
- When GitHub last updated the docs
- When your local copy last synced
- Triggers a sync if it's been 3+ hours
# Natural language queries work great
/docs what environment variables exist and how do I use them?
/docs explain the differences between hooks and MCP
# Check for recent changes
/docs -t what's new in the latest documentation?
# Search across all docs
/docs find all mentions of authentication
/docs how do I customize Claude Code's behavior?- Default mode: Zero overhead - reads docs instantly
- With -t flag: Checks timestamps and syncs if needed (only every 3 hours)
- Error handling: If docs are missing, you'll see instructions to reinstall
The docs automatically stay up-to-date:
- GitHub Actions updates the repository every 3 hours
- The hook compares GitHub's timestamp with your local sync time
- If GitHub has newer content, it automatically syncs before reading
- You'll see "🔄 Updating docs to latest version..." when this happens
- No manual updates needed!
Performance:
/docsreads instantly and the hook ensures content is always current/docs -tshows you exact timestamps of GitHub updates vs local sync
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 /path/to/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
If docs aren't auto-updating:
- Check your Claude settings:
cat ~/.claude/settings.json | jq .hooks - Look for error messages when using
/user:docs - Re-run the installer to reset the hook
To completely remove the docs integration:
-
Remove the command file:
rm ~/.claude/commands/docs.md -
Remove the auto-update hook:
- Run
/hooksin Claude Code - Find "PreToolUse - Matcher: Read"
- Select the hook and remove it
- Run
-
Delete the repository:
rm -rf /path/to/claude-code-docs
- 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
Documentation content belongs to Anthropic.