-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontext7.json
More file actions
28 lines (28 loc) · 2.81 KB
/
Copy pathcontext7.json
File metadata and controls
28 lines (28 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"projectTitle": "Code Context",
"description": "Local code search for AI coding agents: hybrid keyword + semantic search and SQL relevance-ranked aggregation over an index in plain files.",
"url": "https://context7.com/infino-ai/code-context",
"public_key": "pk_XhkDeKtd3HaW5jgwWAFUa",
"excludeFolders": [
"node_modules",
"**/node_modules",
"**/dist",
"test",
"bench/.work",
".github"
],
"rules": [
"code-context runs locally: install with 'npm install -g @infino-ai/code-context' (bins: code-context and cx), or zero-install into Claude Code with 'claude mcp add code-context -- npx -y @infino-ai/code-context mcp'.",
"Index a repo with 'cx index' from the repo root. Keyword (BM25) search is live seconds after indexing starts; vectors backfill in the background and hybrid ranking unlocks automatically when they land.",
"'cx index' is incremental by default: only files that changed since the last index re-chunk and re-embed. Use --full to rebuild from scratch and --watch to sync on file events.",
"The MCP server ('cx mcp', stdio) exposes exactly three tools: search (exact terms AND meaning in one ranked pass, hits carry chunk content with path:line ranges), sql (read-only SELECT/WITH over the index), and reindex (incremental sync).",
"The index is one table named chunks(path, start_line, end_line, lang, content[, embedding]) living in .infino/ inside the repo - plain files you can copy, cache in CI, or gitignore (add .infino/ to your .gitignore).",
"The engine's search functions are SQL table functions, so one query can rank AND aggregate: SELECT path, SUM(end_line - start_line + 1) AS lines FROM bm25_search('chunks','content','<terms>', 300) GROUP BY path ORDER BY lines DESC.",
"vector_search and hybrid_search table functions take a query vector via a {{name}} placeholder: pass an embed map like {\"q\": \"query text\"} and the server embeds it locally and substitutes the vector.",
"The sql tool's power comes from the ranked search functions (bm25_search, hybrid_search) used as table-valued relations, so relevance-ranked search composes with GROUP BY aggregation in one query.",
"Embedding is always local (a small transformers.js model downloaded once from huggingface.co); code never leaves the machine and no API key exists.",
"SQL is read-only: a single SELECT or WITH statement. The index is a derived artifact - rebuild it with cx index, never mutate it through queries.",
"Configuration is environment variables: CX_ROOT (repo root when not cwd), CX_INDEX_DIR (index location), CX_AUTO_SYNC=0 (disable background staleness sync), CX_NO_EMBED (keyword-only), CX_MAX_FILES / CX_MAX_FILE_BYTES (caps).",
"code-context is built on the infino engine (github.com/infino-ai/infino); the same engine and index format also serve logs, docs, and agent memory."
]
}