opencodekit 0.19.4 → 0.19.6
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/dist/index.js +1 -1
- package/dist/template/.opencode/agent/vision.md +5 -5
- package/dist/template/.opencode/command/compound.md +4 -3
- package/dist/template/.opencode/command/create.md +6 -11
- package/dist/template/.opencode/command/design.md +3 -3
- package/dist/template/.opencode/command/handoff.md +4 -2
- package/dist/template/.opencode/command/init-context.md +79 -55
- package/dist/template/.opencode/command/init-user.md +11 -6
- package/dist/template/.opencode/command/init.md +1 -3
- package/dist/template/.opencode/command/lfg.md +4 -2
- package/dist/template/.opencode/command/plan.md +9 -9
- package/dist/template/.opencode/command/pr.md +5 -1
- package/dist/template/.opencode/command/resume.md +4 -4
- package/dist/template/.opencode/command/review-codebase.md +4 -4
- package/dist/template/.opencode/command/ship.md +5 -7
- package/dist/template/.opencode/command/start.md +8 -10
- package/dist/template/.opencode/command/status.md +1 -1
- package/dist/template/.opencode/command/ui-slop-check.md +6 -6
- package/dist/template/.opencode/command/verify.md +4 -4
- package/dist/template/.opencode/dcp-prompts/defaults/compress-message.md +11 -12
- package/dist/template/.opencode/dcp-prompts/defaults/compress-range.md +1 -1
- package/dist/template/.opencode/dcp-prompts/defaults/context-limit-nudge.md +3 -9
- package/dist/template/.opencode/dcp-prompts/defaults/iteration-nudge.md +0 -2
- package/dist/template/.opencode/dcp-prompts/defaults/system.md +0 -13
- package/dist/template/.opencode/dcp-prompts/defaults/turn-nudge.md +1 -2
- package/dist/template/.opencode/dcp.jsonc +9 -3
- package/dist/template/.opencode/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +6 -14
- package/dist/template/.opencode/skill/context-initialization/SKILL.md +16 -17
- package/dist/template/.opencode/skill/pencil/SKILL.md +36 -32
- package/dist/template/.opencode/skill/tilth-cli/SKILL.md +47 -20
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tilth-cli
|
|
3
3
|
description: AST-aware code navigation via tilth CLI. Use when subagents need structural code search, smart file reading, or codebase mapping — complements MCP tilth (which only the main agent can access).
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
tags: [code-navigation, search, subagent]
|
|
6
6
|
dependencies: []
|
|
7
7
|
---
|
|
@@ -58,20 +58,31 @@ Output: numbered lines (`N content`). Large files get a structural outline; use
|
|
|
58
58
|
```bash
|
|
59
59
|
npx -y tilth initCommand --scope src/ # Find definition + all usages
|
|
60
60
|
npx -y tilth handleAuth --scope src/auth/ # Scoped to subdirectory
|
|
61
|
+
npx -y tilth "sym1,sym2" --scope src/ # Multi-symbol search (max 5)
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
Returns: definitions first (with expanded source), then usages with context lines.
|
|
64
65
|
|
|
65
|
-
### 3. Search for Text
|
|
66
|
+
### 3. Search for Text / Regex
|
|
66
67
|
|
|
67
68
|
```bash
|
|
68
69
|
npx -y tilth "TODO" --scope src/ # Literal text search
|
|
69
70
|
npx -y tilth "version" --scope src/ # Finds all occurrences
|
|
71
|
+
npx -y tilth --kind content "config" --scope src/ # Explicit content search
|
|
72
|
+
npx -y tilth --kind regex "/TODO.*fix/" --scope src/ # Regex search
|
|
70
73
|
```
|
|
71
74
|
|
|
72
|
-
tilth auto-detects text vs symbol. Identifiers (camelCase, snake_case) → symbol search. Multi-word or quoted strings → text search.
|
|
75
|
+
tilth auto-detects text vs symbol. Identifiers (camelCase, snake_case) → symbol search. Multi-word or quoted strings → text search. Use `--kind` to force a specific search mode.
|
|
73
76
|
|
|
74
|
-
### 4.
|
|
77
|
+
### 4. Find Callers
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx -y tilth --kind callers initCommand --scope src/ # Find all call sites
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Uses SIMD-accelerated pre-filtering + tree-sitter AST parsing. More accurate than text grep for finding actual function calls vs. comments/strings.
|
|
84
|
+
|
|
85
|
+
### 5. List Files (Glob)
|
|
75
86
|
|
|
76
87
|
```bash
|
|
77
88
|
npx -y tilth "*.test.ts" --scope src/ # List test files
|
|
@@ -80,27 +91,37 @@ npx -y tilth "*.ts" --scope src/commands/ # List TS files in subdir
|
|
|
80
91
|
|
|
81
92
|
Returns: matched file paths with token size estimates.
|
|
82
93
|
|
|
83
|
-
###
|
|
94
|
+
### 6. Blast-Radius Analysis (Deps)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npx -y tilth --deps src/utils/errors.ts # What imports this file + what it imports
|
|
98
|
+
npx -y tilth --deps src/commands/init.ts --scope src/ # Scoped dependency check
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Shows imports (local + external) AND what other files call its exports, with symbol-level detail. Use before renaming/removing exports.
|
|
102
|
+
|
|
103
|
+
### 7. Codebase Map (CLI-Only)
|
|
84
104
|
|
|
85
105
|
```bash
|
|
86
106
|
npx -y tilth --map --scope src/ # Structural skeleton
|
|
87
107
|
npx -y tilth --map --scope . # Whole project
|
|
88
108
|
```
|
|
89
109
|
|
|
90
|
-
Returns: directory tree with exported symbols per file. **CLI-only** —
|
|
110
|
+
Returns: directory tree with exported symbols per file. **CLI-only** — deliberately excluded from MCP (agents overuse it).
|
|
91
111
|
|
|
92
112
|
## Available Flags
|
|
93
113
|
|
|
94
|
-
| Flag | Purpose
|
|
95
|
-
| ------------------- |
|
|
96
|
-
| `--scope <DIR>` | Restrict search to directory
|
|
97
|
-
| `--section <RANGE>` | Line range or heading for file reads
|
|
98
|
-
| `--full` | Force full file content (skip outline)
|
|
99
|
-
| `--budget <N>` | Max tokens in response
|
|
100
|
-
| `--json` | Machine-readable JSON output
|
|
101
|
-
| `--map` | Generate codebase structure map
|
|
102
|
-
|
|
103
|
-
|
|
114
|
+
| Flag | Purpose | Example |
|
|
115
|
+
| ------------------- | ---------------------------------------- | --------------------------- |
|
|
116
|
+
| `--scope <DIR>` | Restrict search to directory | `--scope src/` |
|
|
117
|
+
| `--section <RANGE>` | Line range or heading for file reads | `--section 45-89` |
|
|
118
|
+
| `--full` | Force full file content (skip outline) | `--full` |
|
|
119
|
+
| `--budget <N>` | Max tokens in response | `--budget 2000` |
|
|
120
|
+
| `--json` | Machine-readable JSON output | `--json` |
|
|
121
|
+
| `--map` | Generate codebase structure map | `--map --scope src/` |
|
|
122
|
+
| `--kind <TYPE>` | Force search type: symbol/content/regex/callers | `--kind callers` |
|
|
123
|
+
| `--deps` | Show blast-radius (imports + dependents) | `--deps src/file.ts` |
|
|
124
|
+
| `--expand <N>` | Top N matches to show full source | `--expand 3` |
|
|
104
125
|
|
|
105
126
|
## MCP vs CLI Comparison
|
|
106
127
|
|
|
@@ -108,10 +129,10 @@ Returns: directory tree with exported symbols per file. **CLI-only** — not ava
|
|
|
108
129
|
| ------------------------------------- | ---------------- | ------------------- |
|
|
109
130
|
| Session dedup (`[shown earlier]`) | Yes | No |
|
|
110
131
|
| Hash-anchored editing (`tilth_edit`) | Yes | No |
|
|
111
|
-
| Blast-radius analysis (`
|
|
112
|
-
| Multi-symbol search (`sym1,sym2`) | Yes |
|
|
113
|
-
| `--kind` flag (content/regex/callers) | Yes |
|
|
114
|
-
| `--expand` control | Yes |
|
|
132
|
+
| Blast-radius analysis (`--deps`) | Yes | Yes (v0.5.7+) |
|
|
133
|
+
| Multi-symbol search (`sym1,sym2`) | Yes | Yes (v0.5.7+) |
|
|
134
|
+
| `--kind` flag (content/regex/callers) | Yes | Yes (v0.5.7+) |
|
|
135
|
+
| `--expand` control | Yes | Yes (v0.5.7+) |
|
|
115
136
|
| `--map` codebase skeleton | No | Yes |
|
|
116
137
|
| Subagent access | No (main only) | Yes (any with Bash) |
|
|
117
138
|
| Process overhead | Once (~17ms) | Per call (~17ms) |
|
|
@@ -161,6 +182,8 @@ utils/
|
|
|
161
182
|
- **Use `--scope`** to narrow searches — avoids scanning irrelevant directories
|
|
162
183
|
- **Use `--budget`** when you need concise output (limits token count)
|
|
163
184
|
- **~17ms per call** — fast enough for interactive use, but avoid unnecessary repeated calls
|
|
185
|
+
- **Use `--kind callers`** for precise call-site analysis instead of text grep
|
|
186
|
+
- **Use `--deps`** before renaming or removing exports to check blast radius
|
|
164
187
|
|
|
165
188
|
## Example Subagent Dispatch
|
|
166
189
|
|
|
@@ -171,6 +194,10 @@ task({
|
|
|
171
194
|
|
|
172
195
|
Find the definition of \`initCommand\` and understand how it's called:
|
|
173
196
|
npx -y tilth initCommand --scope src/
|
|
197
|
+
npx -y tilth --kind callers initCommand --scope src/
|
|
198
|
+
|
|
199
|
+
Check blast radius before editing:
|
|
200
|
+
npx -y tilth --deps src/commands/init.ts
|
|
174
201
|
|
|
175
202
|
Then read the relevant file section:
|
|
176
203
|
npx -y tilth src/commands/init.ts --section 515-600
|