Debian Codegraph @

.github/schemas/context7.json

raw
1 {
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "$id": "https://context7.com/schema/context7.json",
4 "title": "Context7 Configuration Schema",
5 "description": "Configuration file for Context7 project parsing and documentation generation",
6 "type": "object",
7 "properties": {
8 "$schema": {
9 "type": "string",
10 "description": "JSON Schema reference URL for validation",
11 "format": "uri"
12 },
13 "projectTitle": {
14 "type": "string",
15 "description": "The display name for your project in Context7. This overrides the default repository name.",
16 "minLength": 1,
17 "maxLength": 100,
18 "examples": ["Upstash Ratelimit", "Next.js", "React Query"]
19 },
20 "description": {
21 "type": "string",
22 "description": "A brief description of what your library does. This helps coding agents understand the purpose of your project.",
23 "minLength": 10,
24 "maxLength": 200,
25 "examples": [
26 "Ratelimiting library based on Upstash Redis",
27 "The React Framework for Production",
28 "Powerful data synchronization for React"
29 ]
30 },
31 "branch": {
32 "type": "string",
33 "description": "The git branch to parse. If not provided, the default branch will be used.",
34 "minLength": 1,
35 "maxLength": 100,
36 "examples": ["main", "docs", "master"]
37 },
38 "folders": {
39 "type": "array",
40 "description": "Specific folder paths to include when parsing documentation. If empty, Context7 will scan the entire repository. Supports regex patterns and requires full paths.",
41 "items": {
42 "type": "string",
43 "minLength": 1,
44 "maxLength": 255
45 },
46 "maxItems": 50,
47 "uniqueItems": true,
48 "default": [],
49 "examples": [
50 ["docs", "guides"],
51 ["documentation/**"],
52 ["api-reference", "tutorials/*"]
53 ]
54 },
55 "excludeFolders": {
56 "type": "array",
57 "description": "Folder paths to exclude from documentation parsing. Supports regex patterns and requires full paths.",
58 "items": {
59 "type": "string",
60 "minLength": 1,
61 "maxLength": 255
62 },
63 "maxItems": 50,
64 "uniqueItems": true,
65 "default": [],
66 "examples": [
67 ["src", "build", "node_modules"],
68 ["**/test/**", "**/tests/**"],
69 ["legacy/*", "archive"]
70 ]
71 },
72 "excludeFiles": {
73 "type": "array",
74 "description": "Specific file names to exclude from documentation parsing. Only include the filename (not the path). Regex patterns are not supported.",
75 "items": {
76 "type": "string",
77 "minLength": 1,
78 "maxLength": 255,
79 "pattern": "^[^/\\\\]+$"
80 },
81 "maxItems": 100,
82 "uniqueItems": true,
83 "default": [],
84 "examples": [
85 ["CHANGELOG.md", "LICENSE"],
86 ["README-dev.md", "CONTRIBUTING.md"],
87 ["package.json", "tsconfig.json"]
88 ]
89 },
90 "rules": {
91 "type": "array",
92 "description": "Best practices or important guidelines that coding agents should follow when using your library. These appear as recommendations in the documentation context.",
93 "items": {
94 "type": "string",
95 "minLength": 1,
96 "maxLength": 255
97 },
98 "maxItems": 50,
99 "default": [],
100 "examples": [
101 ["Always use TypeScript for better type safety"],
102 ["Use Upstash Redis as a database", "Use single region set up"],
103 [
104 "Import components from the main package",
105 "Follow the naming conventions"
106 ]
107 ]
108 },
109 "disallow": {
110 "type": "boolean",
111 "description": "Set to true to prevent this repository from being parsed by Context7.",
112 "default": false
113 },
114 "redirect": {
115 "type": "string",
116 "description": "Redirect this library to another Context7 library. Can be a full repository URL or a Context7 project path (e.g., \"/org/repo\").",
117 "minLength": 1,
118 "maxLength": 500,
119 "examples": ["/vercel/next.js", "https://github.com/vercel/next.js"]
120 },
121 "previousVersions": {
122 "type": "array",
123 "description": "Previous versions of your library that should also be available in Context7. Each entry can be a version tag string or an object specifying a tag or branch.",
124 "items": {
125 "oneOf": [
126 {
127 "type": "string",
128 "description": "A git tag for the version",
129 "minLength": 1,
130 "maxLength": 50,
131 "examples": ["v1.0.0", "2.0.0"]
132 },
133 {
134 "type": "object",
135 "description": "Version specified by tag or branch (exactly one must be provided)",
136 "properties": {
137 "tag": {
138 "type": "string",
139 "description": "The git tag for this version",
140 "minLength": 1,
141 "maxLength": 50,
142 "examples": ["v1.0.0", "2.0.0"]
143 },
144 "branch": {
145 "type": "string",
146 "description": "The git branch for this version",
147 "minLength": 1,
148 "maxLength": 50,
149 "examples": ["release-1.x", "v2-stable"]
150 }
151 },
152 "oneOf": [{ "required": ["tag"] }, { "required": ["branch"] }],
153 "additionalProperties": false
154 }
155 ]
156 },
157 "maxItems": 20,
158 "default": []
159 },
160 "url": {
161 "type": "string",
162 "description": "Context7 library URL for ownership verification (e.g., https://context7.com/owner/repo). Used alongside public_key to claim library ownership.",
163 "format": "uri",
164 "minLength": 1,
165 "maxLength": 500,
166 "examples": ["https://context7.com/upstash/ratelimit"]
167 },
168 "public_key": {
169 "type": "string",
170 "description": "Team public key for ownership verification. Found in your team settings at context7.com/dashboard.",
171 "minLength": 1,
172 "maxLength": 100
173 }
174 },
175 "dependencies": {
176 "url": ["public_key"],
177 "public_key": ["url"]
178 },
179 "additionalProperties": false,
180 "examples": [
181 {
182 "projectTitle": "Upstash Ratelimit",
183 "description": "Ratelimiting library based on Upstash Redis",
184 "folders": ["docs"],
185 "excludeFolders": ["src"],
186 "rules": ["Use Upstash Redis as a database", "Use single region set up"],
187 "previousVersions": [{ "tag": "v1.2.1" }, { "branch": "release-1.x" }]
188 }
189 ]
190 }