Skip to content

Local mirror of Claude Code documentation files from docs.anthropic.com, automatically updated with semantic versioning.

License

Notifications You must be signed in to change notification settings

mnestorov/cc-docs-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Code Documentation Mirror

Last Update Version Platform

Local mirror of Claude Code documentation files from https://docs.anthropic.com/en/docs/claude-code/, automatically updated with semantic versioning.

πŸš€ Quick Start

One-command installation:

curl -fsSL https://raw.githubusercontent.com/mnestorov/cc-docs-mirror/main/scripts/bin/install.sh | bash

This sets up the /docs command in Claude Code with automatic updates.

✨ Features

  • πŸ“– Instant documentation access - Read docs without web delays
  • πŸ”„ Automatic updates - Stays current with latest Claude Code docs
  • πŸ“‹ Changelog integration - Access Claude Code release notes with /docs changelog
  • πŸ” Smart search - Find docs with natural language queries
  • 🍎 Cross-platform - Works on macOS and Linux
  • ⚑ Fast - Local files mean instant access

πŸ’‘ Usage

Basic commands

/docs                    # List all available documentation
/docs hooks             # Read hooks documentation instantly
/docs mcp               # Read MCP documentation
/docs changelog         # Read Claude Code release notes

Check for updates

/docs -t                # Check sync status with GitHub
/docs -t hooks          # Check updates, then read hooks docs

What's new

/docs what's new        # See recent documentation changes

Natural language

/docs how do I use environment variables?
/docs explain memory management
/docs find all mentions of authentication

πŸ› οΈ Development

Prerequisites

  • git - Repository management
  • jq - JSON processing
  • curl - Downloads
  • python3 - For documentation fetching (optional)
  • Claude Code - Obviously! πŸ˜„

Manual Installation

git clone https://github.com/mnestorov/cc-docs-mirror.git
cd cc-docs
./scripts/bin/install.sh

Documentation Fetching (Advanced)

The project includes an enhanced Python script for fetching documentation with progress visualization:

# Install Python dependencies
cd scripts
pip install -r requirements.txt

# Run the documentation fetcher
python fetch_claude_docs.py

Features:

  • πŸ“Š Progress bars with real-time updates
  • πŸ”„ Smart retry logic with exponential backoff
  • βœ… Content validation to ensure quality
  • πŸ“ˆ Detailed statistics and success rates
  • 🎯 Automatic discovery of new documentation pages

Project Structure

cc-docs/
β”œβ”€β”€ docs/                    # Mirror of official documentation
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ fetch_claude_docs.py # Enhanced documentation fetcher
β”‚   β”œβ”€β”€ requirements.txt     # Python dependencies
β”‚   └── bin/                 # Shell scripts
β”‚       β”œβ”€β”€ install.sh       # Main installer
β”‚       β”œβ”€β”€ claude-docs-helper.sh # Core functionality
β”‚       β”œβ”€β”€ uninstall.sh     # Uninstaller
β”‚       └── update-version.sh # Version updater
β”œβ”€β”€ .github/workflows/       # GitHub Actions for automation
β”œβ”€β”€ package.json            # Semantic release configuration
└── .releaserc.json         # Release automation rules

πŸ”„ How Updates Work

  1. GitHub Actions fetches documentation changes every few hours
  2. Semantic versioning tracks releases automatically
  3. Pre-tool hooks check for updates when you read docs
  4. Git pull updates happen automatically when new content is available

πŸ†˜ Troubleshooting

Command not found

# Check if command exists
ls ~/.claude/commands/docs.md

# Restart Claude Code and try again
# Or reinstall:
curl -fsSL https://raw.githubusercontent.com/mnestorov/cc-docs-mirror/main/scripts/bin/install.sh | bash

Documentation seems outdated

# Force update check
/docs -t

# Manual update
cd ~/.claude-code-docs && git pull

Installation issues

  1. Missing dependencies: Install git, jq, curl
  2. Permission errors: Check ~/.claude/ directory permissions
  3. Network issues: Check if GitHub Actions are running: View Actions

πŸ—‘οΈ Uninstalling

Quick Uninstall

From anywhere, run:

~/.claude-code-docs/scripts/bin/uninstall.sh

Or use the docs command:

/docs uninstall

What Gets Removed

The uninstaller will remove:

  1. The /docs command from ~/.claude/commands/docs.md
  2. The auto-update hook from ~/.claude/settings.json
  3. The installation directory ~/.claude-code-docs

Manual Uninstall

If you prefer to uninstall manually:

  1. Remove the command file:
rm -f ~/.claude/commands/docs.md
  1. Remove the hook from Claude settings: Edit ~/.claude/settings.json to remove the PreToolUse hook that references claude-code-docs.

  2. Remove the installation directory:

rm -rf ~/.claude-code-docs

Multiple Installations

If you have multiple installations, the uninstaller will notify you about other locations it finds. You'll need to remove each one separately.

To find all installations:

find ~ -name "claude-code-docs" -type d 2>/dev/null | grep -v ".claude-code-docs"

Backup Created

The uninstaller creates a backup of your Claude settings at ~/.claude/settings.json.backup before removing hooks, just in case.

Reinstalling

To reinstall after uninstalling:

curl -fsSL https://raw.githubusercontent.com/mnestorov/cc-docs-mirror/main/scripts/bin/install.sh | bash

🀝 Contributing

We welcome contributions from the community! Please see our Contributing Guidelines for detailed information.

Quick Start for Contributors

  1. Fork & Clone:

    git clone https://github.com/YOUR_USERNAME/cc-docs-mirror.git
    cd cc-docs-mirror
    npm install
  2. Make Changes following our conventions:

    • Use conventional commits (feat:, fix:, docs:)
    • Test your changes locally
    • Update documentation as needed
  3. Submit a Pull Request with a clear description

Ways to Contribute

  • πŸͺŸ Windows Support: Help make scripts work on Windows (high priority!)
  • πŸ› Bug Reports: Open an issue with reproduction steps
  • πŸ’‘ Feature Requests: Start a discussion for new ideas
  • πŸ“ Documentation: Improve guides, add examples, fix typos
  • ⚑ Performance: Optimize fetching and processing speed
  • 🌍 Translations: Help internationalize the project

See CONTRIBUTING.md for complete guidelines, code style, and development setup.

πŸ”’ Security

  • Repository cloned over HTTPS from GitHub
  • All operations confined to ~/.claude-code-docs
  • No external data transmission (beyond git operations)
  • Hooks only run git pull for documentation updates

For additional security, you can fork the repository and install from your own fork.

πŸ“œ License

Documentation content belongs to Anthropic.
This mirror tool is open source under MIT license.

πŸ“ˆ Project Status

GitHub release (latest by date) GitHub Workflow Status GitHub contributors GitHub issues

πŸ—ΊοΈ Roadmap

  • πŸͺŸ Windows support
  • πŸ” Enhanced search capabilities
  • πŸ“± Better mobile/terminal UI
  • 🌐 Offline-first improvements
  • 🎨 Customizable themes
  • πŸ“Š Usage analytics (optional)
  • 🌍 Multi-language support

πŸ‘₯ Contributors

Thanks to all contributors who help make this project better!

Want to see your name here? Check out our Contributing Guidelines!

πŸ™ Acknowledgments

  • Anthropic for Claude Code and excellent documentation
  • Community contributors who help improve this tool
  • Claude Code users who provide feedback and feature requests
  • Open source community for inspiration and best practices

πŸ“ž Support

  • πŸ“– Documentation: Check the sections above
  • πŸ’¬ Discussions: GitHub Discussions
  • πŸ› Bug Reports: GitHub Issues
  • πŸ“§ Contact: Open an issue for questions

Made with ❀️ for the community

Report Bug Β· Request Feature Β· Contributing

About

Local mirror of Claude Code documentation files from docs.anthropic.com, automatically updated with semantic versioning.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •