rewound 0.4.2 → 0.4.3
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 +2 -2
- package/dist/cli.js +23 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,6 +166,6 @@ Server-rendered with zero frontend build step, colorblind-safe palette (blue/ora
|
|
|
166
166
|
|
|
167
167
|
More harness adapters are next: Copilot CLI and OpenCode transcripts are already mapped (see repo issues/roadmap). Keyword-first search is deliberate for v0.x — it's fast, local, and predictable. Local hybrid/semantic search (vector index built with a local embedding model, no API keys, fused with FTS ranking) is planned once the keyword surface has proven itself; the gap it closes is vocabulary mismatch ("that time the port was already taken" vs `EADDRINUSE`).
|
|
168
168
|
|
|
169
|
-
## License
|
|
169
|
+
## License
|
|
170
170
|
|
|
171
|
-
Source-available
|
|
171
|
+
Source-available and **free for personal use**. Terms for commercial/team use are in [LICENSE](LICENSE).
|
package/dist/cli.js
CHANGED
|
@@ -16,6 +16,11 @@ import { startMcpServer } from "./mcp.js";
|
|
|
16
16
|
import { buildServer } from "./server.js";
|
|
17
17
|
const DEFAULT_ROOTS = [path.join(os.homedir(), ".claude", "projects")];
|
|
18
18
|
const DEFAULT_CODEX_ROOTS = [path.join(os.homedir(), ".codex", "sessions")];
|
|
19
|
+
export function getVersion() {
|
|
20
|
+
// ../package.json resolves correctly from both src/ (tests via tsx) and dist/.
|
|
21
|
+
const pkgPath = fileURLToPath(new URL("../package.json", import.meta.url));
|
|
22
|
+
return JSON.parse(fs.readFileSync(pkgPath, "utf8")).version;
|
|
23
|
+
}
|
|
19
24
|
const defaultLog = (line) => console.log(line);
|
|
20
25
|
export function highlightSnippet(snippet) {
|
|
21
26
|
return snippet.replace(/\x01/g, "\x1b[1m").replace(/\x02/g, "\x1b[0m");
|
|
@@ -52,6 +57,15 @@ export function runIndex(opts, log = defaultLog) {
|
|
|
52
57
|
log(`files scanned: ${stats.filesScanned} new: ${stats.filesNew} updated: ${stats.filesUpdated}`);
|
|
53
58
|
log(`messages indexed: ${stats.messagesIndexed} parse errors: ${stats.parseErrors}`);
|
|
54
59
|
log(`elapsed: ${stats.elapsedMs}ms`);
|
|
60
|
+
if (stats.filesScanned === 0) {
|
|
61
|
+
log("");
|
|
62
|
+
log("no transcript files found. roots scanned:");
|
|
63
|
+
for (const r of claudeRoots)
|
|
64
|
+
log(` ${r} (Claude Code)`);
|
|
65
|
+
for (const r of codexRoots)
|
|
66
|
+
log(` ${r} (Codex CLI)`);
|
|
67
|
+
log("transcripts elsewhere? point rewound at them with --roots / --codex-roots");
|
|
68
|
+
}
|
|
55
69
|
}
|
|
56
70
|
export function runSearch(query, opts, log = defaultLog) {
|
|
57
71
|
const start = Date.now();
|
|
@@ -240,9 +254,13 @@ export async function runServe(opts, log = defaultLog) {
|
|
|
240
254
|
}
|
|
241
255
|
export function buildProgram() {
|
|
242
256
|
const program = new Command();
|
|
243
|
-
program
|
|
257
|
+
program
|
|
258
|
+
.name("rewound")
|
|
259
|
+
.description("Grep for everything your AI coding agents ever did.")
|
|
260
|
+
.version(getVersion());
|
|
244
261
|
program
|
|
245
262
|
.command("index")
|
|
263
|
+
.description("scan agent transcripts (Claude Code + Codex CLI) into the local search index")
|
|
246
264
|
.option("--roots <dirs...>", "Claude Code root directories to scan")
|
|
247
265
|
.option("--codex-roots <dirs...>", "Codex CLI session roots (default: ~/.codex/sessions)")
|
|
248
266
|
.option("--db <path>", "database path")
|
|
@@ -250,6 +268,7 @@ export function buildProgram() {
|
|
|
250
268
|
.action((opts) => runIndex(opts));
|
|
251
269
|
program
|
|
252
270
|
.command("search <query>")
|
|
271
|
+
.description("full-text search across every indexed session")
|
|
253
272
|
.option("--project <substr>", "filter by project directory substring")
|
|
254
273
|
.option("--since <iso-or-relative>", "ISO timestamp or relative like 7d / 24h")
|
|
255
274
|
.option("--role <role>", "filter by role: user or assistant")
|
|
@@ -262,6 +281,7 @@ export function buildProgram() {
|
|
|
262
281
|
.action((query, opts) => runSearch(query, opts));
|
|
263
282
|
program
|
|
264
283
|
.command("sessions")
|
|
284
|
+
.description("list indexed sessions, newest first")
|
|
265
285
|
.option("--project <substr>", "filter by project directory substring")
|
|
266
286
|
.option("--limit <n>", "max results", parsePositiveInt)
|
|
267
287
|
.option("--db <path>", "database path")
|
|
@@ -269,6 +289,7 @@ export function buildProgram() {
|
|
|
269
289
|
.action((opts) => runSessions(opts));
|
|
270
290
|
program
|
|
271
291
|
.command("show <session-id-or-prefix>")
|
|
292
|
+
.description("print a full session transcript")
|
|
272
293
|
.option("--db <path>", "database path")
|
|
273
294
|
.option("--json", "output JSON")
|
|
274
295
|
.action((idOrPrefix, opts) => runShow(idOrPrefix, opts));
|
|
@@ -295,6 +316,7 @@ export function buildProgram() {
|
|
|
295
316
|
.action((opts) => runAuto(opts));
|
|
296
317
|
program
|
|
297
318
|
.command("stats")
|
|
319
|
+
.description("per-project session/message counts with estimated API-equivalent cost")
|
|
298
320
|
.option("--db <path>", "database path")
|
|
299
321
|
.option("--json", "output JSON")
|
|
300
322
|
.action((opts) => runStats(opts));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rewound",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Grep for everything your AI coding agents ever did. Local SQLite/FTS5 search over Claude Code session transcripts: CLI, MCP server, and web UI.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "David Erner",
|