indexer-cli 0.2.12 → 0.3.4
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 +24 -18
- package/dist/cli/commands/init.js +27 -9
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/skill-template.md +17 -28
- package/dist/cli/commands/skills.d.ts +7 -0
- package/dist/cli/commands/skills.js +207 -0
- package/dist/cli/commands/skills.js.map +1 -0
- package/dist/cli/commands/uninstall.js +7 -4
- package/dist/cli/commands/uninstall.js.map +1 -1
- package/package.json +50 -50
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# indexer-cli
|
|
2
2
|
|
|
3
|
-
Project indexer that installs
|
|
3
|
+
Project indexer that installs focused discovery skills for coding agents and helps them spend fewer tokens finding the
|
|
4
4
|
right code.
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
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
|
-
can navigate efficiently. Running `indexer-cli init` installs
|
|
10
|
-
OpenCode, and similar tools
|
|
9
|
+
can navigate efficiently. Running `indexer-cli init` installs project-local discovery skills with semantic names so
|
|
10
|
+
Claude, OpenCode, and similar tools can pick the right indexed workflow instead of wasting tokens on blind `grep`,
|
|
11
11
|
`find`, and repeated file reads.
|
|
12
12
|
|
|
13
13
|
Under the hood, `indexer-cli` indexes source code, generates vector embeddings through a local Ollama instance, and
|
|
@@ -16,7 +16,7 @@ search, repo structure snapshots, and low-friction incremental reindexing withou
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- **Code-agent repo
|
|
19
|
+
- **Code-agent repo skills**: `init` installs focused autonomous discovery skills for Claude and OpenCode workflows
|
|
20
20
|
- **Token savings for agents**: Pushes agents toward indexed discovery instead of expensive blind search and repeated
|
|
21
21
|
context loading
|
|
22
22
|
- **Multi-language support**: TypeScript/JavaScript, Python, C#, GDScript, Ruby
|
|
@@ -40,7 +40,7 @@ search, repo structure snapshots, and low-friction incremental reindexing withou
|
|
|
40
40
|
# 1. Check prerequisites and prepare the embedding model
|
|
41
41
|
npx indexer-cli setup
|
|
42
42
|
|
|
43
|
-
# 2. Initialize indexing and install the
|
|
43
|
+
# 2. Initialize indexing and install the discovery skills
|
|
44
44
|
cd /path/to/your/project
|
|
45
45
|
npx indexer-cli init
|
|
46
46
|
|
|
@@ -51,15 +51,17 @@ npx indexer-cli index
|
|
|
51
51
|
npx indexer-cli search "authentication middleware" --txt
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
After `init`, the repo
|
|
54
|
+
After `init`, the repo contains focused skills like `.claude/skills/semantic-search/SKILL.md`,
|
|
55
|
+
`.claude/skills/repo-structure/SKILL.md`, `.claude/skills/repo-context/SKILL.md`, and
|
|
56
|
+
`.claude/skills/dependency-trace/SKILL.md`, so coding agents can load the right indexed discovery workflow for
|
|
55
57
|
`npx indexer-cli search`, `npx indexer-cli structure`, `npx indexer-cli architecture`, `npx indexer-cli context`,
|
|
56
58
|
`npx indexer-cli explain`, and `npx indexer-cli deps` before they start burning tokens on broad filesystem scans.
|
|
57
59
|
|
|
58
60
|
## Why agents save tokens with this
|
|
59
61
|
|
|
60
|
-
Without
|
|
61
|
-
reads, and trial-and-error navigation. With `indexer-cli`,
|
|
62
|
-
|
|
62
|
+
Without repo-local skills, agents often spend tokens on repetitive repository discovery: broad `grep`, repeated file
|
|
63
|
+
reads, and trial-and-error navigation. With `indexer-cli`, agents can load a focused skill that matches the current
|
|
64
|
+
discovery intent and start from indexed search or structure-aware commands immediately.
|
|
63
65
|
|
|
64
66
|
In practice, that means:
|
|
65
67
|
|
|
@@ -70,23 +72,23 @@ In practice, that means:
|
|
|
70
72
|
|
|
71
73
|
## Agent Integration
|
|
72
74
|
|
|
73
|
-
When you run `npx indexer-cli init`, the CLI creates
|
|
74
|
-
`.claude/skills
|
|
75
|
+
When you run `npx indexer-cli init`, the CLI creates focused discovery skills for each major read-only discovery
|
|
76
|
+
command under `.claude/skills/` and adds `.claude/` to `.gitignore`.
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
Those skills cover repository discovery flows such as:
|
|
77
79
|
|
|
78
80
|
```bash
|
|
79
81
|
npx indexer-cli search "<query>"
|
|
80
82
|
npx indexer-cli structure --path-prefix src/<area>
|
|
81
83
|
npx indexer-cli architecture
|
|
82
|
-
npx indexer-cli
|
|
84
|
+
npx indexer-cli context --scope relevant-to:src/<area>
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
By default, discovery commands now return JSON. Use `--txt` whenever you want human-readable output instead.
|
|
86
88
|
|
|
87
89
|
This is especially useful in Claude and OpenCode setups, where project-local skills can guide the agent away from
|
|
88
|
-
blind `grep`/`find` usage and toward indexed
|
|
89
|
-
|
|
90
|
+
blind `grep`/`find` usage and toward indexed discovery, which usually means less wasted context and lower token usage
|
|
91
|
+
during repo discovery.
|
|
90
92
|
|
|
91
93
|
## CLI Commands
|
|
92
94
|
|
|
@@ -98,8 +100,12 @@ appropriate, but Ollama itself must be installed manually first. Works on macOS
|
|
|
98
100
|
### `npx indexer-cli init`
|
|
99
101
|
|
|
100
102
|
Create the `.indexer-cli/` directory, initialize the SQLite database and LanceDB vector store, and add `.indexer-cli/`
|
|
101
|
-
to `.gitignore` in the current working directory. Also writes
|
|
102
|
-
|
|
103
|
+
to `.gitignore` in the current working directory. Also writes focused discovery skills under `.claude/skills/` and
|
|
104
|
+
adds `.claude/` to `.gitignore`.
|
|
105
|
+
|
|
106
|
+
| Option | Description |
|
|
107
|
+
|---------------------|---------------------------------------------------------------------------------|
|
|
108
|
+
| `--refresh-skills` | Remove this CLI's generated skills under `.claude/skills/` and recreate them |
|
|
103
109
|
|
|
104
110
|
### `npx indexer-cli index`
|
|
105
111
|
|
|
@@ -190,7 +196,7 @@ of changes and understanding dependency chains.
|
|
|
190
196
|
### `npx indexer-cli uninstall`
|
|
191
197
|
|
|
192
198
|
Remove the `.indexer-cli/` directory from the current working directory. Also removes the generated
|
|
193
|
-
`.claude/skills
|
|
199
|
+
`.claude/skills/` directories created by `indexer-cli` when present. Prompts for confirmation unless `-f` is given.
|
|
194
200
|
|
|
195
201
|
## License
|
|
196
202
|
|
|
@@ -14,7 +14,7 @@ const sqlite_js_1 = require("../../storage/sqlite.js");
|
|
|
14
14
|
const vectors_js_1 = require("../../storage/vectors.js");
|
|
15
15
|
const help_text_js_1 = require("../help-text.js");
|
|
16
16
|
const ensure_indexed_js_1 = require("./ensure-indexed.js");
|
|
17
|
-
const
|
|
17
|
+
const skills_js_1 = require("./skills.js");
|
|
18
18
|
const HOOK_MARKER_START = "# >>> indexer-cli >>>";
|
|
19
19
|
const HOOK_MARKER_END = "# <<< indexer-cli <<<";
|
|
20
20
|
const HOOK_BLOCK = `\n${HOOK_MARKER_START}\nnohup npx indexer-cli index > /dev/null 2>&1 &\n${HOOK_MARKER_END}\n`;
|
|
@@ -27,12 +27,24 @@ async function pathExists(targetPath) {
|
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
async function writeClaudeSkills(projectRoot, skills = skills_js_1.GENERATED_SKILLS) {
|
|
31
|
+
for (const skill of skills) {
|
|
32
|
+
const skillDir = node_path_1.default.join(projectRoot, ".claude", "skills", skill.directory);
|
|
33
|
+
await (0, promises_1.mkdir)(skillDir, { recursive: true });
|
|
34
|
+
const skillPath = node_path_1.default.join(skillDir, "SKILL.md");
|
|
35
|
+
await (0, promises_1.writeFile)(skillPath, skill.content, "utf8");
|
|
36
|
+
console.log(` Skill: ${skillPath}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function refreshClaudeSkills(projectRoot, skillDirectories = skills_js_1.GENERATED_SKILL_DIRECTORIES, skills = skills_js_1.GENERATED_SKILLS) {
|
|
40
|
+
for (const skillDirectory of skillDirectories) {
|
|
41
|
+
const skillDir = node_path_1.default.join(projectRoot, ".claude", "skills", skillDirectory);
|
|
42
|
+
if (await pathExists(skillDir)) {
|
|
43
|
+
await (0, promises_1.rm)(skillDir, { recursive: true, force: true });
|
|
44
|
+
console.log(` Removed stale skill: ${skillDir}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
await writeClaudeSkills(projectRoot, skills);
|
|
36
48
|
}
|
|
37
49
|
async function ensureGitignoreEntries(projectRoot, entries) {
|
|
38
50
|
const gitignorePath = node_path_1.default.join(projectRoot, ".gitignore");
|
|
@@ -81,8 +93,9 @@ function registerInitCommand(program) {
|
|
|
81
93
|
program
|
|
82
94
|
.command("init")
|
|
83
95
|
.description("Initialize indexer storage for a project")
|
|
96
|
+
.option("--refresh-skills", "remove this CLI's generated skills and recreate them under .claude/skills")
|
|
84
97
|
.addHelpText("after", `\n${help_text_js_1.PROJECT_ROOT_COMMAND_HELP}\n`)
|
|
85
|
-
.action(async () => {
|
|
98
|
+
.action(async (options) => {
|
|
86
99
|
const resolvedProjectPath = process.cwd();
|
|
87
100
|
const dataDir = node_path_1.default.join(resolvedProjectPath, ".indexer-cli");
|
|
88
101
|
const dbPath = node_path_1.default.join(dataDir, "db.sqlite");
|
|
@@ -108,7 +121,12 @@ function registerInitCommand(program) {
|
|
|
108
121
|
]);
|
|
109
122
|
await ensurePostCommitHook(resolvedProjectPath);
|
|
110
123
|
console.log(`Initialized indexer-cli in ${resolvedProjectPath}`);
|
|
111
|
-
|
|
124
|
+
if (options?.refreshSkills) {
|
|
125
|
+
await refreshClaudeSkills(resolvedProjectPath);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
await writeClaudeSkills(resolvedProjectPath);
|
|
129
|
+
}
|
|
112
130
|
console.log(` SQLite: ${dbPath}`);
|
|
113
131
|
console.log(` Config: ${configPath}`);
|
|
114
132
|
await (0, ensure_indexed_js_1.ensureIndexed)(metadata, resolvedProjectPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":";;;;;AA2HA,kDA2EC;AAtMD,qCAAmD;AACnD,+CAO0B;AAC1B,0DAA6B;AAE7B,oDAA8C;AAC9C,oDAAkD;AAClD,sDAAwD;AACxD,uDAA8D;AAC9D,yDAAgE;AAChE,kDAA4D;AAC5D,2DAAoD;AACpD,2CAA4E;AAE5E,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAClD,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAChD,MAAM,UAAU,GAAG,KAAK,iBAAiB,qDAAqD,eAAe,IAAI,CAAC;AAElH,KAAK,UAAU,UAAU,CAAC,UAAkB;IAC3C,IAAI,CAAC;QACJ,MAAM,IAAA,iBAAM,EAAC,UAAU,EAAE,mBAAW,CAAC,IAAI,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC/B,WAAmB,EACnB,MAAM,GAAG,4BAAgB;IAEzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CACzB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,KAAK,CAAC,SAAS,CACf,CAAC;QACF,MAAM,IAAA,gBAAK,EAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,MAAM,SAAS,GAAG,mBAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAClD,MAAM,IAAA,oBAAS,EAAC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,YAAY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,CAAC;gBACzC,MAAM,IAAA,aAAE,EAAC,iBAAiB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC9D,OAAO,CAAC,GAAG,CACV,uCAAuC,iBAAiB,EAAE,CAC1D,CAAC;YACH,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,CAAC,KAAK,CAAC,iCAAiC,OAAO,EAAE,CAAC,CAAC;YAC1D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACtB,CAAC;gBAAS,CAAC;YACV,IAAI,QAAQ,EAAE,CAAC;gBACd,MAAM,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC/C,CAAC;YACD,IAAI,OAAO,EAAE,CAAC;gBACb,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YAC9C,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: repo-discovery
|
|
3
|
-
description:
|
|
3
|
+
description: REQUIRED: use indexer-cli first for repo discovery in this repository, before grep/glob/find or broad file reads when finding implementations, tracing symbols or behavior, mapping structure, or exploring unfamiliar code.
|
|
4
4
|
allowed-tools: Bash(npx indexer-cli:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# MANDATORY: use indexer-cli first for repo discovery
|
|
8
8
|
|
|
9
|
-
Use this skill for
|
|
10
|
-
|
|
9
|
+
Use this skill for discovery work in this repo.
|
|
10
|
+
Auto-load it for requests to find, trace, inspect, understand, or map code here.
|
|
11
11
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
Always start with indexer-cli for repository discovery.
|
|
15
|
-
Do not use grep, glob, or find unless indexer-cli was insufficient or you need an exact literal match after narrowing
|
|
16
|
-
the area.
|
|
17
|
-
|
|
18
|
-
## Auto-load triggers
|
|
19
|
-
|
|
20
|
-
Load this skill automatically for prompts like:
|
|
12
|
+
## Auto-load when
|
|
21
13
|
|
|
22
14
|
- Find where something is implemented in this repo
|
|
23
15
|
- Trace a symbol, handler, feature, or behavior through the codebase
|
|
@@ -26,23 +18,19 @@ Load this skill automatically for prompts like:
|
|
|
26
18
|
- Map entry points, dependencies, callers, or imports
|
|
27
19
|
- Explore the codebase when the right file is not known yet
|
|
28
20
|
|
|
29
|
-
##
|
|
21
|
+
## Rules
|
|
30
22
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- You need structure, entry points, or dependency context
|
|
35
|
-
- The task is exploratory and you do not yet know the right file
|
|
23
|
+
- Start with `indexer-cli`.
|
|
24
|
+
- Do not start with `grep`, `glob`, `find`, or repeated full-file reads.
|
|
25
|
+
- Use literal search only after `indexer-cli` narrows the area or when the exact file is already known.
|
|
36
26
|
|
|
37
|
-
## Skip
|
|
27
|
+
## Skip when
|
|
38
28
|
|
|
39
29
|
- The exact file is already known and the task stays inside it
|
|
40
30
|
- You only need an exact literal text match
|
|
41
31
|
- The task is outside this repository
|
|
42
32
|
|
|
43
|
-
## First
|
|
44
|
-
|
|
45
|
-
Run one of these first:
|
|
33
|
+
## First commands
|
|
46
34
|
|
|
47
35
|
```bash
|
|
48
36
|
npx indexer-cli search "<query>"
|
|
@@ -53,11 +41,14 @@ npx indexer-cli structure --kind class
|
|
|
53
41
|
npx indexer-cli architecture
|
|
54
42
|
```
|
|
55
43
|
|
|
56
|
-
## Reading
|
|
44
|
+
## Reading results
|
|
57
45
|
|
|
58
46
|
`npx indexer-cli search` returns ranked code chunks as JSON by default, not whole files.
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
Default fields: `filePath`, `startLine`, `endLine`, `score`, `primarySymbol`.
|
|
48
|
+
Add `--include-content` only when needed.
|
|
49
|
+
|
|
50
|
+
- Prefer default JSON output for agent workflows.
|
|
51
|
+
- Do not pipe `--txt` output through `head`, `tail`, or shell filtering unless a human explicitly needs text output.
|
|
61
52
|
|
|
62
53
|
- Use `score` to prefer the most relevant chunks first and filter obvious low-relevance noise.
|
|
63
54
|
- Use `primarySymbol` to see which function/class/type the chunk belongs to before opening the file.
|
|
@@ -68,8 +59,6 @@ Use `--include-content` when you need `content` in JSON output.
|
|
|
68
59
|
Discovery: `npx indexer-cli search "<query>"`, `npx indexer-cli structure`, `npx indexer-cli architecture`,
|
|
69
60
|
`npx indexer-cli context`, `npx indexer-cli explain <symbol>`, `npx indexer-cli deps <path>`
|
|
70
61
|
|
|
71
|
-
Use `--txt` for human-readable output when you are browsing manually.
|
|
72
|
-
|
|
73
62
|
Narrow when needed with: `--path-prefix`, `--chunk-types`, `--fields`, `--min-score`, `--kind`, `--max-depth`,
|
|
74
63
|
`--max-files`, `--scope`, `--max-deps`, `--direction`, `--include-fixtures`, `--omit-content`, `--include-content`
|
|
75
64
|
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GENERATED_SKILL_DIRECTORIES = exports.GENERATED_SKILLS = void 0;
|
|
4
|
+
function renderSkill(definition) {
|
|
5
|
+
const sections = [
|
|
6
|
+
"---",
|
|
7
|
+
`name: ${definition.name}`,
|
|
8
|
+
`description: ${definition.description}`,
|
|
9
|
+
`allowed-tools: ${definition.allowedTools.join(", ")}`,
|
|
10
|
+
"---",
|
|
11
|
+
"",
|
|
12
|
+
`# ${definition.heading}`,
|
|
13
|
+
"",
|
|
14
|
+
definition.purpose,
|
|
15
|
+
"",
|
|
16
|
+
"## Auto-load when",
|
|
17
|
+
"",
|
|
18
|
+
...definition.autoLoadWhen.map((item) => `- ${item}`),
|
|
19
|
+
"",
|
|
20
|
+
"## Rules",
|
|
21
|
+
"",
|
|
22
|
+
...definition.rules.map((item) => `- ${item}`),
|
|
23
|
+
];
|
|
24
|
+
if (definition.skipWhen && definition.skipWhen.length > 0) {
|
|
25
|
+
sections.push("", "## Skip when", "", ...definition.skipWhen.map((item) => `- ${item}`));
|
|
26
|
+
}
|
|
27
|
+
sections.push("", "## First commands", "", "```bash", ...definition.firstCommands, "```");
|
|
28
|
+
if (definition.notes && definition.notes.length > 0) {
|
|
29
|
+
sections.push("", "## Notes", "", ...definition.notes.map((item) => `- ${item}`));
|
|
30
|
+
}
|
|
31
|
+
return `${sections.join("\n")}\n`;
|
|
32
|
+
}
|
|
33
|
+
const SKILL_DEFINITIONS = [
|
|
34
|
+
{
|
|
35
|
+
name: "semantic-search",
|
|
36
|
+
directory: "semantic-search",
|
|
37
|
+
description: "Use for semantic implementation search in this repository with npx indexer-cli search before opening many files.",
|
|
38
|
+
heading: "Use semantic-search for implementation hunting",
|
|
39
|
+
purpose: "Use this when the agent already knows it needs semantic search results, not a tree or architecture map. Keep the prompt short and centered on the code concept to find.",
|
|
40
|
+
allowedTools: ["Bash(npx indexer-cli search:*)"],
|
|
41
|
+
autoLoadWhen: [
|
|
42
|
+
"Find where a feature, function, handler, or pattern is implemented",
|
|
43
|
+
"Search for examples of a concept across the repo",
|
|
44
|
+
"Narrow discovery by path, chunk type, score, or fields",
|
|
45
|
+
],
|
|
46
|
+
rules: [
|
|
47
|
+
"Start with npx indexer-cli search instead of grep when the request is semantic or concept-based.",
|
|
48
|
+
"Prefer compact JSON fields first; include content only after the right chunk is found.",
|
|
49
|
+
"Use --path-prefix or --chunk-types when you already know the likely area.",
|
|
50
|
+
],
|
|
51
|
+
skipWhen: [
|
|
52
|
+
"You need a file tree or symbol inventory instead of search results",
|
|
53
|
+
"You already know the exact file and line range to inspect",
|
|
54
|
+
],
|
|
55
|
+
firstCommands: [
|
|
56
|
+
'npx indexer-cli search "<query>"',
|
|
57
|
+
'npx indexer-cli search "<query>" --path-prefix src/<area>',
|
|
58
|
+
'npx indexer-cli search "<query>" --chunk-types impl,types',
|
|
59
|
+
],
|
|
60
|
+
notes: [
|
|
61
|
+
"Useful fields: filePath, startLine, endLine, score, primarySymbol.",
|
|
62
|
+
"Valid --chunk-types values: full_file, imports, preamble, declaration, module_section, impl, types.",
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "repo-structure",
|
|
67
|
+
directory: "repo-structure",
|
|
68
|
+
description: "Use for file-tree and symbol-map questions in this repository with npx indexer-cli structure.",
|
|
69
|
+
heading: "Use repo-structure for tree and symbol-map questions",
|
|
70
|
+
purpose: "Use this when the agent needs to see how files and symbols are organized in an area of the repo before reading implementation details.",
|
|
71
|
+
allowedTools: ["Bash(npx indexer-cli structure:*)"],
|
|
72
|
+
autoLoadWhen: [
|
|
73
|
+
"Show the file tree for a module or directory",
|
|
74
|
+
"List symbols by area or symbol kind",
|
|
75
|
+
"Limit structure output to a path prefix or max depth",
|
|
76
|
+
],
|
|
77
|
+
rules: [
|
|
78
|
+
"Prefer structure when layout matters more than implementation snippets.",
|
|
79
|
+
"Use --path-prefix and --kind to keep output focused.",
|
|
80
|
+
"Use JSON output for agents unless a human explicitly asks for text.",
|
|
81
|
+
],
|
|
82
|
+
skipWhen: [
|
|
83
|
+
"You need dependency relationships rather than physical structure",
|
|
84
|
+
"You need semantic search results rather than a tree",
|
|
85
|
+
],
|
|
86
|
+
firstCommands: [
|
|
87
|
+
"npx indexer-cli structure",
|
|
88
|
+
"npx indexer-cli structure --path-prefix src/<area>",
|
|
89
|
+
"npx indexer-cli structure --kind function",
|
|
90
|
+
],
|
|
91
|
+
notes: [
|
|
92
|
+
"Valid --kind values: function, class, method, interface, type, variable, module, signal.",
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "repo-architecture",
|
|
97
|
+
directory: "repo-architecture",
|
|
98
|
+
description: "Use for entry points, dependency graphs, and module-level architecture questions with npx indexer-cli architecture.",
|
|
99
|
+
heading: "Use repo-architecture for dependency-graph questions",
|
|
100
|
+
purpose: "Use this when the agent needs a high-level snapshot of modules, entry points, and dependency shape before going deeper.",
|
|
101
|
+
allowedTools: ["Bash(npx indexer-cli architecture:*)"],
|
|
102
|
+
autoLoadWhen: [
|
|
103
|
+
"Identify entry points or major modules",
|
|
104
|
+
"Inspect dependency-map shape across an area of the repo",
|
|
105
|
+
"Understand architecture before refactoring or large changes",
|
|
106
|
+
],
|
|
107
|
+
rules: [
|
|
108
|
+
"Use architecture when the question is about system shape, not a single symbol.",
|
|
109
|
+
"Filter by path prefix when only one subsystem matters.",
|
|
110
|
+
"Use JSON output to preserve structured dependency data.",
|
|
111
|
+
],
|
|
112
|
+
skipWhen: [
|
|
113
|
+
"You need callers/callees for one specific file or symbol",
|
|
114
|
+
"You need dense narrative context instead of a graph-shaped overview",
|
|
115
|
+
],
|
|
116
|
+
firstCommands: [
|
|
117
|
+
"npx indexer-cli architecture",
|
|
118
|
+
"npx indexer-cli architecture --path-prefix src/<area>",
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "repo-context",
|
|
123
|
+
directory: "repo-context",
|
|
124
|
+
description: "Use for dense, token-efficient project summaries with npx indexer-cli context.",
|
|
125
|
+
heading: "Use repo-context for dense summaries",
|
|
126
|
+
purpose: "Use this when the agent wants a compressed view of a subsystem, changed area, or dependency neighborhood without opening many files.",
|
|
127
|
+
allowedTools: ["Bash(npx indexer-cli context:*)"],
|
|
128
|
+
autoLoadWhen: [
|
|
129
|
+
"Summarize the current project or a changed area",
|
|
130
|
+
"Collect context relevant to one path before editing",
|
|
131
|
+
"Get dependency-limited snapshots for prompt building",
|
|
132
|
+
],
|
|
133
|
+
rules: [
|
|
134
|
+
"Prefer context when you want breadth over exact source snippets.",
|
|
135
|
+
"Use --scope to target all, changed, or relevant-to:<path>.",
|
|
136
|
+
"Lower --max-deps when you need a tighter prompt budget.",
|
|
137
|
+
],
|
|
138
|
+
skipWhen: [
|
|
139
|
+
"You need exact implementation locations or ranked chunks",
|
|
140
|
+
"You need a file tree or architecture graph instead of a summary",
|
|
141
|
+
],
|
|
142
|
+
firstCommands: [
|
|
143
|
+
"npx indexer-cli context",
|
|
144
|
+
"npx indexer-cli context --scope changed",
|
|
145
|
+
"npx indexer-cli context --scope relevant-to:src/<area>",
|
|
146
|
+
],
|
|
147
|
+
notes: ["Valid --scope values: all, changed, relevant-to:<path>."],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "symbol-explain",
|
|
151
|
+
directory: "symbol-explain",
|
|
152
|
+
description: "Use for one-symbol understanding with npx indexer-cli explain <symbol>.",
|
|
153
|
+
heading: "Use symbol-explain for one symbol at a time",
|
|
154
|
+
purpose: "Use this when the task centers on one function, class, type, or symbol and the agent needs signature, usage, and containing module context fast.",
|
|
155
|
+
allowedTools: ["Bash(npx indexer-cli explain:*)"],
|
|
156
|
+
autoLoadWhen: [
|
|
157
|
+
"Understand what one symbol does",
|
|
158
|
+
"Inspect the signature and callers of one function or class",
|
|
159
|
+
"Get targeted context before editing a known symbol",
|
|
160
|
+
],
|
|
161
|
+
rules: [
|
|
162
|
+
"Use explain only when the symbol name is already known.",
|
|
163
|
+
"Do not use this skill for symbol discovery; use it only once the symbol name is already known.",
|
|
164
|
+
"Keep the prompt centered on a single symbol for the cleanest output.",
|
|
165
|
+
],
|
|
166
|
+
skipWhen: [
|
|
167
|
+
"You need to discover candidate symbols first",
|
|
168
|
+
"You need repo-wide structure rather than one-symbol context",
|
|
169
|
+
],
|
|
170
|
+
firstCommands: ["npx indexer-cli explain <symbol>"],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: "dependency-trace",
|
|
174
|
+
directory: "dependency-trace",
|
|
175
|
+
description: "Use for caller/callee and impact-trace questions with npx indexer-cli deps <path>.",
|
|
176
|
+
heading: "Use dependency-trace for impact analysis",
|
|
177
|
+
purpose: "Use this when the agent needs to know who imports a module, what it imports, or how far change impact may spread.",
|
|
178
|
+
allowedTools: ["Bash(npx indexer-cli deps:*)"],
|
|
179
|
+
autoLoadWhen: [
|
|
180
|
+
"Trace callers or callees for a module or symbol",
|
|
181
|
+
"Estimate change impact before refactoring",
|
|
182
|
+
"Follow dependency chains in one direction or both",
|
|
183
|
+
],
|
|
184
|
+
rules: [
|
|
185
|
+
"Use deps when the question is about relationships, not source snippets.",
|
|
186
|
+
"Set --direction callers or --direction callees when only one side matters.",
|
|
187
|
+
"Increase depth only when the first hop is not enough.",
|
|
188
|
+
],
|
|
189
|
+
skipWhen: [
|
|
190
|
+
"You need a repo-wide architecture snapshot rather than one trace",
|
|
191
|
+
"You do not yet know the path or symbol to trace",
|
|
192
|
+
],
|
|
193
|
+
firstCommands: [
|
|
194
|
+
"npx indexer-cli deps <path>",
|
|
195
|
+
"npx indexer-cli deps <path> --direction callers",
|
|
196
|
+
"npx indexer-cli deps <path> --direction callees",
|
|
197
|
+
],
|
|
198
|
+
notes: ["Valid --direction values: callers, callees, both."],
|
|
199
|
+
},
|
|
200
|
+
];
|
|
201
|
+
exports.GENERATED_SKILLS = SKILL_DEFINITIONS.map((definition) => ({
|
|
202
|
+
name: definition.name,
|
|
203
|
+
directory: definition.directory,
|
|
204
|
+
content: renderSkill(definition),
|
|
205
|
+
}));
|
|
206
|
+
exports.GENERATED_SKILL_DIRECTORIES = exports.GENERATED_SKILLS.map((skill) => skill.directory);
|
|
207
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/cli/commands/skills.ts"],"names":[],"mappings":";;;AAcA,SAAS,WAAW,CAAC,UAA2B;IAC/C,MAAM,QAAQ,GAAG;QAChB,KAAK;QACL,SAAS,UAAU,CAAC,IAAI,EAAE;QAC1B,gBAAgB,UAAU,CAAC,WAAW,EAAE;QACxC,kBA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ACnD;QACD,KAAK,EAAE;YACN,yEAAyE;YACzE,4EAA4E;YAC5E,uDAAuD;SACvD;QACD,QAAQ,EAAE;YACT,kEAAkE;YAClE,iDAAiD;SACjD;QACD,aAAa,EAAE;YACd,6BAA6B;YAC7B,iDAAiD;YACjD,iDAAiD;SACjD;QACD,KAAK,EAAE,CAAC,mDAAmD,CAAC;KAC5D;CACD,CAAC;AAQW,QAAA,gBAAgB,GAAqB,iBAAiB,CAAC,GAAG,CACtE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,SAAS,EAAE,UAAU,CAAC,SAAS;IAC/B,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC;CAChC,CAAC,CACF,CAAC;AAEW,QAAA,2BAA2B,GAAG,wBAAgB,CAAC,GAAG,CAC9D,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAC1B,CAAC"}
|
|
@@ -10,6 +10,7 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
10
10
|
const node_process_1 = require("node:process");
|
|
11
11
|
const promises_2 = require("node:readline/promises");
|
|
12
12
|
const help_text_js_1 = require("../help-text.js");
|
|
13
|
+
const skills_js_1 = require("./skills.js");
|
|
13
14
|
const HOOK_MARKER_START = "# >>> indexer-cli >>>";
|
|
14
15
|
const HOOK_MARKER_END = "# <<< indexer-cli <<<";
|
|
15
16
|
async function pathExists(targetPath) {
|
|
@@ -26,10 +27,12 @@ async function isDirEmpty(dirPath) {
|
|
|
26
27
|
return entries.length === 0;
|
|
27
28
|
}
|
|
28
29
|
async function removeClaudeSkill(projectRoot) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
for (const skillDirectory of skills_js_1.GENERATED_SKILL_DIRECTORIES) {
|
|
31
|
+
const skillDir = node_path_1.default.join(projectRoot, ".claude", "skills", skillDirectory);
|
|
32
|
+
if (await pathExists(skillDir)) {
|
|
33
|
+
await (0, promises_1.rm)(skillDir, { recursive: true, force: true });
|
|
34
|
+
console.log(`Removed ${skillDir}`);
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
const skillsDir = node_path_1.default.join(projectRoot, ".claude", "skills");
|
|
35
38
|
if (await pathExists(skillsDir)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":";;;;;AAoHA,4DA6CC;AAjKD,qCAAmD;AACnD,+CAO0B;AAC1B,0DAA6B;AAC7B,+CAAgE;AAChE,qDAAyD;AAEzD,kDAA4D;AAC5D,2CAA0D;AAE1D,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAClD,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAEhD,KAAK,UAAU,UAAU,CAAC,UAAkB;IAC3C,IAAI,CAAC;QACJ,MAAM,IAAA,iBAAM,EAAC,UAAU,EAAE,mBAAW,CAAC,IAAI,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,OAAe;IACxC,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAO,EAAC,OAAO,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;AAC7B,CAAC;AAED,KAAK,UAAU,iBAAiB,CAAC,WAAmB;IACnD,KAAK,MAAM,cAAc,IAAI,uCAA2B,EAAE,CAAC;QAC1D,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CACzB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,CACd,CAAC;QACF,IAAI,MAAM,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;Y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AAM,CAAC,KAAK,CAAC,CAAC;YACvE,OAAO,CAAC,KAAK,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;YAC9C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACtB,CAAC;IACF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
2
|
+
"name": "indexer-cli",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "Lightweight CLI project indexer with semantic search via Ollama",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"indexer-cli": "./bin/indexer-cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev": "tsc --watch",
|
|
24
|
+
"start": "tsx bin/indexer-cli.js",
|
|
25
|
+
"indexer-cli": "tsx bin/indexer-cli.js",
|
|
26
|
+
"install:global": "npm run build && npm link --force",
|
|
27
|
+
"uninstall:global": "npm unlink -g indexer-cli",
|
|
28
|
+
"test": "vitest run",
|
|
29
|
+
"test:watch": "vitest",
|
|
30
|
+
"release": "bash scripts/publish.sh"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"better-sqlite3": "^12.0.0",
|
|
34
|
+
"commander": "^12.1.0",
|
|
35
|
+
"p-limit": "^4.0.0",
|
|
36
|
+
"sqlite-vec": "^0.1.9",
|
|
37
|
+
"tree-sitter": "^0.21.1",
|
|
38
|
+
"tree-sitter-c-sharp": "^0.23.1",
|
|
39
|
+
"tree-sitter-gdscript": "^6.1.0",
|
|
40
|
+
"tree-sitter-python": "^0.21.0",
|
|
41
|
+
"tree-sitter-ruby": "^0.23.1",
|
|
42
|
+
"ts-morph": "^21.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
46
|
+
"@types/node": "^22.10.0",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.3",
|
|
48
|
+
"tsx": "^4.19.0",
|
|
49
|
+
"typescript": "^5.7.0",
|
|
50
|
+
"vitest": "^4.1.3"
|
|
51
|
+
}
|
|
52
52
|
}
|