Skip to main content
Add your private GitHub, GitLab, or Bitbucket repositories to Context7 to make your internal documentation available to AI coding assistants. Private Repositories card showing a table of added repositories

Adding Private Repositories

Follow these steps to add a private repository:
  1. Go to the Add Library page
  2. Connect your account
    • Choose GitHub, GitLab, or Bitbucket
    • Authorize Context7 to access your repositories
  3. Select a repository from your account
  4. Submit for parsing
You must have a Pro or Enterprise plan to add private repositories.

Repository Management

Refreshing Documentation

Keep your private documentation up to date:
  1. Click “Refresh” next to the repository
  2. Context7 re-parses the repository
  3. You’re only charged for changed content - cached pages are free
When to refresh:
  • After major documentation updates
  • After releasing new features
  • When you notice outdated information
Refresh private repos only after significant documentation changes to minimize costs.

Removing Repositories

To remove a private repository:
  1. Click “Remove” next to the repository
  2. Confirm deletion in the modal
  3. Repository documentation becomes unavailable immediately
This action is permanent. The repository will no longer be accessible via the API.

Permissions

Access to private repository management is restricted by role. Only Owners and Admins can add, refresh, or remove private repositories. Developers can view repository documentation but cannot manage repositories. See Team Management for the complete permissions table for all team roles.

Configuration

Using context7.json

Add a context7.json file to your repository root for better control over parsing:
{
  "$schema": "https://context7.com/schema/context7.json",
  "projectTitle": "Your Project Name",
  "description": "Brief description of your project",
  "folders": ["docs", "guides"],
  "excludeFolders": ["tests", "dist", "node_modules"],
  "excludeFiles": ["CHANGELOG.md"],
  "rules": ["Always validate user input", "Use TypeScript strict mode"]
}
See the Adding Libraries page for complete configuration options.