docs/howto/private-repositories.mdx
Add your private GitHub, GitLab, or Bitbucket repositories to Context7 to make your internal documentation available to AI coding assistants.
Follow these steps to add a private repository:
<Note>You must have a Pro or Enterprise plan to add private repositories.</Note>
Keep your private documentation up to date:
When to refresh:
<Tip>Refresh private repos only after significant documentation changes to minimize costs.</Tip>
To remove a private repository:
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 Teamspace Management for the complete permissions table.
context7.jsonAdd 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.