local-codebase-indexer 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. local_codebase_indexer-0.3.0/AGENTS.md +48 -0
  2. local_codebase_indexer-0.3.0/CLAUDE.md +48 -0
  3. local_codebase_indexer-0.3.0/MANIFEST.in +5 -0
  4. {local_codebase_indexer-0.2.0/local_codebase_indexer.egg-info → local_codebase_indexer-0.3.0}/PKG-INFO +7 -1
  5. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/README.md +6 -0
  6. local_codebase_indexer-0.3.0/llms.txt +10 -0
  7. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/__init__.py +1 -1
  8. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0/local_codebase_indexer.egg-info}/PKG-INFO +7 -1
  9. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer.egg-info/SOURCES.txt +4 -0
  10. local_codebase_indexer-0.3.0/server.json +35 -0
  11. local_codebase_indexer-0.2.0/MANIFEST.in +0 -5
  12. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/README.zh-CN.md +0 -0
  13. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/README.zh-TW.md +0 -0
  14. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/TODO.md +0 -0
  15. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/README.md +0 -0
  16. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/baseline.json +0 -0
  17. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Auth/LoginService.cs +0 -0
  18. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Controllers/LotController.cs +0 -0
  19. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Controllers/ScrapController.cs +0 -0
  20. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Data/MesDbContext.cs +0 -0
  21. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Legacy/frmChangeLine.frm +0 -0
  22. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Models/DrillBreakEvent.cs +0 -0
  23. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Models/Lot.cs +0 -0
  24. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Models/ScrapRecord.cs +0 -0
  25. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Printing/LabelPrinter.cs +0 -0
  26. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Repositories/LotRepository.cs +0 -0
  27. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Repositories/ScrapRepository.cs +0 -0
  28. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Services/IScrapService.cs +0 -0
  29. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Services/InspectionService.cs +0 -0
  30. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Services/LotService.cs +0 -0
  31. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Services/ScrapService.cs +0 -0
  32. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Sql/MES_Lot.sql +0 -0
  33. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Sql/usp_Inspection_Report.sql +0 -0
  34. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Sql/usp_Lot_UpdateStatus.sql +0 -0
  35. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Sql/usp_Scrap_Insert.sql +0 -0
  36. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Utils/DateRangeHelper.cs +0 -0
  37. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Utils/PartNumberDecoder.cs +0 -0
  38. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Web/scrapForm.ts +0 -0
  39. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/Web.config +0 -0
  40. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/corpus/tools/export_report.py +0 -0
  41. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/queries_stdlib.json +0 -0
  42. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/queries_synthetic.json +0 -0
  43. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/benchmarks/run_benchmark.py +0 -0
  44. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/index.md +0 -0
  45. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/__main__.py +0 -0
  46. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/callgraph.py +0 -0
  47. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/cli.py +0 -0
  48. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/core.py +0 -0
  49. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/cscalls.py +0 -0
  50. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/csdata.py +0 -0
  51. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/dataflow.py +0 -0
  52. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/db.py +0 -0
  53. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/embedder.py +0 -0
  54. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/langparse.py +0 -0
  55. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/mcp_server.py +0 -0
  56. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/query.py +0 -0
  57. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/scanner.py +0 -0
  58. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/sqlaccess.py +0 -0
  59. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer/synonyms.py +0 -0
  60. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer.egg-info/dependency_links.txt +0 -0
  61. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer.egg-info/entry_points.txt +0 -0
  62. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer.egg-info/requires.txt +0 -0
  63. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/local_codebase_indexer.egg-info/top_level.txt +0 -0
  64. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/pyproject.toml +0 -0
  65. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/requirements.txt +0 -0
  66. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/setup.cfg +0 -0
  67. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/tests/test_dataaccess.py +0 -0
  68. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/tests/test_indexer.py +0 -0
  69. {local_codebase_indexer-0.2.0 → local_codebase_indexer-0.3.0}/tests/test_onnx_plumbing.py +0 -0
@@ -0,0 +1,48 @@
1
+ # Instructions for AI coding assistants
2
+
3
+ This repository is **local-codebase-indexer**: a local code index (SQLite, no cloud) that you can use as an MCP server or CLI to find code, callers, and SQL table/stored-procedure access with far fewer tokens than reading files.
4
+
5
+ ## Install (pick one)
6
+
7
+ ```bash
8
+ pip install local-codebase-indexer # from PyPI (Python 3.10+)
9
+ pipx install local-codebase-indexer # isolated
10
+ pip install "git+https://github.com/sfy257000/local-codebase-indexer.git" # latest from GitHub
11
+ ```
12
+
13
+ Check: `local-codebase-indexer --help`. No API keys or network access are needed after installation.
14
+
15
+ ## Use it on a project
16
+
17
+ ```bash
18
+ local-codebase-indexer --root <project> index # build / refresh the index
19
+ local-codebase-indexer --root <project> search "natural language or identifier" --limit 5
20
+ local-codebase-indexer --root <project> relations <SymbolName> --direction both
21
+ local-codebase-indexer --root <project> data-access <TableOrProcedure> # who reads / writes / executes it
22
+ local-codebase-indexer --root <project> context <file> --lines 120 --padding 15
23
+ local-codebase-indexer --root <project> status # is the index fresh?
24
+ ```
25
+
26
+ Put `--json` before the subcommand for JSON output. The index lives in `<project>/.ai_context/` (git-ignored automatically).
27
+
28
+ ## Register as an MCP server (Claude Code)
29
+
30
+ ```bash
31
+ claude mcp add local-indexer -- local-codebase-indexer --root <project> serve
32
+ ```
33
+
34
+ Tools: `codebase_semantic_search`, `codebase_get_symbol_relations`, `codebase_get_optimized_context`, `codebase_get_data_access`, `codebase_index_status`.
35
+
36
+ ## Reading the results
37
+
38
+ - Relations and data-access entries carry a confidence: `confirmed`, `probable`, `candidate` / `uncertain`. Treat `candidate` and `uncertain` (dynamic SQL) as leads to verify in the source, not facts.
39
+ - If `status` reports `stale`, run `index`.
40
+
41
+ ## Working on this repo itself
42
+
43
+ ```bash
44
+ pip install -e ".[dev,onnx]" && python -m pytest -q
45
+ python benchmarks/run_benchmark.py --compare benchmarks/baseline.json
46
+ ```
47
+
48
+ The package is `local_codebase_indexer/`. See `README.md` for design notes and known limits, `TODO.md` for planned work.
@@ -0,0 +1,48 @@
1
+ # Instructions for AI coding assistants
2
+
3
+ This repository is **local-codebase-indexer**: a local code index (SQLite, no cloud) that you can use as an MCP server or CLI to find code, callers, and SQL table/stored-procedure access with far fewer tokens than reading files.
4
+
5
+ ## Install (pick one)
6
+
7
+ ```bash
8
+ pip install local-codebase-indexer # from PyPI (Python 3.10+)
9
+ pipx install local-codebase-indexer # isolated
10
+ pip install "git+https://github.com/sfy257000/local-codebase-indexer.git" # latest from GitHub
11
+ ```
12
+
13
+ Check: `local-codebase-indexer --help`. No API keys or network access are needed after installation.
14
+
15
+ ## Use it on a project
16
+
17
+ ```bash
18
+ local-codebase-indexer --root <project> index # build / refresh the index
19
+ local-codebase-indexer --root <project> search "natural language or identifier" --limit 5
20
+ local-codebase-indexer --root <project> relations <SymbolName> --direction both
21
+ local-codebase-indexer --root <project> data-access <TableOrProcedure> # who reads / writes / executes it
22
+ local-codebase-indexer --root <project> context <file> --lines 120 --padding 15
23
+ local-codebase-indexer --root <project> status # is the index fresh?
24
+ ```
25
+
26
+ Put `--json` before the subcommand for JSON output. The index lives in `<project>/.ai_context/` (git-ignored automatically).
27
+
28
+ ## Register as an MCP server (Claude Code)
29
+
30
+ ```bash
31
+ claude mcp add local-indexer -- local-codebase-indexer --root <project> serve
32
+ ```
33
+
34
+ Tools: `codebase_semantic_search`, `codebase_get_symbol_relations`, `codebase_get_optimized_context`, `codebase_get_data_access`, `codebase_index_status`.
35
+
36
+ ## Reading the results
37
+
38
+ - Relations and data-access entries carry a confidence: `confirmed`, `probable`, `candidate` / `uncertain`. Treat `candidate` and `uncertain` (dynamic SQL) as leads to verify in the source, not facts.
39
+ - If `status` reports `stale`, run `index`.
40
+
41
+ ## Working on this repo itself
42
+
43
+ ```bash
44
+ pip install -e ".[dev,onnx]" && python -m pytest -q
45
+ python benchmarks/run_benchmark.py --compare benchmarks/baseline.json
46
+ ```
47
+
48
+ The package is `local_codebase_indexer/`. See `README.md` for design notes and known limits, `TODO.md` for planned work.
@@ -0,0 +1,5 @@
1
+ include server.json README*.md TODO.md AGENTS.md CLAUDE.md llms.txt index.md requirements.txt
2
+ graft tests
3
+ graft benchmarks
4
+ prune benchmarks/__pycache__
5
+ global-exclude __pycache__ *.pyc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: local-codebase-indexer
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Local codebase indexer and context provider for AI coding assistants: MCP server and CLI with SQL data-access and C# call relations. No cloud, no server.
5
5
  Author: sfy257000
6
6
  Project-URL: Homepage, https://github.com/sfy257000/local-codebase-indexer
@@ -50,6 +50,10 @@ pipx install local-codebase-indexer
50
50
 
51
51
  From a clone: `pip install -e .` (the `bin/indexer` launcher still works in a checkout).
52
52
 
53
+ ## For AI assistants
54
+
55
+ If you are an AI coding assistant asked to set this up: run `pip install local-codebase-indexer`, then `claude mcp add local-indexer -- local-codebase-indexer --root <project> serve` (Claude Code) or use the CLI commands below. Full instructions are in [`AGENTS.md`](AGENTS.md).
56
+
53
57
  ## Usage (CLI)
54
58
 
55
59
  ```bash
@@ -116,3 +120,5 @@ Queries are expanded with a small synonym dictionary (`SP` / `預存程序` / `s
116
120
  ```bash
117
121
  python -m pytest -q
118
122
  ```
123
+
124
+ <!-- mcp-name: io.github.sfy257000/local-codebase-indexer -->
@@ -15,6 +15,10 @@ pipx install local-codebase-indexer
15
15
 
16
16
  From a clone: `pip install -e .` (the `bin/indexer` launcher still works in a checkout).
17
17
 
18
+ ## For AI assistants
19
+
20
+ If you are an AI coding assistant asked to set this up: run `pip install local-codebase-indexer`, then `claude mcp add local-indexer -- local-codebase-indexer --root <project> serve` (Claude Code) or use the CLI commands below. Full instructions are in [`AGENTS.md`](AGENTS.md).
21
+
18
22
  ## Usage (CLI)
19
23
 
20
24
  ```bash
@@ -81,3 +85,5 @@ Queries are expanded with a small synonym dictionary (`SP` / `預存程序` / `s
81
85
  ```bash
82
86
  python -m pytest -q
83
87
  ```
88
+
89
+ <!-- mcp-name: io.github.sfy257000/local-codebase-indexer -->
@@ -0,0 +1,10 @@
1
+ # local-codebase-indexer
2
+
3
+ > Local codebase indexer and context provider for AI coding assistants. MCP server and CLI, SQLite storage, no cloud. Understands C#, Python, JS/TS and T-SQL, including which code reads or writes a table or stored procedure.
4
+
5
+ Install: `pip install local-codebase-indexer`, then `local-codebase-indexer --root <project> index`.
6
+
7
+ - [AGENTS.md](AGENTS.md): install, commands, MCP registration, how to read confidence levels
8
+ - [README.md](README.md): features, design, known limits
9
+ - [TODO.md](TODO.md): planned work
10
+ - [benchmarks/README.md](benchmarks/README.md): how search quality is measured
@@ -1,3 +1,3 @@
1
1
  """Universal Local Codebase Indexer & Context Provider (see index.md)."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.3.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: local-codebase-indexer
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Local codebase indexer and context provider for AI coding assistants: MCP server and CLI with SQL data-access and C# call relations. No cloud, no server.
5
5
  Author: sfy257000
6
6
  Project-URL: Homepage, https://github.com/sfy257000/local-codebase-indexer
@@ -50,6 +50,10 @@ pipx install local-codebase-indexer
50
50
 
51
51
  From a clone: `pip install -e .` (the `bin/indexer` launcher still works in a checkout).
52
52
 
53
+ ## For AI assistants
54
+
55
+ If you are an AI coding assistant asked to set this up: run `pip install local-codebase-indexer`, then `claude mcp add local-indexer -- local-codebase-indexer --root <project> serve` (Claude Code) or use the CLI commands below. Full instructions are in [`AGENTS.md`](AGENTS.md).
56
+
53
57
  ## Usage (CLI)
54
58
 
55
59
  ```bash
@@ -116,3 +120,5 @@ Queries are expanded with a small synonym dictionary (`SP` / `預存程序` / `s
116
120
  ```bash
117
121
  python -m pytest -q
118
122
  ```
123
+
124
+ <!-- mcp-name: io.github.sfy257000/local-codebase-indexer -->
@@ -1,11 +1,15 @@
1
+ AGENTS.md
2
+ CLAUDE.md
1
3
  MANIFEST.in
2
4
  README.md
3
5
  README.zh-CN.md
4
6
  README.zh-TW.md
5
7
  TODO.md
6
8
  index.md
9
+ llms.txt
7
10
  pyproject.toml
8
11
  requirements.txt
12
+ server.json
9
13
  benchmarks/README.md
10
14
  benchmarks/baseline.json
11
15
  benchmarks/queries_stdlib.json
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.sfy257000/local-codebase-indexer",
4
+ "title": "Local Codebase Indexer",
5
+ "description": "Local code index for AI assistants: search, call relations and SQL table/procedure access.",
6
+ "repository": {
7
+ "url": "https://github.com/sfy257000/local-codebase-indexer",
8
+ "source": "github"
9
+ },
10
+ "version": "0.3.0",
11
+ "packages": [
12
+ {
13
+ "registryType": "pypi",
14
+ "identifier": "local-codebase-indexer",
15
+ "version": "0.3.0",
16
+ "runtimeHint": "uvx",
17
+ "transport": {
18
+ "type": "stdio"
19
+ },
20
+ "packageArguments": [
21
+ {
22
+ "type": "named",
23
+ "name": "--root",
24
+ "description": "Absolute path of the project folder to index",
25
+ "isRequired": true,
26
+ "format": "string"
27
+ },
28
+ {
29
+ "type": "positional",
30
+ "value": "serve"
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
@@ -1,5 +0,0 @@
1
- include README*.md TODO.md index.md requirements.txt
2
- graft tests
3
- graft benchmarks
4
- prune benchmarks/__pycache__
5
- global-exclude __pycache__ *.pyc