scip-cli 2.12.0__tar.gz → 3.1.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 (266) hide show
  1. {scip_cli-2.12.0 → scip_cli-3.1.0}/.github/workflows/ci.yml +7 -1
  2. {scip_cli-2.12.0 → scip_cli-3.1.0}/.gitignore +5 -0
  3. {scip_cli-2.12.0 → scip_cli-3.1.0}/PKG-INFO +17 -40
  4. {scip_cli-2.12.0 → scip_cli-3.1.0}/README.md +16 -39
  5. scip_cli-3.1.0/scip_cli/SKILL.md +135 -0
  6. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/__init__.py +1 -1
  7. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/__main__.py +11 -2
  8. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/reindex.py +58 -29
  9. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/exclude.py +12 -0
  10. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/constants.py +5 -5
  11. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/convert.py +15 -5
  12. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/core.py +12 -10
  13. scip_cli-3.1.0/scip_cli/indexing/document_upsert.py +116 -0
  14. scip_cli-3.1.0/scip_cli/indexing/git_delta.py +170 -0
  15. scip_cli-3.1.0/scip_cli/indexing/github_npm.py +146 -0
  16. scip_cli-3.1.0/scip_cli/indexing/incremental.py +325 -0
  17. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/languages.py +4 -4
  18. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/orchestrate.py +1 -14
  19. scip_cli-3.1.0/scip_cli/indexing/performance.py +67 -0
  20. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/postprocess.py +5 -0
  21. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/runners.py +19 -3
  22. scip_cli-3.1.0/scip_cli/indexing/shard_files.py +98 -0
  23. scip_cli-3.1.0/scip_cli/indexing/shards.py +144 -0
  24. scip_cli-3.1.0/scip_cli/indexing/source_discovery.py +244 -0
  25. scip_cli-3.1.0/scip_cli/indexing/ts_projects.py +110 -0
  26. scip_cli-3.1.0/scip_cli/indexing/typescript.py +158 -0
  27. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/merge.py +137 -20
  28. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/metadata.py +19 -4
  29. scip_cli-3.1.0/scip_cli/smoke_config.py +57 -0
  30. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/sql.py +26 -0
  31. scip_cli-3.1.0/scripts/bench_fingerprint_smoke.py +127 -0
  32. scip_cli-3.1.0/scripts/bench_incremental.py +308 -0
  33. scip_cli-3.1.0/scripts/bench_incremental.sh +27 -0
  34. scip_cli-3.1.0/scripts/bench_incremental_gate.py +601 -0
  35. scip_cli-3.1.0/scripts/bench_incremental_gate.sh +25 -0
  36. scip_cli-3.1.0/scripts/generate_incremental_bench_fixture.py +95 -0
  37. scip_cli-3.1.0/scripts/smoke.local.example.json +6 -0
  38. scip_cli-3.1.0/tests/fixtures/incremental-bench/package.json +1 -0
  39. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/alpha/src/index.ts +1 -0
  40. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/alpha/src/util1.ts +4 -0
  41. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/alpha/src/util2.ts +4 -0
  42. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/alpha/src/util3.ts +4 -0
  43. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/alpha/tsconfig.json +9 -0
  44. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/beta/src/index.ts +1 -0
  45. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/beta/src/util1.ts +4 -0
  46. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/beta/src/util2.ts +4 -0
  47. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/beta/src/util3.ts +4 -0
  48. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/beta/tsconfig.json +9 -0
  49. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/index.ts +1 -0
  50. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/meta.ts +1 -0
  51. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_00.ts +4 -0
  52. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_01.ts +4 -0
  53. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_02.ts +4 -0
  54. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_03.ts +4 -0
  55. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_04.ts +4 -0
  56. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_05.ts +4 -0
  57. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_06.ts +4 -0
  58. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_07.ts +4 -0
  59. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_08.ts +4 -0
  60. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_09.ts +4 -0
  61. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_10.ts +4 -0
  62. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_11.ts +4 -0
  63. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_12.ts +4 -0
  64. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_13.ts +4 -0
  65. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_14.ts +4 -0
  66. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_15.ts +4 -0
  67. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_16.ts +4 -0
  68. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_17.ts +4 -0
  69. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_18.ts +4 -0
  70. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_19.ts +4 -0
  71. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_20.ts +4 -0
  72. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_21.ts +4 -0
  73. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_22.ts +4 -0
  74. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_23.ts +4 -0
  75. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_24.ts +4 -0
  76. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_25.ts +4 -0
  77. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_26.ts +4 -0
  78. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_27.ts +4 -0
  79. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_28.ts +4 -0
  80. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_29.ts +4 -0
  81. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_30.ts +4 -0
  82. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_31.ts +4 -0
  83. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_32.ts +4 -0
  84. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_33.ts +4 -0
  85. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_34.ts +4 -0
  86. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_35.ts +4 -0
  87. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_36.ts +4 -0
  88. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_37.ts +4 -0
  89. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_38.ts +4 -0
  90. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_39.ts +4 -0
  91. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_40.ts +4 -0
  92. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_41.ts +4 -0
  93. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_42.ts +4 -0
  94. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_43.ts +4 -0
  95. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_44.ts +4 -0
  96. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_45.ts +4 -0
  97. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_46.ts +4 -0
  98. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_47.ts +4 -0
  99. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_48.ts +4 -0
  100. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_49.ts +4 -0
  101. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_50.ts +4 -0
  102. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_51.ts +4 -0
  103. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_52.ts +4 -0
  104. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_53.ts +4 -0
  105. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_54.ts +4 -0
  106. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_55.ts +4 -0
  107. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_56.ts +4 -0
  108. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_57.ts +4 -0
  109. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_58.ts +4 -0
  110. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/src/modules/module_59.ts +4 -0
  111. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/bulk/tsconfig.json +9 -0
  112. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/gamma/src/index.ts +1 -0
  113. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/gamma/src/util1.ts +4 -0
  114. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/gamma/src/util2.ts +4 -0
  115. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/gamma/src/util3.ts +4 -0
  116. scip_cli-3.1.0/tests/fixtures/incremental-bench/packages/gamma/tsconfig.json +9 -0
  117. scip_cli-3.1.0/tests/incremental_equivalence.py +55 -0
  118. scip_cli-3.1.0/tests/test_document_upsert.py +99 -0
  119. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_e2e.py +1 -1
  120. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_exclude_globs.py +7 -0
  121. scip_cli-3.1.0/tests/test_git_delta.py +465 -0
  122. scip_cli-3.1.0/tests/test_incremental_equivalence.py +81 -0
  123. scip_cli-3.1.0/tests/test_incremental_shards.py +241 -0
  124. scip_cli-3.1.0/tests/test_index_performance.py +27 -0
  125. scip_cli-3.1.0/tests/test_indexer_failure_message.py +29 -0
  126. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_indexer_fallback.py +26 -4
  127. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_metadata.py +15 -0
  128. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_python_index_integration.py +1 -1
  129. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_reindex.py +140 -17
  130. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_scope.py +6 -6
  131. scip_cli-3.1.0/tests/test_shard_files.py +146 -0
  132. scip_cli-3.1.0/tests/test_source_discovery.py +101 -0
  133. scip_cli-3.1.0/tests/test_sql.py +30 -0
  134. scip_cli-2.12.0/docs/incremental-reindex-roadmap.md +0 -45
  135. scip_cli-2.12.0/docs/port.md +0 -80
  136. scip_cli-2.12.0/docs/ports/conclusions.md +0 -424
  137. scip_cli-2.12.0/docs/ports/experiment-summary.md +0 -257
  138. scip_cli-2.12.0/docs/ports/go-experiment.md +0 -252
  139. scip_cli-2.12.0/docs/ports/go.md +0 -203
  140. scip_cli-2.12.0/docs/ports/plan.md +0 -161
  141. scip_cli-2.12.0/docs/ports/rust-experiment.md +0 -324
  142. scip_cli-2.12.0/docs/ports/rust.md +0 -264
  143. scip_cli-2.12.0/docs/ports/summary.md +0 -118
  144. scip_cli-2.12.0/docs/ports/zig-experiment.md +0 -333
  145. scip_cli-2.12.0/docs/ports/zig.md +0 -283
  146. scip_cli-2.12.0/scip_cli/SKILL.md +0 -172
  147. scip_cli-2.12.0/scip_cli/indexing/shards.py +0 -201
  148. scip_cli-2.12.0/scip_cli/indexing/typescript.py +0 -378
  149. scip_cli-2.12.0/tests/test_incremental_shards.py +0 -273
  150. {scip_cli-2.12.0 → scip_cli-3.1.0}/.agents/commands/migration-problems.md +0 -0
  151. {scip_cli-2.12.0 → scip_cli-3.1.0}/.agents/rules/agent.mdc +0 -0
  152. {scip_cli-2.12.0 → scip_cli-3.1.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  153. {scip_cli-2.12.0 → scip_cli-3.1.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  154. {scip_cli-2.12.0 → scip_cli-3.1.0}/.github/ISSUE_TEMPLATE/question.md +0 -0
  155. {scip_cli-2.12.0 → scip_cli-3.1.0}/.github/pull_request_template.md +0 -0
  156. {scip_cli-2.12.0 → scip_cli-3.1.0}/.pre-commit-config.yaml +0 -0
  157. {scip_cli-2.12.0 → scip_cli-3.1.0}/AGENTS.md +0 -0
  158. {scip_cli-2.12.0 → scip_cli-3.1.0}/CODE_OF_CONDUCT.md +0 -0
  159. {scip_cli-2.12.0 → scip_cli-3.1.0}/CONTRIBUTING.md +0 -0
  160. {scip_cli-2.12.0 → scip_cli-3.1.0}/LICENSE +0 -0
  161. {scip_cli-2.12.0 → scip_cli-3.1.0}/SECURITY.md +0 -0
  162. {scip_cli-2.12.0 → scip_cli-3.1.0}/pyproject.toml +0 -0
  163. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/__init__.py +0 -0
  164. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/common.py +0 -0
  165. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/file.py +0 -0
  166. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/graph.py +0 -0
  167. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/live.py +0 -0
  168. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/project.py +0 -0
  169. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/sections.py +0 -0
  170. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/symbol.py +0 -0
  171. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/analyze/targets.py +0 -0
  172. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/cache.py +0 -0
  173. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/cli_args.py +0 -0
  174. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/__init__.py +0 -0
  175. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/analyze.py +0 -0
  176. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/code.py +0 -0
  177. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/deps.py +0 -0
  178. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/members.py +0 -0
  179. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/rdeps.py +0 -0
  180. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/refs.py +0 -0
  181. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/search.py +0 -0
  182. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/skill.py +0 -0
  183. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/commands/symbols.py +0 -0
  184. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/config.py +0 -0
  185. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/debug.py +0 -0
  186. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/discover.py +0 -0
  187. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/indexing/__init__.py +0 -0
  188. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/output.py +0 -0
  189. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/paths.py +0 -0
  190. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/project.py +0 -0
  191. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/queries.py +0 -0
  192. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/scip_tool.py +0 -0
  193. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/scope.py +0 -0
  194. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/session.py +0 -0
  195. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/source.py +0 -0
  196. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/symbols.py +0 -0
  197. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/targets.py +0 -0
  198. {scip_cli-2.12.0 → scip_cli-3.1.0}/scip_cli/tsconfig.py +0 -0
  199. {scip_cli-2.12.0 → scip_cli-3.1.0}/scripts/bench.sh +0 -0
  200. {scip_cli-2.12.0 → scip_cli-3.1.0}/scripts/bench_postprocess.py +0 -0
  201. {scip_cli-2.12.0 → scip_cli-3.1.0}/scripts/build.sh +0 -0
  202. {scip_cli-2.12.0 → scip_cli-3.1.0}/scripts/publish.sh +0 -0
  203. {scip_cli-2.12.0 → scip_cli-3.1.0}/scripts/test.sh +0 -0
  204. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/__init__.py +0 -0
  205. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/analyze_db.py +0 -0
  206. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/bench_db.py +0 -0
  207. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/conftest.py +0 -0
  208. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/e2e_harness.py +0 -0
  209. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixture_catalog.py +0 -0
  210. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/package.json +0 -0
  211. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/__tests__/fixtureOnly.spec.ts +0 -0
  212. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/app/handler.ts +0 -0
  213. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/config.ts +0 -0
  214. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/consumer.ts +0 -0
  215. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/dead.ts +0 -0
  216. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/i18n/en.ts +0 -0
  217. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/i18n/index.ts +0 -0
  218. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/i18n/useLocale.ts +0 -0
  219. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/domain/labels/index.ts +0 -0
  220. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/events/streamTypes.ts +0 -0
  221. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/gateway/index.ts +0 -0
  222. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/helper.ts +0 -0
  223. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/hooks/useHookA.ts +0 -0
  224. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/hooks/useHookB.ts +0 -0
  225. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/hooks/useItems.ts +0 -0
  226. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/index.ts +0 -0
  227. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/integrations/inferenceClient.ts +0 -0
  228. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/lib/handler.ts +0 -0
  229. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/loaders/useInference.ts +0 -0
  230. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/models/MutationAggregate.ts +0 -0
  231. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/pages/panelPage.ts +0 -0
  232. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/rules/applyRule.ts +0 -0
  233. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/types/a.ts +0 -0
  234. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/types/b.ts +0 -0
  235. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/Button.ts +0 -0
  236. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/LazyPanel.ts +0 -0
  237. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/buttonConsumer.ts +0 -0
  238. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/ui/menuModule.ts +0 -0
  239. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/user.ts +0 -0
  240. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/widget.ts +0 -0
  241. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/src/widgets/OrphanWidget.ts +0 -0
  242. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/fixtures/typescript-project/tsconfig.json +0 -0
  243. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/perf_util.py +0 -0
  244. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_analyze.py +0 -0
  245. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_analyze_graph.py +0 -0
  246. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_analyze_live.py +0 -0
  247. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_analyze_perf.py +0 -0
  248. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_bench_queries.py +0 -0
  249. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_cache.py +0 -0
  250. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_composability.py +0 -0
  251. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_config.py +0 -0
  252. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_discover.py +0 -0
  253. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_e2e_analyze_patterns.py +0 -0
  254. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_e2e_perf.py +0 -0
  255. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_index_batching.py +0 -0
  256. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_index_prune.py +0 -0
  257. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_indexer_env.py +0 -0
  258. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_merge.py +0 -0
  259. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_multi_symbol.py +0 -0
  260. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_pure_functions.py +0 -0
  261. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_qualified_symbols.py +0 -0
  262. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_scip_tool.py +0 -0
  263. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_symbols_freq.py +0 -0
  264. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_targets.py +0 -0
  265. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_tsconfig.py +0 -0
  266. {scip_cli-2.12.0 → scip_cli-3.1.0}/tests/test_typescript_projects.py +0 -0
@@ -29,7 +29,13 @@ jobs:
29
29
  python -m venv .venv
30
30
  source .venv/bin/activate
31
31
  pip install -e ".[dev]"
32
- npm install -g github:flesler/scip-typescript#feat/incremental-tsc
32
+ # GitHub npx spec runs prepare (needs pnpm for snapshot fixtures); CI installs a built global binary instead.
33
+ git clone --depth 1 --branch feat/partial-files https://github.com/flesler/scip-typescript.git /tmp/scip-typescript
34
+ cd /tmp/scip-typescript
35
+ npm install --ignore-scripts
36
+ npm run build
37
+ npm install -g .
38
+ cd -
33
39
  mkdir -p ~/.local/bin
34
40
  curl -sL https://github.com/scip-code/scip/releases/download/v0.9.0/scip-linux-amd64.tar.gz | tar xz -C ~/.local/bin
35
41
  echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
@@ -49,5 +49,10 @@ dogfood.md
49
49
 
50
50
  # Local-only dev scripts (repo-specific smoke harnesses)
51
51
  scripts/deep-smoke.sh
52
+ scripts/smoke.local.json
52
53
  tmp/
53
54
  *.db
55
+ node_modules/
56
+
57
+ # Generated when indexing the incremental-bench fixture (sources are .ts)
58
+ tests/fixtures/incremental-bench/**/*.js
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: scip-cli
3
- Version: 2.12.0
3
+ Version: 3.1.0
4
4
  Summary: Fast code intelligence via SCIP indexes
5
5
  Project-URL: Homepage, https://github.com/flesler/scip-cli
6
6
  Author: Ariel Flesler
@@ -101,7 +101,8 @@ On **first index**, scip-cli runs language indexers and builds a SQLite cache. Y
101
101
 
102
102
  Install `scip-cli` and run it. On first index, scip-cli will:
103
103
 
104
- - Download `scip-typescript` / `scip-python` via `npx`, `scip-go` via `go install`, or `rust-analyzer` via `rustup` when not already on PATH
104
+ - Install `scip-typescript` from the [flesler/scip-typescript](https://github.com/flesler/scip-typescript) fork (`feat/partial-files`) when not on PATH — clones, `npm install`, and builds into `~/.cache/scip-cli/tools/github-npm/` (upstream npm does not ship partial `--files` yet)
105
+ - Download `scip-python` via `npx`, `scip-go` via `go install`, or `rust-analyzer` via `rustup` when not already on PATH
105
106
  - Download the `scip` converter binary from [GitHub releases](https://github.com/scip-code/scip/releases) into `~/.cache/scip-cli/bin/` when not already on PATH
106
107
  - Walk the repo for `tsconfig*.json` project roots (TypeScript monorepos), run `scip-typescript` per project (parallel by default), convert each partial index, then merge into one `index.db`
107
108
 
@@ -109,11 +110,12 @@ No `.scip-cli.json` required for discovery. Subsequent queries read the cached d
109
110
 
110
111
  **Option B: Install indexers globally ahead of time**
111
112
 
112
- Same indexing steps as Option A; this only avoids `npx` download on the first run:
113
+ Same indexing steps as Option A; this only avoids the first-run download/build:
113
114
 
114
115
  ```bash
115
- # TypeScript/JavaScript indexer (also handles plain JS via --infer-tsconfig)
116
- npm install -g @sourcegraph/scip-typescript
116
+ # TypeScript/JavaScript indexer — fork with partial --files (required for incremental reindex)
117
+ git clone --depth 1 --branch feat/partial-files https://github.com/flesler/scip-typescript.git
118
+ cd scip-typescript && npm install --ignore-scripts && npm run build && npm install -g .
117
119
 
118
120
  # Python indexer
119
121
  npm install -g @sourcegraph/scip-python
@@ -154,7 +156,7 @@ scip-cli <command> [arguments]
154
156
  - `deps <symbol|file>` - Find outbound dependencies (what a symbol or file calls) (`--path`, `--paths-only`)
155
157
  - `members <symbol>` - List members of a class/interface (`--path`)
156
158
  - `analyze [target]` - SQL health dashboards (`--limit`, `--per-check-limit`, `--priority`, `--check`, `--include-tests`). No target: project-wide; directory or file path; symbol name. See [Finding easy wins with `analyze`](#finding-easy-wins-with-analyze).
157
- - `reindex` - Force re-indexing of the current project (`--path` to limit scope; repeatable)
159
+ - `reindex` - Force re-indexing (`--path`, `--tsconfig`, `--exclude`, `--fresh`, `--no-incremental`; incremental by default in git TS repos)
158
160
  - `skill [path]` - Install or dump the SKILL.md
159
161
 
160
162
  ### Examples
@@ -222,7 +224,10 @@ scip-cli deps greet --paths-only | sort -u
222
224
  3. Runs `scip-typescript` per project (in parallel when there are multiple projects; set `SCIP_CLI_INDEX_WORKERS=1` to force serial), `scip-python` for Python, `scip-go` for Go, or `rust-analyzer scip` for Rust
223
225
  4. Converts each SCIP output to SQLite with `scip expt-convert`, then merges partial databases when needed
224
226
  5. Caches the result in `~/.cache/scip-cli/projects/<dirname>-<hash>/index.db` (e.g. `my-monorepo-1a3f7a`)
225
- 6. Subsequent queries are SQLite lookups against that cache (not re-indexing)
227
+ 6. Compacts the database after each reindex (`VACUUM` + WAL checkpoint)
228
+ 7. Subsequent queries are SQLite lookups against that cache (not re-indexing)
229
+
230
+ **Incremental reindex (TypeScript, v3.0+):** plain `scip-cli reindex` in a git worktree is incremental by default — reuses unchanged tsconfig shards via `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`). Dirty shards reindex only changed files (git delta → importer closure → fork `--files`) and upsert into the live `index.db`. Use `--no-incremental` or `--fresh` for a full rebuild; `--unversioned` and non-git projects always full-reindex. Bench locally with `scripts/bench_incremental_gate.sh --branch fixture`.
226
231
 
227
232
  ## Configuration
228
233
 
@@ -249,27 +254,28 @@ Other environment variables:
249
254
  |`SCIP_CLI_MAX_HEAP_MB`|Node heap for `scip-typescript` / `scip-python` (overrides `maxHeapMb` in config)|
250
255
  |`SCIP_CLI_TS_INDEX_BATCH_SIZE`|Split large TS repos into multiple `scip-typescript` runs (default: all tsconfigs in one run)|
251
256
  |`SCIP_CLI_MERGE_BATCH_SIZE`|SQLite ATTACH batch size when merging part DBs (max 9)|
257
+ |`SCIP_CLI_INDEX_TIMING`|`1` — per-phase `INDEX_TIMING:` lines on stderr during reindex|
252
258
  |`SCIP_CLI_MAX_DEF_LINES`|Max definition lines in `code` output|
253
259
  |`SCIP_CLI_DEBUG`|Log SQL queries to stderr|
254
260
 
255
- **Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema. `scip-typescript` installs via npx from the GitHub fork in `scip_cli/indexing/constants.py` when not on PATH (until upstream ships incremental flags). `scip-python` via `npx` at latest; `scip-go` via `go install @latest`. `rust-analyzer` installs via `rustup component add`.
261
+ **Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema. **TypeScript** uses [flesler/scip-typescript](https://github.com/flesler/scip-typescript) `feat/partial-files` (see `SCIP_TYPESCRIPT_NPX_PACKAGE` in `scip_cli/indexing/constants.py`) — auto-built when not on PATH; switch back to `@sourcegraph/scip-typescript` on npm once upstream merges `--files`. `scip-python` via `npx` at latest; `scip-go` via `go install @latest`. `rust-analyzer` installs via `rustup component add`.
256
262
 
257
263
  Large monorepos (>10 tsconfig projects) log per-project progress to stderr during indexing; smaller repos stay quiet aside from the final `Indexed … (size)` line.
258
264
 
259
265
  Scoped indexing without editing `.scip-cli.json`:
260
266
 
261
267
  ```bash
262
- scip-cli reindex --path packages/server
268
+ scip-cli reindex --path packages/core
263
269
  scip-cli reindex --path packages/api --path packages/worker
264
270
  scip-cli reindex --tsconfig 'apps/api/tsconfig.*.json'
265
271
  scip-cli reindex --tsconfig tsconfig.app.json --tsconfig tsconfig.spec.json
266
272
  scip-cli reindex --exclude '**/*.test.ts' '**/*.spec.ts'
267
273
  scip-cli reindex --exclude # clear persisted excludes
268
274
  scip-cli reindex --fresh # full index; clear metadata.json
269
- scip-cli reindex --incremental # reuse unchanged project shards (see SKILL for language support)
275
+ scip-cli reindex --no-incremental # full rebuild; clears shard manifest
270
276
  ```
271
277
 
272
- `--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are expanded inside the tool). File-based runs default to one `scip-typescript` process per file so each gets its own heap (`SCIP_CLI_TS_INDEX_BATCH_SIZE` still overrides). Cannot combine `--path` and `--tsconfig`. **TypeScript only.** Scope and exclude defaults are saved in `metadata.json` next to `index.db` and reused on later `reindex` runs; use `reindex --fresh` to clear them and restore a full index. `--exclude` updates the persisted exclude list; a lone bare `--exclude` clears it.
278
+ `--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are repo-relative to the detected project root — run from monorepo root or shorten the glob). File-based runs default to one `scip-typescript` process per file so each gets its own heap (`SCIP_CLI_TS_INDEX_BATCH_SIZE` still overrides). Cannot combine `--path` and `--tsconfig`. **TypeScript only** for `--path` and `--tsconfig`. Scope and exclude defaults are saved in `metadata.json` next to `index.db` and reused on later `reindex` runs; use `reindex --fresh` to clear them and restore a full index. `--exclude` updates the persisted exclude list (honored during incremental reindex too); a lone bare `--exclude` clears it. Incremental is the default in git TypeScript repos; `--no-incremental`, `--fresh`, `--unversioned`, or non-git force full reindex.
273
279
 
274
280
  When a tsconfig (after `extends`) has `allowJs: true`, matching `.js`/`.jsx` files under that config's `include`/`files` are indexed too (same roots as `.ts`/`.tsx`). `allowJs: false` or unset leaves JavaScript out. JS-only repos with no `tsconfig.json` still use `--infer-tsconfig`.
275
281
 
@@ -338,35 +344,6 @@ Inspired by [scip-query](https://github.com/PlunderStruck/scip-query), scip-cli
338
344
 
339
345
  The speedup comes from using optimized direct SQLite queries and cutting some nice but very slow goodies (like ts-morph).
340
346
 
341
- ## Architecture
342
-
343
- ```
344
- scip_cli/
345
- ├── __init__.py
346
- ├── __main__.py # CLI entry point
347
- ├── cli_args.py # Shared argparse helpers
348
- ├── config.py # .scip-cli.json loader
349
- ├── discover.py # TypeScript project discovery
350
- ├── merge.py # SQLite index merging
351
- ├── scip_tool.py # scip binary download
352
- ├── sql.py # SQLite helpers
353
- ├── paths.py # --path scope filtering
354
- ├── project.py # Project root + language detection
355
- ├── cache.py # Index cache paths
356
- ├── metadata.py # Persisted reindex defaults (metadata.json)
357
- ├── scope.py # Scoped reindex helpers
358
- ├── debug.py # SCIP_CLI_DEBUG stderr helpers
359
- ├── indexing.py # SCIP index build + get_db
360
- ├── symbols.py # Symbol parsing and kinds
361
- ├── queries.py # Symbol/file SQL queries
362
- ├── source.py # Filesystem source reads
363
- ├── output.py # CLI formatting helpers
364
- ├── session.py # setup() and single-match resolution
365
- ├── targets.py # file-path heuristics (tests; analyze uses analyze/targets.py)
366
- ├── analyze/ # SQL dashboard queries (project/file/symbol)
367
- └── commands/ # Subcommand implementations
368
- ```
369
-
370
347
  ## Development
371
348
 
372
349
  ```bash
@@ -80,7 +80,8 @@ On **first index**, scip-cli runs language indexers and builds a SQLite cache. Y
80
80
 
81
81
  Install `scip-cli` and run it. On first index, scip-cli will:
82
82
 
83
- - Download `scip-typescript` / `scip-python` via `npx`, `scip-go` via `go install`, or `rust-analyzer` via `rustup` when not already on PATH
83
+ - Install `scip-typescript` from the [flesler/scip-typescript](https://github.com/flesler/scip-typescript) fork (`feat/partial-files`) when not on PATH — clones, `npm install`, and builds into `~/.cache/scip-cli/tools/github-npm/` (upstream npm does not ship partial `--files` yet)
84
+ - Download `scip-python` via `npx`, `scip-go` via `go install`, or `rust-analyzer` via `rustup` when not already on PATH
84
85
  - Download the `scip` converter binary from [GitHub releases](https://github.com/scip-code/scip/releases) into `~/.cache/scip-cli/bin/` when not already on PATH
85
86
  - Walk the repo for `tsconfig*.json` project roots (TypeScript monorepos), run `scip-typescript` per project (parallel by default), convert each partial index, then merge into one `index.db`
86
87
 
@@ -88,11 +89,12 @@ No `.scip-cli.json` required for discovery. Subsequent queries read the cached d
88
89
 
89
90
  **Option B: Install indexers globally ahead of time**
90
91
 
91
- Same indexing steps as Option A; this only avoids `npx` download on the first run:
92
+ Same indexing steps as Option A; this only avoids the first-run download/build:
92
93
 
93
94
  ```bash
94
- # TypeScript/JavaScript indexer (also handles plain JS via --infer-tsconfig)
95
- npm install -g @sourcegraph/scip-typescript
95
+ # TypeScript/JavaScript indexer — fork with partial --files (required for incremental reindex)
96
+ git clone --depth 1 --branch feat/partial-files https://github.com/flesler/scip-typescript.git
97
+ cd scip-typescript && npm install --ignore-scripts && npm run build && npm install -g .
96
98
 
97
99
  # Python indexer
98
100
  npm install -g @sourcegraph/scip-python
@@ -133,7 +135,7 @@ scip-cli <command> [arguments]
133
135
  - `deps <symbol|file>` - Find outbound dependencies (what a symbol or file calls) (`--path`, `--paths-only`)
134
136
  - `members <symbol>` - List members of a class/interface (`--path`)
135
137
  - `analyze [target]` - SQL health dashboards (`--limit`, `--per-check-limit`, `--priority`, `--check`, `--include-tests`). No target: project-wide; directory or file path; symbol name. See [Finding easy wins with `analyze`](#finding-easy-wins-with-analyze).
136
- - `reindex` - Force re-indexing of the current project (`--path` to limit scope; repeatable)
138
+ - `reindex` - Force re-indexing (`--path`, `--tsconfig`, `--exclude`, `--fresh`, `--no-incremental`; incremental by default in git TS repos)
137
139
  - `skill [path]` - Install or dump the SKILL.md
138
140
 
139
141
  ### Examples
@@ -201,7 +203,10 @@ scip-cli deps greet --paths-only | sort -u
201
203
  3. Runs `scip-typescript` per project (in parallel when there are multiple projects; set `SCIP_CLI_INDEX_WORKERS=1` to force serial), `scip-python` for Python, `scip-go` for Go, or `rust-analyzer scip` for Rust
202
204
  4. Converts each SCIP output to SQLite with `scip expt-convert`, then merges partial databases when needed
203
205
  5. Caches the result in `~/.cache/scip-cli/projects/<dirname>-<hash>/index.db` (e.g. `my-monorepo-1a3f7a`)
204
- 6. Subsequent queries are SQLite lookups against that cache (not re-indexing)
206
+ 6. Compacts the database after each reindex (`VACUUM` + WAL checkpoint)
207
+ 7. Subsequent queries are SQLite lookups against that cache (not re-indexing)
208
+
209
+ **Incremental reindex (TypeScript, v3.0+):** plain `scip-cli reindex` in a git worktree is incremental by default — reuses unchanged tsconfig shards via `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`). Dirty shards reindex only changed files (git delta → importer closure → fork `--files`) and upsert into the live `index.db`. Use `--no-incremental` or `--fresh` for a full rebuild; `--unversioned` and non-git projects always full-reindex. Bench locally with `scripts/bench_incremental_gate.sh --branch fixture`.
205
210
 
206
211
  ## Configuration
207
212
 
@@ -228,27 +233,28 @@ Other environment variables:
228
233
  |`SCIP_CLI_MAX_HEAP_MB`|Node heap for `scip-typescript` / `scip-python` (overrides `maxHeapMb` in config)|
229
234
  |`SCIP_CLI_TS_INDEX_BATCH_SIZE`|Split large TS repos into multiple `scip-typescript` runs (default: all tsconfigs in one run)|
230
235
  |`SCIP_CLI_MERGE_BATCH_SIZE`|SQLite ATTACH batch size when merging part DBs (max 9)|
236
+ |`SCIP_CLI_INDEX_TIMING`|`1` — per-phase `INDEX_TIMING:` lines on stderr during reindex|
231
237
  |`SCIP_CLI_MAX_DEF_LINES`|Max definition lines in `code` output|
232
238
  |`SCIP_CLI_DEBUG`|Log SQL queries to stderr|
233
239
 
234
- **Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema. `scip-typescript` installs via npx from the GitHub fork in `scip_cli/indexing/constants.py` when not on PATH (until upstream ships incremental flags). `scip-python` via `npx` at latest; `scip-go` via `go install @latest`. `rust-analyzer` installs via `rustup component add`.
240
+ **Version policy:** only the `scip` converter (`expt-convert`) is pinned to the 0.8.x release line because it defines the SQLite schema. **TypeScript** uses [flesler/scip-typescript](https://github.com/flesler/scip-typescript) `feat/partial-files` (see `SCIP_TYPESCRIPT_NPX_PACKAGE` in `scip_cli/indexing/constants.py`) — auto-built when not on PATH; switch back to `@sourcegraph/scip-typescript` on npm once upstream merges `--files`. `scip-python` via `npx` at latest; `scip-go` via `go install @latest`. `rust-analyzer` installs via `rustup component add`.
235
241
 
236
242
  Large monorepos (>10 tsconfig projects) log per-project progress to stderr during indexing; smaller repos stay quiet aside from the final `Indexed … (size)` line.
237
243
 
238
244
  Scoped indexing without editing `.scip-cli.json`:
239
245
 
240
246
  ```bash
241
- scip-cli reindex --path packages/server
247
+ scip-cli reindex --path packages/core
242
248
  scip-cli reindex --path packages/api --path packages/worker
243
249
  scip-cli reindex --tsconfig 'apps/api/tsconfig.*.json'
244
250
  scip-cli reindex --tsconfig tsconfig.app.json --tsconfig tsconfig.spec.json
245
251
  scip-cli reindex --exclude '**/*.test.ts' '**/*.spec.ts'
246
252
  scip-cli reindex --exclude # clear persisted excludes
247
253
  scip-cli reindex --fresh # full index; clear metadata.json
248
- scip-cli reindex --incremental # reuse unchanged project shards (see SKILL for language support)
254
+ scip-cli reindex --no-incremental # full rebuild; clears shard manifest
249
255
  ```
250
256
 
251
- `--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are expanded inside the tool). File-based runs default to one `scip-typescript` process per file so each gets its own heap (`SCIP_CLI_TS_INDEX_BATCH_SIZE` still overrides). Cannot combine `--path` and `--tsconfig`. **TypeScript only.** Scope and exclude defaults are saved in `metadata.json` next to `index.db` and reused on later `reindex` runs; use `reindex --fresh` to clear them and restore a full index. `--exclude` updates the persisted exclude list; a lone bare `--exclude` clears it.
257
+ `--path` limits which discovered tsconfig **directories** are indexed (prefix match, same idea as query `--path`). `--tsconfig` skips discovery and indexes those `tsconfig*.json` **files** (repeatable; globs are repo-relative to the detected project root — run from monorepo root or shorten the glob). File-based runs default to one `scip-typescript` process per file so each gets its own heap (`SCIP_CLI_TS_INDEX_BATCH_SIZE` still overrides). Cannot combine `--path` and `--tsconfig`. **TypeScript only** for `--path` and `--tsconfig`. Scope and exclude defaults are saved in `metadata.json` next to `index.db` and reused on later `reindex` runs; use `reindex --fresh` to clear them and restore a full index. `--exclude` updates the persisted exclude list (honored during incremental reindex too); a lone bare `--exclude` clears it. Incremental is the default in git TypeScript repos; `--no-incremental`, `--fresh`, `--unversioned`, or non-git force full reindex.
252
258
 
253
259
  When a tsconfig (after `extends`) has `allowJs: true`, matching `.js`/`.jsx` files under that config's `include`/`files` are indexed too (same roots as `.ts`/`.tsx`). `allowJs: false` or unset leaves JavaScript out. JS-only repos with no `tsconfig.json` still use `--infer-tsconfig`.
254
260
 
@@ -317,35 +323,6 @@ Inspired by [scip-query](https://github.com/PlunderStruck/scip-query), scip-cli
317
323
 
318
324
  The speedup comes from using optimized direct SQLite queries and cutting some nice but very slow goodies (like ts-morph).
319
325
 
320
- ## Architecture
321
-
322
- ```
323
- scip_cli/
324
- ├── __init__.py
325
- ├── __main__.py # CLI entry point
326
- ├── cli_args.py # Shared argparse helpers
327
- ├── config.py # .scip-cli.json loader
328
- ├── discover.py # TypeScript project discovery
329
- ├── merge.py # SQLite index merging
330
- ├── scip_tool.py # scip binary download
331
- ├── sql.py # SQLite helpers
332
- ├── paths.py # --path scope filtering
333
- ├── project.py # Project root + language detection
334
- ├── cache.py # Index cache paths
335
- ├── metadata.py # Persisted reindex defaults (metadata.json)
336
- ├── scope.py # Scoped reindex helpers
337
- ├── debug.py # SCIP_CLI_DEBUG stderr helpers
338
- ├── indexing.py # SCIP index build + get_db
339
- ├── symbols.py # Symbol parsing and kinds
340
- ├── queries.py # Symbol/file SQL queries
341
- ├── source.py # Filesystem source reads
342
- ├── output.py # CLI formatting helpers
343
- ├── session.py # setup() and single-match resolution
344
- ├── targets.py # file-path heuristics (tests; analyze uses analyze/targets.py)
345
- ├── analyze/ # SQL dashboard queries (project/file/symbol)
346
- └── commands/ # Subcommand implementations
347
- ```
348
-
349
326
  ## Development
350
327
 
351
328
  ```bash
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: scip-cli
3
+ description: Read when needing symbol lookup or SQL health dashboards in code.
4
+ ---
5
+
6
+ TypeScript/JavaScript, Python, Go, Rust — not GraphQL, CSS, or other files. Run from project root.
7
+
8
+ **Contributors:** `pip install -e ".[dev]"` so bare `scip-cli` on PATH is this checkout.
9
+
10
+ ## Quick guide
11
+
12
+ |Question|Command|Output|
13
+ |---|---|---|
14
+ |Definition / body|`code X`|Snippet (default 80 lines/def; `members Class` for big types)|
15
+ |Usages|`refs X`|`file:line` refs|
16
+ |Symbols in file|`symbols file`|`start-end kind name` (bare filename ok)|
17
+ |Find by name|`search pattern`|Matching symbols|
18
+ |Who imports this file?|`rdeps file`|Importer paths|
19
+ |What does this use?|`deps target`|Outbound deps (symbol or file)|
20
+ |Class members|`members Class`|Methods/fields + line ranges|
21
+ |Health / risk|`analyze`|SQL dashboard — project, dir, file, or symbol|
22
+
23
+ Default `--limit` is **10** on query commands unless noted. Stdout = records; stderr = warnings/progress. Pipe with `--paths-only` / `--names-only`.
24
+
25
+ ## Gotchas
26
+
27
+ - **Bare names** — functions, types, classes. Members need qualifiers: `code Widget.run`, `members pkg.MyClass`. Consts/vars are not indexed — use `rg`. Class methods: `members Class`, not bare `code method`.
28
+ - **Ambiguity** — `code`/`refs` return up to `--limit` matches; `members`/`analyze` pick first with stderr warning. Narrow with dotted names or query `--path`.
29
+ - **Stale index** — run `reindex` after substantive edits (no auto-invalidation).
30
+ - **Query `--path` ≠ reindex scope** — query `--path` filters results only. `reindex --path` / `--tsconfig` persist TS scope and replace cache; full `reindex` restores.
31
+ - **Monorepos** — walks `tsconfig*.json` (skips `node_modules`, `.git`). Dedupes nested projects. Extra roots: `.scip-cli.json` (README). Query scope: `--path packages/api`.
32
+ - **allowJs** — when tsconfig `allowJs: true`, matching `.js`/`.jsx` under `include`/`files` are indexed. No root `tsconfig.json`: `--infer-tsconfig`.
33
+ - **First run** may auto-index (parallel by default, `SCIP_CLI_INDEX_WORKERS`). >10 tsconfigs log progress. Prerequisites: Node (TS/Python), Go, or Rust toolchain; `scip` converter auto-downloads. `brew install scip` is the wrong package.
34
+
35
+ ## Pipelines
36
+
37
+ |Goal|Pipeline|
38
+ |---|---|
39
+ |Blast radius|`scip-cli rdeps file.ts \|xargs -I{} scip-cli symbols {}`|
40
+ |Health briefing|`scip-cli analyze --limit 40 --per-check-limit 5`|
41
+ |Importer files|`scip-cli refs Foo --paths-only`|
42
+ |Symbols in importers|`scip-cli refs Foo --paths-only \|xargs -I{} scip-cli symbols {}`|
43
+ |Classes → members|`scip-cli search Handler --kind class --names-only \|xargs -I{} scip-cli members {}`|
44
+ |Members → defs|`scip-cli members Widget --names-only \|xargs -I{} scip-cli code Widget.{}`|
45
+ |Topic files|`scip-cli search Dynamo --paths-only`|
46
+ |Outbound files|`scip-cli deps file.ts --paths-only`|
47
+
48
+ `xargs` reopens the index each call — cap fan-out with `--limit` on the first command.
49
+
50
+ ## Commands
51
+
52
+ ### code
53
+
54
+ ```bash
55
+ code [--kind KIND] [--limit N] [--max-lines N] [--offset N] [--full] [--path PATH] [--snippet] [--line-numbers] <symbol> [...]
56
+ ```
57
+
58
+ `--kind`: `function`, `method`, `class`, `property`. Multiple symbols: each block prefixed on stdout. `--max-lines` per body (default 80; also 32k char cap unless `--full` or `--max-lines 0`). `--offset` is body-relative. `SCIP_CLI_MAX_DEF_LINES` overrides cap.
59
+
60
+ ### refs
61
+
62
+ ```bash
63
+ refs [--limit N] [--path PATH] [--paths-only] <symbol> [...]
64
+ ```
65
+
66
+ `file:line` per ref (reads source for lines). Multi-symbol groups prefixed on stdout.
67
+
68
+ ### search
69
+
70
+ ```bash
71
+ search [--kind KIND] [--limit N] [--path PATH] [--names-only] [--paths-only] <pattern> [...]
72
+ ```
73
+
74
+ `file:line kind name`. Patterns OR'd. Filters noisy symbols.
75
+
76
+ ### symbols
77
+
78
+ ```bash
79
+ symbols [--limit N] [--path PATH] <file>
80
+ ```
81
+
82
+ ### rdeps
83
+
84
+ ```bash
85
+ rdeps [--limit N] [--path PATH] <file>
86
+ ```
87
+
88
+ Bare importer paths on stdout.
89
+
90
+ ### deps
91
+
92
+ ```bash
93
+ deps [--limit N] [--path PATH] [--paths-only] <symbol|file>
94
+ ```
95
+
96
+ Symbol: deps inside definition range. File: external symbols referenced. Format `file:line symbol`; `--paths-only` dedupes files.
97
+
98
+ ### members
99
+
100
+ ```bash
101
+ members [--limit N] [--path PATH] [--names-only] <symbol>
102
+ ```
103
+
104
+ `start:end kind name`. Prefix match under parent; missing ranges filled from source when needed.
105
+
106
+ ### analyze
107
+
108
+ ```bash
109
+ analyze [--limit N] [--per-check-limit N] [--path PATH] [--include-tests] [--priority LEVEL] [--check NAME] [target]
110
+ ```
111
+
112
+ |Target|Scope|
113
+ |---|---|
114
+ |_(omit)_|Project dashboards|
115
+ |directory|Dir dashboards + per-file sections (indexed files under dir)|
116
+ |file|File dashboards + top symbols by external consumers|
117
+ |symbol|Pressure, consumers, deps, affected|
118
+
119
+ Priority **high → medium → low**. `--limit` = total finding rows (default 20); headers/truncation don't count. `--per-check-limit` caps each section. Agents: `--limit 40 --per-check-limit 5`. `--priority high` or `high,medium` (`1`/`2`/`3`) skips lower tiers. `--check NAME` (repeatable/comma) ANDs with priority.
120
+
121
+ **Easy wins:** cycles, dead exports, dead files (production). Stale types = types with no external refs. Dead = no cross-file refs in index, not `vulture`. Empty `rdeps` on a hit is often a SCIP miss — verify with `rg -F STEM` (basename in `(...)`, same-file hits ignored).
122
+
123
+ ### reindex
124
+
125
+ ```bash
126
+ reindex [--path DIR ...] [--tsconfig GLOB ...] [--exclude [GLOB ...]] [--fresh] [--no-incremental] [--unversioned] [--with-external]
127
+ ```
128
+
129
+ `--path` and `--tsconfig` are TS-only and mutually exclusive. `--tsconfig` globs expanded in-tool; one heap per file by default (`SCIP_CLI_TS_INDEX_BATCH_SIZE` overrides). Scope/exclude persist in `metadata.json`.
130
+
131
+ `--exclude GLOB` drops matching docs post-convert (repeatable; merges `.scip-cli.json` `excludeGlobs`). Bare `--exclude` clears list; `--exclude foo --exclude` keeps `foo`. No `/` = basename; with `/` = repo-relative.
132
+
133
+ `--fresh` clears persisted metadata (unless combined with scope flags on same command).
134
+
135
+ **Incremental by default** in git TypeScript repos: reuses `shards/manifest.json` (`git_commit` + per-shard `tsconfig_digest`); skips clean shards. Dirty: git delta ∪ importer closure → fork `--files` → upsert live `index.db`; deletions remove documents. `--no-incremental` or `--fresh` forces full reindex and clears the manifest. Non-git, `--unversioned`, or non-TypeScript projects always full-reindex.
@@ -1,3 +1,3 @@
1
1
  """scip-cli: Fast code intelligence via SCIP indexes."""
2
2
 
3
- __version__ = "2.12.0"
3
+ __version__ = "3.1.0"
@@ -196,10 +196,19 @@ def main() -> None:
196
196
  help="Ignore persisted metadata.json; clear it unless scope/exclude flags are set on this run",
197
197
  )
198
198
  reindex_parser.add_argument(
199
- "--incremental",
199
+ "--no-incremental",
200
200
  action="store_true",
201
201
  help=(
202
- "Reuse cached per-project index parts when inputs are unchanged (full reindex clears the incremental cache)"
202
+ "Full reindex every shard and clear the shard manifest "
203
+ "(default: incremental in git TypeScript repos; --fresh also forces full)"
204
+ ),
205
+ )
206
+ reindex_parser.add_argument(
207
+ "--unversioned",
208
+ action="store_true",
209
+ help=(
210
+ "Discover sources via on-disk glob instead of git (persisted in metadata.json; "
211
+ "for tarballs or when gitignored files must be indexed). Cleared by reindex --fresh"
203
212
  ),
204
213
  )
205
214
  reindex_parser.add_argument(
@@ -12,12 +12,32 @@ from ..cache import (
12
12
  )
13
13
  from ..indexing import index_project, log_index_complete
14
14
  from ..indexing.shards import clear_shard_cache
15
- from ..metadata import UNSET, apply_metadata_updates
15
+ from ..indexing.source_discovery import is_versioned_repo
16
+ from ..metadata import UNSET, apply_metadata_updates, index_unversioned
16
17
  from ..paths import normalize_path_scope
17
18
  from ..project import Language, find_project_root_and_language
19
+ from ..sql import finalize_index_db
18
20
  from ..tsconfig import expand_tsconfig_patterns
19
21
 
20
22
 
23
+ def _resolve_incremental(
24
+ root,
25
+ lang,
26
+ *,
27
+ fresh: bool,
28
+ no_incremental: bool,
29
+ unversioned: bool,
30
+ ) -> bool:
31
+ """Incremental reindex when eligible; full reindex otherwise."""
32
+ if fresh or no_incremental:
33
+ return False
34
+ if lang != Language.TYPESCRIPT:
35
+ return False
36
+ if unversioned or index_unversioned(root):
37
+ return False
38
+ return is_versioned_repo(root)
39
+
40
+
21
41
  def main(args):
22
42
  root, lang = find_project_root_and_language()
23
43
  if not root:
@@ -28,13 +48,15 @@ def main(args):
28
48
  tsconfig_args = getattr(args, "tsconfig", None) or []
29
49
  exclude_groups = getattr(args, "exclude", None)
30
50
  fresh = getattr(args, "fresh", False)
31
- incremental = getattr(args, "incremental", False)
32
- if incremental and fresh:
33
- print("Error: reindex --incremental and --fresh cannot be combined", file=sys.stderr)
34
- sys.exit(1)
35
- if incremental and lang is not None and lang != Language.TYPESCRIPT:
36
- print("Error: reindex --incremental is only supported for TypeScript projects", file=sys.stderr)
37
- sys.exit(1)
51
+ no_incremental = getattr(args, "no_incremental", False)
52
+ unversioned = getattr(args, "unversioned", False)
53
+ incremental = _resolve_incremental(
54
+ root,
55
+ lang,
56
+ fresh=fresh,
57
+ no_incremental=no_incremental,
58
+ unversioned=unversioned,
59
+ )
38
60
  if path_args and tsconfig_args:
39
61
  print("Error: reindex --path and --tsconfig cannot be combined", file=sys.stderr)
40
62
  sys.exit(1)
@@ -52,14 +74,11 @@ def main(args):
52
74
  sys.exit(1)
53
75
  scope_paths = [path.as_posix() for path in tsconfig_paths]
54
76
  scope_update = scope_paths
55
- print(f"Index scope: {', '.join(scope_paths)}", file=sys.stderr)
56
- print(
57
- (
58
- "Warning: scoped reindex replaces the cache with only these tsconfig files; "
59
- "run reindex --fresh to restore the full index"
60
- ),
61
- file=sys.stderr,
62
- )
77
+ if len(scope_paths) == 1:
78
+ print(f"Index scope: {scope_paths[0]}", file=sys.stderr)
79
+ else:
80
+ patterns = ", ".join(tsconfig_args)
81
+ print(f"Index scope: {patterns} ({len(scope_paths)} tsconfigs)", file=sys.stderr)
63
82
  elif path_args:
64
83
  scope_paths: list[str] = []
65
84
  for path in path_args:
@@ -69,14 +88,10 @@ def main(args):
69
88
  sys.exit(1)
70
89
  scope_paths.append(normalized)
71
90
  scope_update = scope_paths
72
- print(f"Index scope: {', '.join(scope_paths)}", file=sys.stderr)
73
- print(
74
- (
75
- "Warning: scoped reindex replaces the cache with only these projects; "
76
- "run reindex --fresh to restore the full index"
77
- ),
78
- file=sys.stderr,
79
- )
91
+ if len(scope_paths) == 1:
92
+ print(f"Index scope: {scope_paths[0]}", file=sys.stderr)
93
+ else:
94
+ print(f"Index scope: {len(scope_paths)} paths", file=sys.stderr)
80
95
 
81
96
  exclude_update: list[str] | object = UNSET
82
97
  if exclude_groups is not None:
@@ -98,6 +113,7 @@ def main(args):
98
113
  fresh=fresh,
99
114
  scope_paths=scope_update,
100
115
  exclude_globs=exclude_update,
116
+ unversioned=unversioned if unversioned else UNSET,
101
117
  )
102
118
  cleanup_in_progress_index(cache_dir)
103
119
  if fresh or not incremental:
@@ -110,7 +126,7 @@ def main(args):
110
126
  os.environ["SCIP_CLI_KEEP_EXTERNAL"] = "1"
111
127
 
112
128
  started = time.perf_counter()
113
- _output_db, skipped, total = index_project(
129
+ _output_db, skipped, total, promote = index_project(
114
130
  root,
115
131
  lang,
116
132
  cache_dir,
@@ -124,13 +140,26 @@ def main(args):
124
140
  print(f"Error: {e}", file=sys.stderr)
125
141
  sys.exit(1)
126
142
 
127
- next_db = index_db_path(cache_dir, replace=True)
128
- if not next_db.is_file():
143
+ live_db = index_db_path(cache_dir, replace=False)
144
+ from scip_cli.indexing.performance import phase
145
+
146
+ if promote:
147
+ next_db = index_db_path(cache_dir, replace=True)
148
+ if not next_db.is_file():
149
+ cleanup_in_progress_index(cache_dir)
150
+ print("Error: No index.db found after indexing", file=sys.stderr)
151
+ sys.exit(1)
152
+ with phase("finalize"):
153
+ finalize_index_db(next_db)
154
+ with phase("promote"):
155
+ promote_next_index(cache_dir)
156
+ elif live_db.is_file():
157
+ with phase("finalize"):
158
+ finalize_index_db(live_db)
159
+ elif not live_db.is_file():
129
160
  cleanup_in_progress_index(cache_dir)
130
161
  print("Error: No index.db found after indexing", file=sys.stderr)
131
162
  sys.exit(1)
132
-
133
- promote_next_index(cache_dir)
134
163
  log_index_complete(
135
164
  index_db_path(cache_dir, replace=False),
136
165
  lang.value,
@@ -88,3 +88,15 @@ def path_matches_any_glob(relative_path: str, patterns: tuple[str, ...] | list[s
88
88
  if not patterns:
89
89
  return False
90
90
  return any(path_matches_glob(relative_path, pattern) for pattern in patterns)
91
+
92
+
93
+ def filter_excluded_paths(
94
+ paths: tuple[str, ...] | frozenset[str] | list[str],
95
+ exclude_globs: tuple[str, ...],
96
+ ) -> tuple[str, ...]:
97
+ """Drop repo-relative paths that match persisted/config exclude globs."""
98
+ if not exclude_globs:
99
+ if isinstance(paths, tuple):
100
+ return paths
101
+ return tuple(sorted(paths))
102
+ return tuple(sorted(path for path in paths if not path_matches_any_glob(path, exclude_globs)))
@@ -8,11 +8,11 @@ SCIP_INSTALL_URL = "https://github.com/scip-code/scip/releases"
8
8
  # Language indexers (npx / go install) use latest on first use.
9
9
  # The scip expt-convert binary is pinned separately in scip_tool.py (DB schema).
10
10
  #
11
- # scip-typescript npx fallback (when the binary is not on PATH). Fork adds
12
- # --incremental / --ts-build-info-dir for reindex --incremental. Switch back to
13
- # @sourcegraph/scip-typescript once upstream merges and releases; otherwise
14
- # publish the fork to npm long-term.
15
- SCIP_TYPESCRIPT_NPX_PACKAGE = "github:flesler/scip-typescript#feat/incremental-tsc"
11
+ # TODO: Remove github_npm.py and runners github: branch when switching back to upstream npm.
12
+ # scip-typescript npx fallback (when the binary is not on PATH). Fork adds --files
13
+ # for partial document indexing. Pin >= ce6e9c9.
14
+ SCIP_TYPESCRIPT_NPX_PACKAGE = "github:flesler/scip-typescript#feat/partial-files"
15
+
16
16
  # scip-typescript accepts many tsconfig paths per invocation (one .scip, one convert, no merge).
17
17
  # Split only when SCIP_CLI_TS_INDEX_BATCH_SIZE is set (OOM/timeout tuning).
18
18
  DEFAULT_TS_INDEX_BATCH_SIZE = None