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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

civyk_repoix-1.0.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.0.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.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a7dfac0891421f6b7103816e9b96963efdd04212c79403d4343647e400d4ff17
MD5 20af479571c99bfc4848f9f71c667b58
BLAKE2b-256 66c79be0d7dbc9a0f4e9bbc5b1de56b6d75b7dff5bf89dd53eca349d28115e50

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.0.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.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b33814006bdec9a09635e5d1253a2eb4929a57ffc1fc444de561139d434a73b
MD5 0eaaa712164cc873203686157485cac1
BLAKE2b-256 4c5be56c346ae195f5bc9eb8409619cd6e875c1624d95f3ce760b3cceaecdaaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8fad918ce20f7a859c66bdf224f3d9d25cfdf2baf7ecda92737e0c19ba752908
MD5 f5f466c071959f416b90181e03203a4f
BLAKE2b-256 cb2ba354a4bf22131af3d967e11592693d75aec56d2d20a9f806cc15d3cc133e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 293c242b683c16a938b43a39d78d181c569a802d005bfcca58ee44877416adb9
MD5 1f3b1c27ae9db873541ef81522b18dcb
BLAKE2b-256 e04092eb6c5ed7d46348f9ad1709a876b9b07c6f86508152b1b47675091e29dc

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.0.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.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f0bf528ea9894437bd8433f63df61fcf68fffe9881dee79bce2c12ede17e3470
MD5 8ac0bb399bad3ce4bc20fd68fff22c06
BLAKE2b-256 f2aa2234065247a1c531e96ff13b378198382886c5535edf05ed6b56deec24b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59bd17fe387f691cc2e9e2966e0ade5cdcbb6070b63bc8dcfbb750e8fe8eed8d
MD5 bf404d21214b32d153633ff892ee8eb5
BLAKE2b-256 fb76b352b4a03728e01efb87bbf594b308fc3c361faecf13d262f2a98186cb0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 541b27f64bd0edc11aa7eaaf98b3a656fcb54824dccf8208a0dcb1676ba5e679
MD5 7941ef1a702debd6b5387b5cb6766671
BLAKE2b-256 c16c36f2359e6ba844abc3bc1e69ea672f2694d15bb593e0e4d88cc1f151f6af

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.0.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.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a6bd56feb6c41a10132676763c4cf3834080d7b32ff85965c846857eb3f98623
MD5 14b2ac8dc3c48b12a24d832746d06f02
BLAKE2b-256 bd3b7904acaa08d5406df17500896ce89c7c7f43aacb4903aff29799ef4411d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 21e56e244ce03f3527facb802c5e5878e5b5d70e0e549adaf5212c261ea4631d
MD5 1f6d9110d6c957afd96b415f8b7af342
BLAKE2b-256 0005e08168d39caa76c78f224f07f5d2799cca24a320e9355793cbccde5ead5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d90eca770ecb517a770b9b0394137647a8db8c675f2036bf228cb549b431a660
MD5 661a9e59a01148fa056f0fe7d04453a9
BLAKE2b-256 6d926af197d6233a60d9d00bbeec3262b2b802387349096cd754108a52bcde6d

See more details on using hashes here.

File details

Details for the file civyk_repoix-1.0.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.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 567f795abc84324b3b6efff4b79702ce8fcb3af2a2abee0b88910330901fee8a
MD5 a08b219290fc938cb7bb8ce52e3a06c0
BLAKE2b-256 4be3c66a38006bd8c6fd3abbfcf506dc15a63d15ce48b8667f7a98346da522ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7250f925ed1745239d2d95bdaf4f0f3e10ec3e7c44553824e835a61fe331f2db
MD5 5b906729871a069225442a609456b6eb
BLAKE2b-256 7f2eb42e3682561a5f0fedaaeaffefafae89a1ec1a94a820e0157c2f63046a4a

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