@@ -10,15 +10,15 @@ A local SQLite database (`.codemap.db`) indexes the project tree and stores stru
1010
1111## Layering
1212
13- | Layer | Role |
14- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15- | ** ` cli.ts ` ** | Parses argv ( ` --root ` , ` --config ` , ` query ` , ` agents init ` , ` --files ` , ` --full ` , ` -- help` , ` version ` / ` --version ` ), wires bootstrap → ` runCodemapIndex ` / ` printQueryResult ` . |
16- | ** ` api.ts ` ** | Public programmatic surface: ` createCodemap() ` , ` Codemap ` (` query ` , ` index ` ), re-exports ` runCodemapIndex ` for advanced use. |
17- | ** ` application/ ` ** | Use cases: ` run-index.ts ` (incremental / full / targeted orchestration), ` index-engine.ts ` (collect files, git diff, ` indexFiles ` , workers via ` worker-pool.ts ` ). |
18- | ** ` adapters/ ` ** | ` LanguageAdapter ` registry; built-ins call ` parser.ts ` / ` css-parser.ts ` / ` markers.ts ` from ` parse-worker-core ` . |
19- | ** ` runtime.ts ` / ` config.ts ` / ` db.ts ` / …** | Config, SQLite, resolver, workers. |
13+ | Layer | Role |
14+ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15+ | ** ` cli/ ` ** ( ` bootstrap ` , ` main ` , ` cmd-* ` ) | Parses argv; ** dynamic ` import() ` ** loads only the command chunk ( ` cmd-index ` , ` cmd- query` , ` cmd- agents` ) so ` --help ` / ` version ` / ` agents init ` avoid the indexer . |
16+ | ** ` api.ts ` ** | Public programmatic surface: ` createCodemap() ` , ` Codemap ` (` query ` , ` index ` ), re-exports ` runCodemapIndex ` for advanced use. |
17+ | ** ` application/ ` ** | Use cases: ` run-index.ts ` (incremental / full / targeted orchestration), ` index-engine.ts ` (collect files, git diff, ` indexFiles ` , workers via ` worker-pool.ts ` ). |
18+ | ** ` adapters/ ` ** | ` LanguageAdapter ` registry; built-ins call ` parser.ts ` / ` css-parser.ts ` / ` markers.ts ` from ` parse-worker-core ` . |
19+ | ** ` runtime.ts ` / ` config.ts ` / ` db.ts ` / …** | Config, SQLite, resolver, workers. |
2020
21- ` index.ts ` is the package entry: re-exports the public API and runs ` cli.ts ` only when executed as the main module (Node/Bun ` codemap ` binary).
21+ ` index.ts ` is the package entry: re-exports the public API and runs ` cli/main ` only when executed as the main module (Node/Bun ` codemap ` binary).
2222
2323### Full rebuild (parallel)
2424
@@ -89,7 +89,7 @@ A local SQLite database (`.codemap.db`) indexes the project tree and stores stru
8989| File | Purpose |
9090| ----------------- | ------------------------------------------------------------------------------------------------ |
9191| ` index.ts ` | Package entry — re-exports ` api ` / ` config ` , runs CLI when main |
92- | ` cli.ts ` | CLI — argv parsing , ` query ` , ` agents init ` , ` --files ` , ` version ` , index modes |
92+ | ` cli/ ` | CLI — bootstrap argv, lazy command modules , ` query ` / ` agents init ` / index modes |
9393| ` api.ts ` | Programmatic API — ` createCodemap ` , ` Codemap ` , ` runCodemapIndex ` |
9494| ` application/ ` | Indexing use cases and engine (` run-index ` , ` index-engine ` , types) |
9595| ` worker-pool.ts ` | Parallel parse workers (Bun / Node) |
0 commit comments