caveat-cli 0.14.3 → 0.14.5

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
@@ -1,6 +1,6 @@
1
1
  # caveat-cli
2
2
 
3
- External spec gotcha knowledge base CLI — markdown + SQLite FTS5 + MCP server + Claude Code hooks. Personal / group knowledge tool, no central shared DB.
3
+ Long-term memory CLI for Claude Code and Codex — markdown + SQLite FTS5 + MCP server + agent hooks. Personal / group knowledge tool, no central shared DB.
4
4
 
5
5
  **Source / full docs**: https://github.com/kitepon-rgb/Caveat
6
6
 
@@ -8,17 +8,28 @@ External spec gotcha knowledge base CLI — markdown + SQLite FTS5 + MCP server
8
8
 
9
9
  ```sh
10
10
  npm install -g caveat-cli
11
- caveat init
11
+ caveat init # Claude Code MCP + hooks
12
+ caveat codex-hook install # optional: native Codex hooks
12
13
  ```
13
14
 
14
- `caveat init` (idempotent, `--dry-run` supported) does 3 things:
15
+ `caveat init` (idempotent, `--dry-run` supported) does the Claude Code setup:
15
16
 
16
17
  1. Scaffolds `~/.caveat/own/` (your personal knowledge repo) + `~/.caveat/index/caveat.db`
17
18
  2. Registers the MCP server with Claude Code (`claude mcp add --scope user`)
18
- 3. Merges `UserPromptSubmit` / `Stop` hooks into `~/.claude/settings.json` (existing entries preserved, backup written before any change)
19
+ 3. Merges `UserPromptSubmit` / `PostToolUse` / `PostToolUseFailure` / `Stop` hooks into `~/.claude/settings.json` (existing entries preserved, backup written before any change)
19
20
 
20
21
  Opt-out: `--skip-claude`. `caveat uninstall` reverses the Claude Code changes without touching `~/.caveat/`. **No central DB is auto-subscribed** — add knowledge sources explicitly with `caveat community add`.
21
22
 
23
+ For Codex, run `caveat codex-hook diagnostics` first if you want a health check,
24
+ then `caveat codex-hook install`. It registers Caveat-owned
25
+ `UserPromptSubmit`, `PostToolUse`, and `Stop` entries in `~/.codex/hooks.json`
26
+ and enables Codex's native hook runtime.
27
+
28
+ With either host enabled, Caveat surfaces matching entries at three moments:
29
+ before prompts, after failed tools, and after struggle-heavy sessions. Stop
30
+ reminders are queued for the next context-capable hook tick so the agent's final
31
+ answer is not cluttered by hook output.
32
+
22
33
  ## Basic usage
23
34
 
24
35
  ```sh
@@ -31,6 +42,7 @@ caveat community remove <handle> # unsubscribe + purge db rows
31
42
  caveat pull # community pull + re-index everything
32
43
  caveat serve # http://localhost:4242 read-only portal
33
44
  caveat uninstall # reverse `caveat init` Claude integration
45
+ caveat codex-hook diagnostics # inspect Codex hook availability/install state
34
46
  ```
35
47
 
36
48
  ## Sharing with a team
@@ -51,6 +63,10 @@ Exposed to Claude Code via the MCP server that `caveat init` registers:
51
63
 
52
64
  Claude can autonomously pull subscribed-repo updates (safe, idempotent). Recording / updating writes to your local `~/.caveat/own/` only — sharing is done by you via `git push` to your group repo.
53
65
 
66
+ Codex uses native hooks rather than MCP for automatic surfacing. The optional
67
+ `codex-sidecar` commands remain available for bounded second opinions, review,
68
+ risk-check, and isolated work.
69
+
54
70
  ## Pointing at a different knowledge repo
55
71
 
56
72
  If you want `~/.caveat/own/` to live elsewhere (e.g. a git-tracked directory you sync to a team repo), override in `~/.caveatrc.json`:
@@ -63,7 +79,8 @@ If you want `~/.caveat/own/` to live elsewhere (e.g. a git-tracked directory you
63
79
 
64
80
  - Node 22.5+ (for built-in `node:sqlite`)
65
81
  - `git` for `caveat community add` / `caveat community pull`
66
- - Claude Code installed if you want MCP / hooks integration. Without it, `caveat init --skip-claude` still provisions local state.
82
+ - Claude Code installed if you want Claude MCP / hooks integration. Without it, `caveat init --skip-claude` still provisions local state.
83
+ - Codex installed if you want native Codex hooks via `caveat codex-hook install`.
67
84
 
68
85
  ## License
69
86