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

Uploaded CPython 3.13Windows x86-64

civyk_repoix-0.6.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.6.0-cp313-cp313-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

civyk_repoix-0.6.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.6.0-cp311-cp311-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

civyk_repoix-0.6.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.6.0-cp310-cp310-macosx_11_0_arm64.whl (6.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1fe11b2957499f5ab22d8e382ddd67dbaca0390445860a6c86a23606bd7620e9
MD5 311294a46f70e1fd45f492f8dbc06327
BLAKE2b-256 9178ab6441a521c8b03f5fba7dfdcb7d5d17e80a017141efa4e7bfd6edf4a225

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.6.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.6.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 039378889970a014dbf2216b28c8128e12d1d3e82309deb19c00b4c9ae4c3f3d
MD5 584f211dc0db91804d031660eb25b4f1
BLAKE2b-256 0370d2a805fd38ef66c9b996c263f520e0ca4d795b4153f07214cb2702ffa520

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f04a70e57ed61fd6cdb69e9447ec2814232bd2c4c36e3b2b844823ab939573c9
MD5 35617ab363906bba3c3b78d7481631b7
BLAKE2b-256 341fc8d1bc1282e0ebf702c5cecebd5fcdbdb8f5b4aa506409d34f697a3e7573

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3bd1535f279afaf947d2ffcaa100dd169ea36fc4f48790b36e9b58dd2f60b2b9
MD5 3e0aa7e54ac9e096e866b02a0bba5745
BLAKE2b-256 45330025b372046e1ff260a96cb429a35e0c0228814847e64eeb0972913249bd

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.6.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.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ffd21654b35a5eb4284d9444016679dd7fa0062e0e467a409224f321dd32865
MD5 784e95e63e505b34f2e01fa1f8f94d1f
BLAKE2b-256 f45ad61b3a514e8d7b270d0caaa5dd2194f34ce286c651c9fb1c5e01332d9196

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8a32db0ee8fcae8b8a4cc3fafe1f61a2a88b7f9624e8f571400322ef6dadcb0
MD5 a8d0b8698f6ef705f3d1e6e5bfb5e262
BLAKE2b-256 665c3d530462cebaba3fefd971545e1606f7d82fedb8429afcc2c9fd68293a1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e93e56dd039db00a0869885586d3ec157de89591d813a0d37f8e903d1f9a4c47
MD5 533d2db93b145d73a633106e30e34d2a
BLAKE2b-256 f0fbbeee3f80b4d7bf287519840bf71ec784474e70661e7aefc2bf754560a67f

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.6.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.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4974a3855c7f1cf35466e5d674f282a7c4a171d76f637975ad0a9cae42eeef0f
MD5 6150ffbb4fa93626f3b161aace4743c9
BLAKE2b-256 323c2fc7da729c50d1c540ce408e152b513a1b849c200505a195019aa8467c2f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ebdbd2d2891079c5a03b4dfb005cf57fb5d349a68e1b1d7a97d034b5ee05c0e
MD5 51743190d4c6b1b2f8bdaa7e01de5c07
BLAKE2b-256 0969704e8f9f4bb284941450d208c2e947878764d22bf60e7d892b68bafe8da1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 006605013d2f23ad9a63ab75e4ceec7ecc3a7659486ad404dc7253ef3fcd8ee1
MD5 0eefcb95d4136450ec7b2a7f266825e0
BLAKE2b-256 ef2415fa13eb8b345fbdab0d1a0e7c0f902af611a75090bd09ef75e313fc1b09

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.6.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.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0380627f9c16a8e03bde53a502c71e26166e921086a17ea9902a9c928ebbb68e
MD5 908fcaeeabb0cec5fd344b09da200f4c
BLAKE2b-256 00c034e4edd2ffa6bf2dcd1e0eba630717eb7e43498e3f5ded1ef54b5ddeea7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.6.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d303948a3016ba2d3e2de4c7791a304ee18f430391ec8d585892b2bba8002059
MD5 5df80c09831aa1464c8bb4d6a1ef65c2
BLAKE2b-256 3c4afcbef4668f039df3356a38d8af74e1811382201af3734866451b1d8a0762

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