Local mirror of Claude Code documentation files from https://docs.anthropic.com/en/docs/claude-code/, updated every 3 hours.
Major improvements:
- Fixed installation location at
~/.claude-code-docs - Automatic migration from old installations
- Script-based architecture - faster and more reliable
- Auto-updates on every request - always stay in sync
- Improved
/docs what's new- shows changes with links - Simplified sync status - no confusing timestamps
- Better performance - all operations faster
Upgrading: v0.2 users will auto-update. If you installed before July 29, 2025 or don't see a version in /docs -t, run the install command below.
- Faster than web fetching - Reads from local files; checks a manifest to know where to look
- 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:
curl -fsSL https://raw.githubusercontent.com/ericbuess/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 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 sync status with GitHub
/docs -t hooks # Check sync status, then read hooks docs
/docs -t mcp # Check sync status, then read MCP docs/docs what's new # Show recent documentation changes with diffs/docs uninstall # Get commnd to remove claude-code-docs completely# 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?The docs automatically stay up-to-date:
- GitHub Actions updates the repository every 3 hours
- The Claude Code PreToolUse hook runs only when a Read is made in the ~/.claude-code-docs directory and checks the GitHub repo for updates
- 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:
- Every
/docsrequest automatically checks for updates - Updates are pulled automatically when available
/docs -tshows sync status without reading a doc
If you have v0.1 or v0.2 installed, v0.3 will automatically:
- Find your existing installation from your current configuration
- Migrate to
~/.claude-code-docs - Remove old installation (unless it has uncommitted changes)
- Update your command and hook configurations
How to check your version: Run /docs -t and look for "π¦ Version: X.X"
- If you see "Version: 0.2" or "Version: 0.3" β You'll auto-update to v0.3.1
- If you see no version number β You have v0.1, run the install command:
curl -fsSL https://raw.githubusercontent.com/ericbuess/claude-code-docs/main/install.sh | bashIf /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
- Security Fix: Enhanced command injection prevention
- Fixed installation location: Always installs to
~/.claude-code-docs - Smart migration: Finds your actual installation from configs (no guessing)
- Script-based architecture: All logic in a single maintainable script
- Auto-updates: Every request checks and updates if needed
- Safe uninstall: Preserves directories with uncommitted changes
- Natural commands:
/docs what's newworks with spaces - No version dependencies: Simpler, more reliable code
Documentation content belongs to Anthropic.