> ## Documentation Index
> Fetch the complete documentation index at: https://context7.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Library Owners

> Claim your library and control how Context7 parses it with context7.json

If you maintain a library or framework, Context7 lets you control how its documentation is parsed and presented — so developers always receive current, trustworthy docs inside their coding environment.

To simply add a public library, see [Adding Libraries](https://context7.com/docs/adding-libraries.md). This page covers ownership and advanced configuration.

## Claiming Your Library

If you're the library owner, you can claim your library on Context7 to unlock a web-based admin panel for managing configuration. This allows you to:

* Edit settings through a user interface instead of committing file changes
* Invite team members to collaborate on configuration
* Add and manage multiple versions of your library documentation
* Get higher rate limits for refresh operations

**[Learn more about claiming libraries →](https://context7.com/docs/howto/claiming-libraries.md)**

## Who Can Manage Configuration?

* **Library authors**: Claim ownership via `context7.json` and manage settings through the admin panel, or add configuration directly to your repository
* **Contributors**: Submit pull requests to add or update the configuration

## Advanced Configuration with `context7.json`

For more control over how Context7 parses and presents your library, you can add a `context7.json` file to the root of your repository. This file works similarly to `robots.txt` and tells Context7 how to handle your project.

`context7.json` controls *where* Context7 looks. Only `includeExtensions` adds file types — see [What Gets Indexed](https://context7.com/docs/adding-libraries.md#what-gets-indexed) for the parsed file types and the source-code fallback for repositories without documentation.

### Configuration Fields

Here's an example `context7.json` file with all available options:

```json theme={null}
{
  "$schema": "https://context7.com/schema/context7.json",
  "projectTitle": "Upstash Ratelimit",
  "description": "Ratelimiting library based on Upstash Redis",
  "folders": [],
  "excludeFolders": ["src"],
  "excludeFiles": [],
  "includeExtensions": [".fizz"],
  "rules": ["Use Upstash Redis as a database", "Use single region set up"],
  "previousVersions": [
    {
      "tag": "v1.2.1"
    }
  ]
}
```

> [!NOTE]
>
> **Pro Tip**: Including the `$schema` field enables autocomplete, validation, and helpful tooltips
> in modern code editors like VS Code, making it easier to create and maintain your configuration.

## Field Descriptions

* **`projectTitle`** (string, max 100 characters): The library name shown on Context7 and given to coding agents. It replaces the generated name.

* **`description`** (string, max 500 characters): A short description of what your library does, shown on Context7 and given to coding agents. It replaces the generated description.

> [!NOTE]
>
> Context7 checks a new `projectTitle` or `description` before it uses it, and applies the change on the next refresh. Describe what the library is and does: instructions to AI agents, slogans, and promotional offers are not accepted, and the current name and description stay.
>
> If you remove `projectTitle` or `description` from `context7.json`, the last accepted value stays.

* **`branch`** (string): The name of the git branch to parse. If not provided, the default branch will be used.

* **`folders`** (array): Specific folder paths to include when parsing. If empty, Context7 scans the entire repository. Root-level markdown files are always included.

* **`excludeFolders`** (array): Patterns to exclude from documentation parsing. Supports simple names, paths, and glob patterns (see Exclusion Patterns below).

* **`excludeFiles`** (array): Specific file names to exclude. Use only the filename, not the full path. Examples: `CHANGELOG.md`, license files, or non-documentation content.

* **`includeExtensions`** (array, max 10): Extra file extensions to read as documentation, on top of the built-in formats. Use it when your examples live in files with your own extension, such as `.fizz`. Each entry is a lowercase extension with its leading dot, for example `".fizz"`. A file read this way is treated as code: it is split into code blocks instead of being parsed as Markdown. Context7 rejects an extension that is source code, such as `.py` or `.ts`, is already a built-in documentation format, or is converted in place like `.pdf`; rejected entries are ignored and reported in the library logs.

* **`rules`** (array): Best practices or important guidelines that coding agents should follow when using your library. These appear as recommendations in the documentation context provided to coding agents.

> [!NOTE]
>
> Context7 checks a new rule set before it uses it, and applies the change on the next refresh. Rules that turn the AI agent against the user are not accepted, for example rules that read credentials or secrets, send data to an external destination, or run downloaded scripts.
>
> If any rule is rejected, none of the rules are applied and the library's existing rules are removed. The library logs show that the rules were rejected. Change or remove the rule, then refresh the library.

* **`previousVersions`** (array): Information about previous versions of your library that should also be available in Context7.
  * **`tag`**: The Git tag or version identifier

* **`branchVersions`** (array): Information about previous versions (branch-based) of your library that should also
  be available in Context7.
  * **`branch`**: The Git branch

### How `folders` and `excludeFolders` interact

`excludeFolders` always takes priority over `folders`. Evaluation order for any given file:

1. Does the file's path (or any ancestor directory) match an `excludeFolders` pattern? → **excluded**, stop.
2. Is `folders` non-empty and the file is not under any listed folder? → **excluded**, stop.
3. Otherwise → **included**.

**Example — scan selected directories but skip archived content:**

```json theme={null}
{
  "folders": ["docs", "api-reference"],
  "excludeFolders": ["docs/archive", "**/old"]
}
```

This scans only `docs/` and `api-reference/`, but within those it skips `docs/archive/` and any folder named `old` at any depth.

### Exclusion Patterns

The `excludeFolders` parameter supports various pattern types for flexible exclusion:

* **Simple folder names**: `"node_modules"` - Excludes any folder named "node\_modules" anywhere in the tree
* **Root-specific patterns**: `"./xyz"` - Excludes the folder only at repository root (e.g., excludes `/xyz` but not `/dist/xyz`)
* **Path patterns**: `"app-sdk/v2.3"` - Excludes specific paths and everything under them
* **Glob patterns**: `"*.test"`, `"temp*"` - Excludes folders matching the pattern
* **Globstar patterns**: `"**/dist"`, `"docs/**/internal"` - Advanced path matching
* **Complex patterns**: `"src/**/*.test.js"` - Exclude test files in the src directory

Examples:

* `"node_modules"` - Excludes all node\_modules folders anywhere
* `"./build"` - Excludes the build folder only at root (not `src/build`)
* `"app-sdk/v2.3"` - Excludes the app-sdk/v2.3 path and all its contents
* `"*.test"` - Excludes folders ending with .test
* `"v*/"` - Excludes folders matching the pattern and everything under them (`docs/v2/a.md`), but not files whose names start the same way (`validation.md`). A plain name like `"latest/"` behaves the same as `"latest"`
* `"docs/**/internal"` - Excludes any "internal" folder under docs
* `"**/temp"` - Excludes any folder named "temp" anywhere

### Default Exclusions

If you don't specify `excludeFiles` or `excludeFolders` in your `context7.json` file, Context7 uses these default patterns:

#### Default Excluded Files

```
CHANGELOG.md, changelog.md, CHANGELOG.mdx, changelog.mdx
LICENSE.md, license.md
CODE_OF_CONDUCT.md, code_of_conduct.md
```

#### Default Excluded Folders

```
*archive*, *archived*, old, docs/old, *deprecated*, *legacy*
*previous*, *outdated*, *superseded*
i18n/zh*, i18n/es*, i18n/fr*, i18n/de*, i18n/ja*, i18n/ko*
i18n/ru*, i18n/pt*, i18n/it*, i18n/ar*, i18n/hi*, i18n/tr*
i18n/nl*, i18n/pl*, i18n/sv*, i18n/vi*, i18n/th*
zh-cn, zh-tw, zh-hk, zh-mo, zh-sg
```

These defaults help coding agents avoid irrelevant, outdated, and non-technical content.

## Need Help?

If you encounter issues or need assistance adding your project, please [open an issue](https://github.com/upstash/context7/issues/new/choose) or reach out to our community.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.