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!


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

Uploaded CPython 3.13Windows x86-64

civyk_repoix-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.6 MB view details)

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

civyk_repoix-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (6.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

civyk_repoix-0.4.0-cp312-cp312-win_amd64.whl (6.3 MB view details)

Uploaded CPython 3.12Windows x86-64

civyk_repoix-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.7 MB view details)

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

civyk_repoix-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (6.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

civyk_repoix-0.4.0-cp311-cp311-win_amd64.whl (6.1 MB view details)

Uploaded CPython 3.11Windows x86-64

civyk_repoix-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

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

civyk_repoix-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

civyk_repoix-0.4.0-cp310-cp310-win_amd64.whl (5.9 MB view details)

Uploaded CPython 3.10Windows x86-64

civyk_repoix-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (7.0 MB view details)

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

civyk_repoix-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 efa36bddc09c793717e88bfc6c308684ee47878b0d835164673b28ed137435ea
MD5 dc1d9f71b015b5591baac800dcf40f75
BLAKE2b-256 8e0ecf16753f8dce4fb76b8460c9eb37434176231e9758e873dbc873349f4a01

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.4.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.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d7ee0a73ee23b9248ec4b1cd3e2d73c5a760ab5ae05bbcafa8a6579dfd1d966
MD5 10a8d6f0084ff49e60d4fd09873e640e
BLAKE2b-256 0b3b5233f8a310b4b996b987f4f2289fd9b333f4db8bfa5f9419e8501cb5c213

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70de5a95f51d04e0a13101342851878faa91571d9ab4fc356124849be6a8aa05
MD5 50bb7237099759e3191d0ab4f81ee635
BLAKE2b-256 23978bd24c264d3fec6abb2c1dc70897dc3d75595936744279e4af24603ae009

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fca3f7f323a6a43dbf07c5c5aa5baa73e44b239ac739189b77e9c5c4a0fde405
MD5 dc21c52181f71836a6b1871713126639
BLAKE2b-256 748391754b005a8de70bfae77b8e8072b31f62faa22a600b982fdd9b75225d52

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.4.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.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6c830778ae36347044cb72ea3b44cf626aafd171bb53ada2bff6ec5e903a03f5
MD5 cbbda244ede874ff7fa1da5dfe62b4ff
BLAKE2b-256 2ccfdc22f82fc899bd41dd69a84f9d9c40203b8c9407a1cb447abf6e73fd9f8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 532478f0a56138cbe568e962d3df45a74bcd5d87873e029aad93eea1ce11267a
MD5 7631989cda9614c8fe1709e3d561bedf
BLAKE2b-256 783976c00de14c7bba320ebb129b4549e567b7c6c065e27aa7bbd154fd8f9729

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0ee71aeb90d9168017aa9cd1a80d9a27ce71395f1bd1c719def899787ae6d76d
MD5 8825a8c91107e38c7dce3052796d1748
BLAKE2b-256 d3c0eeb530ecefc5429620429e44f03117822a66624c8df49ce2a7695c945e4c

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.4.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.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9810ce78a6e24165f82055433efc075a74fe86d49a97ad9809b6b180b24050b0
MD5 1890f6aa1c2962c6b9afead83612dccc
BLAKE2b-256 3e87ab8b48d43454e7cb3d70ececd4062576f72cb860eaa2157d39f855c9db00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a0b8d372e1a692f8da12163f7728ec504121a24e79d07e13c25a9e06cb37a7c
MD5 b65406530659f0a22dca338cb2d92bb6
BLAKE2b-256 a11efd4b35c303a1f599ab5e2287255c3f238dc56e2a1b0ba2eb41b132ddfdb6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5a0b55d0b14bbdb15a74ff74b8a50694c471e62785d089ba5f80d3393d4976a3
MD5 adf7cd527224537148892a9ebf289ccf
BLAKE2b-256 aa4b16179a995f95cadc0d8ef80f149dc572606f405940c553a76a868c89a7d2

See more details on using hashes here.

File details

Details for the file civyk_repoix-0.4.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.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e4dcdded534762ef5f9acb82cc67b2b22b743410de7f65d8c7181a1a5b3e7196
MD5 1afc7b67f15c3b7570aab2425a57778d
BLAKE2b-256 a16f0872f4b610c38aea61c4b3563984ebfa20014630749b44a77a82b4e8db8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civyk_repoix-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 65f39c2087250acd2561730e2851b97fd36b6e7b0bb5b4ad3a0720a95b687ea8
MD5 1805c100fd3f2ea7d79f22d43c1db723
BLAKE2b-256 f98dc70f1ffad4cb9692d4105df925f5da6bd42b514e4137a2de29d396a450eb

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