indexer-cli 0.12.14 → 0.12.16
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.
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ right code.
|
|
|
7
7
|
|
|
8
8
|
The main feature of `indexer-cli` is not just search on its own: it turns your repository into something coding agents
|
|
9
9
|
can navigate efficiently. Running `idx init` installs a project-local discovery skill so Claude, OpenCode, and similar
|
|
10
|
-
tools can pick the right indexed workflow instead of wasting tokens on blind `grep`, `find`, and repeated file reads.
|
|
10
|
+
tools can pick the right indexed workflow instead of wasting tokens on blind `rg`/`grep`, `find`, and repeated file reads.
|
|
11
11
|
|
|
12
12
|
Under the hood, `indexer-cli` indexes source code, generates vector embeddings through a local Ollama instance, and
|
|
13
13
|
stores everything in a per-project `.indexer-cli/` directory. That gives both humans and agents fast natural-language
|
|
@@ -79,7 +79,7 @@ before they start burning tokens on broad filesystem scans.
|
|
|
79
79
|
|
|
80
80
|
## Why agents save tokens with this
|
|
81
81
|
|
|
82
|
-
Without repo-local skills, agents often spend tokens on repetitive repository discovery: broad `grep`, repeated file
|
|
82
|
+
Without repo-local skills, agents often spend tokens on repetitive repository discovery: broad `rg`/`grep`, repeated file
|
|
83
83
|
reads, and trial-and-error navigation. With `indexer-cli`, agents can load one focused discovery skill and start from
|
|
84
84
|
the right indexed path immediately.
|
|
85
85
|
|
|
@@ -107,7 +107,7 @@ idx architecture
|
|
|
107
107
|
All discovery commands return human-readable text output, optimized for coding agents.
|
|
108
108
|
|
|
109
109
|
This is especially useful in Claude and OpenCode setups, where project-local skills can guide the agent away from
|
|
110
|
-
blind `grep`/`find` usage and toward indexed discovery, which usually means less wasted context and lower token usage
|
|
110
|
+
blind `rg`/`grep`/`find` usage and toward indexed discovery, which usually means less wasted context and lower token usage
|
|
111
111
|
during repo discovery.
|
|
112
112
|
|
|
113
113
|
## CLI Commands
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GENERATED_SKILL_DIRECTORIES = exports.DEPRECATED_SKILL_DIRECTORIES = exports.GENERATED_SKILLS = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: "repo-discovery",
|
|
7
|
-
directory: "repo-discovery",
|
|
8
|
-
content: `---
|
|
4
|
+
function buildRepoDiscoverySkillContent() {
|
|
5
|
+
return `---
|
|
9
6
|
name: repo-discovery
|
|
10
|
-
description: FIRST choice for repository discovery and code understanding. Use this to choose the cheapest indexed path for architecture, structure, behavior, symbol, AST, or dependency questions before broad file reads or
|
|
11
|
-
allowed-tools: Bash(idx architecture:*), Bash(idx structure:*), Bash(idx ast:*), Bash(idx search:*), Bash(idx explain:*), Bash(idx deps:*)
|
|
7
|
+
description: FIRST choice for repository discovery and code understanding. Use this to choose the cheapest indexed path for architecture, structure, behavior, symbol, AST, or dependency questions before broad file reads or blind text search.
|
|
8
|
+
allowed-tools: Bash(idx architecture:*), Bash(idx structure:*), Bash(idx ast:*), Bash(idx search:*), Bash(idx explain:*), Bash(idx deps:*), Bash(rg:*), Bash(grep:*)
|
|
12
9
|
---
|
|
13
10
|
|
|
14
11
|
# Use repo-discovery as the indexed entry point
|
|
@@ -21,7 +18,7 @@ Pick the single cheapest command that answers the question, run it, and stop whe
|
|
|
21
18
|
|
|
22
19
|
- \`idx architecture\` — repo shape, entry points, module boundaries, cycle causes, unresolved dependency classes
|
|
23
20
|
- \`idx structure\` — file trees, exported symbols with line ranges, contents of a directory/module
|
|
24
|
-
- \`idx ast <file>\` — compact syntax tree for one large file when
|
|
21
|
+
- \`idx ast <file>\` — compact syntax tree for one large file; use before repeated reads when ranges are coarse or JSX/parent structure matters
|
|
25
22
|
- \`idx search\` — conceptual behavior questions like "how does X work?"; returns ranked file ranges plus \`why=\` reason codes
|
|
26
23
|
- \`idx explain\` — a known symbol when you want indexed explanation
|
|
27
24
|
- \`idx deps\` — imported-by/imports or impact for a known path/module
|
|
@@ -33,7 +30,7 @@ Pick the single cheapest command that answers the question, run it, and stop whe
|
|
|
33
30
|
- Use \`--path-prefix\` whenever the subsystem is known, e.g. \`src/api/\`, \`src/auth/\`.
|
|
34
31
|
- For \`idx structure\`, also narrow with \`--kind\` when possible.
|
|
35
32
|
- If \`idx structure\` prints \`TRUNC\`/\`NEXT\`, run the \`NEXT\` command only when the hidden page is still relevant.
|
|
36
|
-
- Use \`idx ast <file>\`
|
|
33
|
+
- Use \`idx ast <file>\` after you know a large file is relevant and need a map before reading ranges; if you are about to make a second overlapping \`Read\` on that file, run \`idx ast\` first.
|
|
37
34
|
- If \`idx ast\` prints \`TRUNC\`/\`NEXT\`, run \`NEXT\` only when the hidden nodes are still relevant.
|
|
38
35
|
- For \`idx deps\`, start with \`--depth 1\`; increase only if first-hop impact is insufficient.
|
|
39
36
|
- For \`idx explain\`, prefer \`file::symbol\` when the name may be ambiguous.
|
|
@@ -43,17 +40,17 @@ Pick the single cheapest command that answers the question, run it, and stop whe
|
|
|
43
40
|
- Do **not** run \`idx explain\` as a prelude to reading a file you already know you need.
|
|
44
41
|
- Do **not** chain discovery steps mechanically (\`search → explain\`, \`explain → Read\`) when direct reading is cheaper.
|
|
45
42
|
|
|
46
|
-
## Use idx vs
|
|
43
|
+
## Use idx vs exact text search/LSP
|
|
47
44
|
|
|
48
45
|
idx is **semantic** search: use it when you do **not** know the exact name and need to find code by meaning.
|
|
49
46
|
|
|
50
|
-
Use
|
|
51
|
-
- exact identifier name → \`grep\`, \`lsp_symbols\`, or references/definition tools
|
|
47
|
+
Use exact text search/LSP when the target is already concrete:
|
|
48
|
+
- exact identifier name → \`rg\` (preferred), \`grep\`, \`lsp_symbols\`, or references/definition tools
|
|
52
49
|
- exact small file path → \`Read\`
|
|
53
|
-
- exact large file path + unknown internal layout → \`idx ast <file>\`, then read the smallest ranges
|
|
50
|
+
- exact large file path + unknown internal layout or nested JSX → \`idx ast <file>\`, then read the smallest ranges
|
|
54
51
|
- known file + known symbol → \`idx explain file::symbol\` or LSP if exact lookup is enough
|
|
55
52
|
|
|
56
|
-
Rule of thumb: if you can write an exact search pattern, use \`
|
|
53
|
+
Rule of thumb: avoid broad blind \`rg\`/\`grep\`/\`find\` during discovery, but if you can write an exact search pattern, use \`rg\`/LSP. Use idx for exploration, not lookup.
|
|
57
54
|
|
|
58
55
|
## Query guidance
|
|
59
56
|
|
|
@@ -99,12 +96,12 @@ idx deps src/api/client.ts --show-edges
|
|
|
99
96
|
idx search "MyType" --path-prefix src/models/
|
|
100
97
|
|
|
101
98
|
# Better: exact lookup is cheaper
|
|
102
|
-
|
|
99
|
+
rg -n "MyType" src/models/
|
|
103
100
|
\`\`\`
|
|
104
101
|
|
|
105
102
|
## Skip idx when
|
|
106
103
|
|
|
107
|
-
- you already know the exact file to read
|
|
104
|
+
- you already know the exact small file/range to read
|
|
108
105
|
- you need an exact identifier lookup
|
|
109
106
|
- you already know the file and want document-local symbols/usages
|
|
110
107
|
- you are done discovering and are now editing or validating code
|
|
@@ -117,7 +114,13 @@ grep "MyType" src/models/
|
|
|
117
114
|
- Search: \`idx search <query> [--max-files <n>] [--path-prefix <area>] [--chunk-types <types|api|impl|tests|imports>] [--mode hybrid|semantic|lexical|symbol] [--min-score <score>] [--include-content] [--include-imports] [--dedupe-file] [--dedupe-symbol] [--cluster] [--exclude-tests] [--include-tests]\`
|
|
118
115
|
- Explain: \`idx explain <symbol|file::symbol> [--path-prefix <area>] [--include-fixtures] [--include-body] [--body-lines <n>] [--signature-only]\`
|
|
119
116
|
- Deps: \`idx deps <path> [--direction callers|callees|both] [--depth <n>] [--show-edges] [--tests]\`
|
|
120
|
-
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
exports.GENERATED_SKILLS = [
|
|
120
|
+
{
|
|
121
|
+
name: "repo-discovery",
|
|
122
|
+
directory: "repo-discovery",
|
|
123
|
+
content: buildRepoDiscoverySkillContent(),
|
|
121
124
|
},
|
|
122
125
|
];
|
|
123
126
|
exports.DEPRECATED_SKILL_DIRECTORIES = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/cli/commands/skills.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/cli/commands/skills.ts"],"names":[],"mappings":";;;AAMA,SAAS,8BAA8B;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHP,CAAC;AACF,CAAC;AAEY,QAAA,gBAAgB,GAAqB;IACjD;QACC,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,gBAAgB;QAC3B,OAAO,EAAE,8BAA8B,EAAE;KACzC;CACD,CAAC;AAEW,QAAA,4BAA4B,GAAG;IAC3C,cAAc;IACd,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,kBAAkB;CAClB,CAAC;AAEW,QAAA,2BAA2B,GAAG,wBAAgB,CAAC,GAAG,CAC9D,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SKILLS_VERSION =
|
|
1
|
+
export declare const SKILLS_VERSION = 503726199;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills-version.js","sourceRoot":"","sources":["../../src/core/skills-version.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"skills-version.js","sourceRoot":"","sources":["../../src/core/skills-version.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,SAAS,CAAC"}
|