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-1.1.0-cp313-cp313-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.13Windows x86-64

civyk_repoix-1.1.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-1.1.0-cp313-cp313-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

civyk_repoix-1.1.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-1.1.0-cp312-cp312-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

civyk_repoix-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view details)

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

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

civyk_repoix-1.1.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-1.1.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-1.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c6bb66f4850500867415229c77a6e65a70d2b793ff76f8544ac26ca72ddf36db
MD5 c001a0c799d8543c7b84456f4e7d8337
BLAKE2b-256 4fb738fc22801beccb65a4fbea670d7580f676a999bd4c26943dda78fde8bb14

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.1.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-1.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24eb31ee3c53f690b1d11456ad56aa5510da2f93720304fff1c21ebfb5f2dd8f
MD5 8484beb3cb8f1f5dbc0828df5f5aebcf
BLAKE2b-256 bc0161a130675c2a712003a581604aea7f3044690c6b57dfa583d432dfaeff2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 23c3bf6daed673d74bff76d6527034050c019e352f1b11efde96d989586b7ce7
MD5 06ec9a20e3229a2acea955370c5f5332
BLAKE2b-256 d15d9f54ab88616d27b2d5cc774cd2f947c05cd94941fc81379f357bd5325698

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 981c7da35a1b4da7ef6ad22afea12bdfb1c8a35b5cb896f66177861619bfcd46
MD5 e6e83b4766dcf777d613dfcddfb7b968
BLAKE2b-256 4fb1344bfb80c3a2a76caeb94eba1ff735eb7bcc937901950e43cbf8061326df

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.1.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-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ba5c4f0969aded91bb7bc59729346b17b3c9f111ae8ab5038b4daa93fc1cbf85
MD5 96ad0fdb3f10b591b3167015d28b9a86
BLAKE2b-256 2bd8888493fa14bb39dde32fd5c23635d61b6dfa20998ee830c0a00a201e2cc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b81bcae537d27ca17849a3237fe4ce9c33da3ac419213acd9018c8b1862497d2
MD5 068197909a24cfee39e175b345ad06b2
BLAKE2b-256 c15fd5651e6ad72787bcb9c54cdac5e405668c55d10465948afc2286a80ce9c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b54f2e5a902059f8f65bc4fa68909583c7bc5fd50833434e2227f6636a21466c
MD5 74bfb378f4dc8fa3a03021517416a002
BLAKE2b-256 c15da4cc11e911043a4d282beba64b2bd263b5cec3ac3210b955d72a4eaa2b46

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.1.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-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06422594ae939492ac3dd003a3ea19c9369b1dad433a2c8fe2c1bf3ac06d7929
MD5 9355169a4c5e4300fbe8672bd8ee2577
BLAKE2b-256 175b591ea0ea5e0d79d22877494cbe637bdbd27c09800336ced406c807bf5eeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7594ce1843aea7b30273ff916e99ffdfcfcf349f2d58e6c9af53d0c4c4718959
MD5 cb7fe850254dddb107ad9920a997f7c2
BLAKE2b-256 4f4c324721d9688223d28e706923164605e7bdd1f872ca1d4010096a97246852

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fece98dbdf92a5fed01130a88da3a7152442b6cacb81eb1b504b2ff142208fc7
MD5 b687cd307c51665c69d68e4209ec2f99
BLAKE2b-256 e6e8ee01699bd65b2c2876eefa783b22036d894e8e31bf1bc831291f7fb83d5e

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.1.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-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e423ad6e6ff8391cdc03f1eb693048fd51653d6c43905ad43c05b72b6ec0ee7a
MD5 277336b4266c1492fbb8946d867984db
BLAKE2b-256 0f14ef60f7dac3cd190977172db60089ff8e44f85d3b90bdded08550ac628b34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 30c2188dc80aa391222ee4427d44412f92879aac5f71444c073de70cbe795255
MD5 e844e07d0c9b4463cfa9b4ee2fa8e60c
BLAKE2b-256 afa5e19a51c8a30917cf48996100f5b88c3f03dbfd4b0aff4d1aaa4c066bc861

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