Skip to main content

AI coding-agent tool: SQLite FTS5 semantic class index for C# codebases.

Project description

codenavigator

AI coding-agent tool: SQLite FTS5 semantic class index for C# codebases.

Natural-language keyword search across C# class / struct / interface / record declarations. Parser-only baseline + optional AI enrichment via Claude Code CLI. Local web dashboard for browsing and editing metadata. Designed to slot in as a tool for AI coding agents (Claude Code, Cursor, etc.) to shortlist candidate files before deep reads.

Install

Global (simple)

pip install codenavigator

Registers a codenav CLI on PATH. Python 3.11+.

Per-project venv (isolated, recommended for projects with their own Tools/ layout)

cd <your-project>
python -m venv Tools/codenavigator
Tools/codenavigator/Scripts/pip install codenavigator   # Windows
# Tools/codenavigator/bin/pip install codenavigator     # Unix

# Optional launcher at project root (PowerShell):
#   codenav.ps1
#     & "$PSScriptRoot\Tools\codenavigator\Scripts\codenav.exe" @Args

Add to .gitignore:

Tools/codenavigator/

This keeps the venv (binary + dependencies) out of git while letting the launcher script ship with the repo.

Quickstart

cd <your-csharp-repo>

# 1) Parser-only baseline index (no AI calls, no .cs file changes)
codenav reindex --full --no-ai

# 2) Search
codenav search "주문 처리"
codenav search "DataCollector" --limit 30

# 3) Optional: AI fills in descriptions by inserting `// ---` frontmatter blocks
codenav frontmatter gen --limit 30 --apply   # requires `claude` CLI on PATH

# 4) Re-index to pick up the new frontmatter
codenav reindex --full --no-ai

# 5) Local web UI
codenav ui --port 9876

Frontmatter convention

To give a C# class a human-authored description, place a YAML-style comment block directly above its declaration:

// ---
// description: 은행 계좌 도메인 엔티티
// tags: [account, banking, domain]
// ---
public class Account { ... }
  • description: single-line string.
  • tags: inline sequence; comma-separated.
  • An existing /// <summary> XML doc takes precedence.

Full spec: docs/frontmatter.md.

Commands

Command Description
codenav reindex --full [--no-ai] Rebuild the whole index. --no-ai skips Claude enrichment.
codenav reindex --files <path>... Re-index specific files (paths relative to --root or absolute).
codenav reindex --changed Index git-staged .cs files only.
codenav search <query> [--limit N] FTS5 + tag-hit bonus search (default 30, --limit 0 = unlimited).
codenav frontmatter gen [--apply] AI-driven // --- block insertion (dry-run by default).
codenav status Index statistics.
codenav delete --file <path> --yes Remove indexed entries for a single file.
codenav ui --port <N> Launch the local web dashboard.

--root <path> selects the repo root (default: cwd). The SQLite DB lives at <root>/.codenav/index.sqlite.

.codenavignore

gitignore-style file at the repo root. Supports:

# tree prefix
tools/

# glob anywhere
*AutoGen*

# bare name (any path segment)
GeneratedFiles

Search ranking

  • FTS5 bm25 over class_name, namespace, description, tags, bigram (column weights 3.0 / 2.0 / 1.0 / 2.0 / 1.5).
  • +2.0 bonus per exact tag hit.
  • PascalCase auto-split (DataCollectordata, collector).
  • CJK bigram tokenization for Korean / Chinese / Japanese ("문서처리"["문서", "서처", "처리"]).
  • stale=1 rows surface in results only if their description is non-empty (marked [stale]).

Pre-commit hook

Automatic incremental indexing of staged .cs files:

# from your repo root
bash <(curl -s https://raw.githubusercontent.com/JaeCheon8587/codenavigator/main/install-hook.sh)
# or PowerShell
iwr -useb https://raw.githubusercontent.com/JaeCheon8587/codenavigator/main/install-hook.ps1 | iex

Installs a Git pre-commit hook calling codenav reindex --changed.

Use with Claude Code

If you also use the claudecode-for-me Claude Code plugin, two slash commands wrap codenav:

  • /claudecode-for-me:codenav-bootstrapcodenav reindex --full --no-ai.
  • /claudecode-for-me:codenav-frontmatter-gencodenav frontmatter gen with dry-run / apply safety.

Both delegate to the codenav CLI on PATH. The plugin does not bundle the tool — pip install codenavigator is the single source.

License

MIT

Project details


Download files

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

Source Distribution

codenavigator-1.0.2.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

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

codenavigator-1.0.2-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file codenavigator-1.0.2.tar.gz.

File metadata

  • Download URL: codenavigator-1.0.2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codenavigator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 61e012775f1db6fa0e77526d346a02a2d694768120d6e2f6f62728cbb0748d96
MD5 0ce6017afe2f9c460083f8bf48d5ec05
BLAKE2b-256 2a2705a79eeabe939d6cccb0e421cfae8b00788c9c7917a86e64812aa28979a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for codenavigator-1.0.2.tar.gz:

Publisher: publish.yml on JaeCheon8587/codenavigator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codenavigator-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: codenavigator-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codenavigator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1de7393c4da95764bc437aa9056de1be47671fba3224c6819b09d31ddd39f0c2
MD5 711bf3b5f06ffd4857665529643f4bd3
BLAKE2b-256 25e42c911e3e16a1353d362ef1711f854d8d4a066c64056ad158bf750ea861a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for codenavigator-1.0.2-py3-none-any.whl:

Publisher: publish.yml on JaeCheon8587/codenavigator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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