Skip to main content

Civyk Repo Index - Codebase indexing service for AI coding agents

Project description

Civyk Repo Index

Python 3.10+ License: Proprietary MCP Compatible PyPI

Semantic code intelligence for AI coding agents — Give your AI assistant deep understanding of your codebase through the Model Context Protocol (MCP).

If you find this useful, please consider supporting the project!

Watch the Demo

Watch: What is Civyk Repo Index, why use it, and how to set it up


Local-First, Private, Secure

Your code never leaves your machine. Civyk Repo Index is a fully local MCP server:

  • 100% offline — No cloud services, no API calls, no telemetry
  • Your data stays yours — All indexes and caches stored locally in SQLite
  • Works air-gapped — Perfect for proprietary codebases and enterprise environments
  • Free binaries — Compiled binaries available via PyPI at no cost

Why Civyk Repo Index?

AI coding assistants have limited context windows. They can't read entire codebases. Civyk Repo Index provides token-budgeted semantic code intelligence:

  • Symbol-aware search — Find functions, classes, and types instantly
  • Smart context packs — Auto-select relevant code within token budgets
  • Relationship tracking — Understand calls, imports, and inheritance
  • Real-time indexing — Always up-to-date with your code changes
  • Multi-language — Python, TypeScript, JavaScript, Java, Go, C#, Rust, Ruby, PHP
  • Branch-aware — Separate indexes per git branch
  • AI Context Cache — Persist code understanding across sessions, save 80-90% tokens

Quick Start

Installation

pip install civyk-repoix

Setup for Your AI Agent

cd /path/to/your/project

# Interactive setup (recommended)
civyk-repoix setup

# Or configure specific agent
civyk-repoix setup --ai claude        # Claude Code
civyk-repoix setup --ai cursor-agent  # Cursor
civyk-repoix setup --ai windsurf      # Windsurf
civyk-repoix setup --ai copilot       # GitHub Copilot
civyk-repoix setup --ai opencode      # OpenCode
civyk-repoix setup --ai kilocode      # Kilo Code
civyk-repoix setup --ai antigravity   # Antigravity

# Configure all supported agents at once
civyk-repoix setup --all

Verify

civyk-repoix query index-status

MCP Tools

36 tools for code intelligence.

Category Tools
Core index_status, build_context_pack, search_symbols, get_symbol, get_references, get_components, get_api_endpoints, get_dependencies, force_reindex
Navigation get_file_symbols, get_definition, get_callers
Discovery list_files, get_file_imports, search_code
Git get_recent_changes, get_hotspots, get_branch_diff
Analysis get_dead_code, find_circular_dependencies, analyze_impact, get_tests_for, get_code_for_test, get_duplicate_code, get_tool_performance_stats
Advanced get_type_hierarchy, get_related_files, find_similar
AI Cache store_understanding, recall_understanding, get_understanding_stats, invalidate_understanding
Context build_delta_context_pack, map_trace_to_symbols, get_recommended_tests, build_doc_pack

Tip: Use recall_understanding before reading files — cached analysis saves 80-90% of tokens.


AI Context Cache — Your AI Remembers

The killer feature: Your AI assistant remembers what it learned about your code.

Traditional AI coding assistants forget everything when you start a new chat or session. With Civyk Repo Index's AI Context Cache, understanding persists:

Monday:    AI reads auth.py → analyzes → stores understanding
Tuesday:   New chat → AI recalls cached understanding → no file read needed!
Wednesday: You modify auth.py → cache auto-invalidates → AI re-analyzes

Why This Matters

Without Cache With Cache
AI re-reads files every session AI recalls previous analysis instantly
Wastes tokens on repeated reads 80-90% token savings
Slow context building Sub-millisecond recall
Understanding lost on chat restart Persists across sessions and chats

How It Works

  1. First encounter: AI reads a file, analyzes it, calls store_understanding
  2. Future sessions: AI calls recall_understanding first — gets cached analysis
  3. File changes: Cache auto-invalidates via content hash — AI re-analyzes
  4. Per-repository: Each repo has its own persistent cache

Cache Tools

Tool Purpose
recall_understanding Call FIRST before reading any file — retrieves cached analysis
store_understanding Persist AI's analyzed understanding after reading files
get_understanding_stats Session start: List cached targets, filter by path/scope, sort, check freshness
invalidate_understanding Manually clear cached entries when needed

store_understanding supports structured fields (purpose, key_points, gotchas) plus a free-form analysis field for complex business logic, state machines, and workflows.

Pro tip: The AI Context Cache is stored locally in SQLite alongside your code index. Your analysis never leaves your machine.


Language Support

Tier Languages
Full Python, TypeScript, JavaScript
Standard Java, Go, C#, Rust, Ruby, PHP
SQL T-SQL, PL/SQL, Standard SQL
Docs Markdown

Architecture

Daemon-based architecture for multi-repository support.

graph LR
    IDE[IDE] --> Shim[stdio Shim] --> Daemon[Daemon Manager] --> Workers[Repository Workers] --> DB[(SQLite)]

Key Components:

  • Daemon Manager — Coordinates worker lifecycle
  • Repository Worker — One per repo, handles indexing and queries
  • Indexer — Tree-sitter parsing, symbol extraction
  • Context Builder — Token-budgeted context generation

CLI Mode

Use without MCP protocol:

civyk-repoix query search-symbols --query "%User%" --kind class
civyk-repoix query build-context-pack --task "implement auth" --token-budget 1000
civyk-repoix query --schema  # Get JSON schema of all tools

Configuration

Location: ~/.config/civyk-repoix/config.yaml

index:
  max_file_size_mb: 10
  debounce_ms: 500

daemon:
  max_workers: 10
  idle_worker_timeout_s: 3600

context:
  default_token_budget: 800
  max_token_budget: 4000

Environment Variables:

Variable Default Description
CIVYK_LOG_LEVEL INFO Log level
REPOIX_PARSE_WORKERS CPU count Parallel parsing workers
REPOIX_CACHE_TTL 60 Query cache TTL (seconds)

Performance

Benchmarked on Windows 11 Pro, Python 3.13, AMD Ryzen processor with a codebase of 152 files and 6,443 symbols.

Tool Performance

Tool Avg Latency Throughput Category
index_status 0.5ms 3,700+ req/s Fast
get_symbol 0.6ms 3,600+ req/s Fast
get_definition 0.6ms 3,400+ req/s Fast
list_files 0.7ms 3,100+ req/s Fast
get_file_symbols 0.8ms 2,800+ req/s Fast
search_symbols 1.8ms 600+ req/s Medium
get_callers 2.2ms 500+ req/s Medium
get_references 2.5ms 450+ req/s Medium
search_code 4ms 280+ req/s Medium
get_components 2ms 550+ req/s Medium
build_context_pack 16ms 60+ req/s Compute
analyze_impact 35ms 30+ req/s Compute
get_dead_code 45ms 25+ req/s Compute
find_similar 90ms 12+ req/s Compute

Index Performance

Operation Performance
Full index (152 files) ~3 seconds
Delta index < 500ms
Symbol search < 2ms
Context pack build < 20ms

Support

Help keep this project alive and growing!

If Civyk Repo Index has helped your development workflow, consider supporting its continued development. Your contribution helps with:

  • Ongoing maintenance and bug fixes
  • New feature development
  • Infrastructure costs

50% of all donations go directly to children's charities helping those in need. The remaining funds support project maintenance and feature upgrades.

Buy Me a Coffee Ko-fi

Every contribution, no matter the size, makes a difference.


License

Proprietary — see LICENSE

Free to use: Compiled binaries are available via PyPI at no cost for personal and commercial use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

civyk_repoix-0.7.0-cp313-cp313-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.13Windows x86-64

civyk_repoix-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

civyk_repoix-0.7.0-cp313-cp313-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

civyk_repoix-0.7.0-cp312-cp312-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.12Windows x86-64

civyk_repoix-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

civyk_repoix-0.7.0-cp312-cp312-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

civyk_repoix-0.7.0-cp311-cp311-win_amd64.whl (6.2 MB view details)

Uploaded CPython 3.11Windows x86-64

civyk_repoix-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

civyk_repoix-0.7.0-cp311-cp311-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

civyk_repoix-0.7.0-cp310-cp310-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.10Windows x86-64

civyk_repoix-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

civyk_repoix-0.7.0-cp310-cp310-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file civyk_repoix-0.7.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7ed41cc65dd1fed434005e48d61c0e8cc936d05a4b86cb811a5af82886ed6740
MD5 31944a029097f9c2ba59a8a87a308036
BLAKE2b-256 d1c056ac0e1529b719022412fc1b47da532ada154baec99b6ace545bd87eb57a

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d89d9ee94861c41ca42eb6a438ba761d478e04c958785f18988d5002e7048874
MD5 d08a9029ff123547903aad785555d678
BLAKE2b-256 73707c644350107ce058d87ba779d61840a4b921fe5ce5ae1e17e13b00c66a26

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0471fb4a4556c2ecaa91ca67c297d549c2855f461f92ef4192d1a0634fd59331
MD5 d61c938865ec89f830445707a6cfb7aa
BLAKE2b-256 913741649370abfa3b7a1052b99bd6930ade58b5bbd3e0187d4878b3dd666706

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7488d7021897634faef033af0cd36e4e2c9672faf6ff6bdb0e748d4018a97c0c
MD5 e01cb17c3af3f2be11a355d8391c6dde
BLAKE2b-256 d4b9a72103d64c0c06efbe51308eded3d71fe9b99625c50dbab7a19838eb2f09

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e0bf4c540e2facb293a2fd985fff6f0c6a78f5b786f0b8c2da052c1558d147ad
MD5 696ee5690e1a69993d113247d8b453e7
BLAKE2b-256 4d8cfad801a72363c273487816ddda8f45c8645d03552c12f47c6585735215cb

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c68e9df496310968340a71adc920252cdbf373eb1768e7981700933eb69d26c1
MD5 be65aa0ff0fee5b5846f66439f40703b
BLAKE2b-256 fb4ba7361765ca2edad02d18ec2512fc2b70ddf5d503ffa9ec58d8ea2ea3fd8a

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 04c77cd36b57460cb221c5044cbaaa7917b11cf01ad19c4cfd9224729ea433a0
MD5 97b82de79e8a16dab805d2670ea9f45c
BLAKE2b-256 d3b82b5d4bab31ced77be463c579842335f286b5bd17f06bdbf997d6225fc7d8

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7bfc1d7d3a72f7487055175d25e23e0c9068637fe788f48f78f3fc586bae00a
MD5 c15147347f956049a3a34294f2b9cbea
BLAKE2b-256 c43b514a7fa5533439c5e4f4be428a318227215b1224f9e4e8c0a8a2e65115bf

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27912c895c35dae3a60bc1c500cb9cee8c125871ce8b237ecd9372557b9cb220
MD5 fd02df82015be2af89aa80c8bbc4f0f9
BLAKE2b-256 4e83bb18a37b16c133aa2c157214c99dd2efc633a5295606e815ec1801be6b6c

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5cde8c9d36c2ee2d5db5a91accf64b360ef2dbd6357348f668f80b997557ed83
MD5 ddb31b391d29743271453c3fa20737fb
BLAKE2b-256 c80d8f6dfb485a8e770da49450cfc9601b18b39ced242b6ce5693aa331f771cb

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b8ba44ad50ab11e2f168e6358cfb24d7ef4898bdb703ce0abf67b5451c23338d
MD5 15366c23a1802303ddd6f73fda972402
BLAKE2b-256 87402efa58aac0b22dc408a80831ec9394613d32f54cec23d5e567f474f5925e

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.7.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for civyk_repoix-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c93008a2dd7f7f38384afd9f1fac21b734705d83d56da8fe9968eded05667cc
MD5 29828edf0f96a34a26f879dd79457ef2
BLAKE2b-256 9f6c5ae3210196eda950aa3cb895b665d4acee886b117c9f2b46cb12a2cf9065

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page