caveat-cli 0.6.1 → 0.7.0

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, with a shared community knowledge DB out of the box.
3
+ External spec gotcha knowledge base CLI — markdown + SQLite FTS5 + MCP server + Claude Code hooks. Personal / group knowledge tool, no central shared DB.
4
4
 
5
5
  **Source / full docs**: https://github.com/kitepon-rgb/Caveat
6
6
 
@@ -11,48 +11,59 @@ npm install -g caveat-cli
11
11
  caveat init
12
12
  ```
13
13
 
14
- `caveat init` (idempotent, `--dry-run` supported) does 4 things:
14
+ `caveat init` (idempotent, `--dry-run` supported) does 3 things:
15
15
 
16
16
  1. Scaffolds `~/.caveat/own/` (your personal knowledge repo) + `~/.caveat/index/caveat.db`
17
- 2. **Subscribes you to the shared community DB** (`kitepon-rgb/Caveat` by default) shallow-clones into `~/.caveat/community/Caveat/` and indexes so other users' caveats are immediately searchable
18
- 3. Registers the MCP server with Claude Code (`claude mcp add --scope user`)
19
- 4. Merges `UserPromptSubmit` / `Stop` hooks into `~/.claude/settings.json` (existing entries preserved, backup written before any change)
17
+ 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)
20
19
 
21
- Opt-out flags: `--skip-claude`, `--skip-shared`. `caveat uninstall` reverses the Claude Code changes without touching `~/.caveat/`.
20
+ 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`.
22
21
 
23
22
  ## Basic usage
24
23
 
25
24
  ```sh
26
- caveat search "rtx" # FTS across your own entries + the shared community DB
27
- caveat list # recent entries
28
- caveat pull # fetch new community contributions + re-index
29
- caveat push <entry-id> # contribute your entry via fork + PR (requires gh CLI)
30
- caveat serve # http://localhost:4242 read-only portal
31
- caveat community add <url> # subscribe to an additional community repo
32
- caveat uninstall # reverse `caveat init` Claude integration
25
+ caveat search "rtx" # FTS across your own entries + subscribed repos
26
+ caveat list # recent entries
27
+ caveat community add <github-url> # subscribe to a teammate / group repo
28
+ caveat community pull # git-pull every subscribed repo
29
+ caveat community list # show subscribed handles
30
+ caveat community remove <handle> # unsubscribe + purge db rows
31
+ caveat pull # community pull + re-index everything
32
+ caveat serve # http://localhost:4242 read-only portal
33
+ caveat uninstall # reverse `caveat init` Claude integration
33
34
  ```
34
35
 
35
- ## MCP tools (7)
36
+ ## Sharing with a team
37
+
38
+ There is no `caveat push` (since v0.7). To share with teammates, use plain git:
39
+
40
+ 1. Create a GitHub repo (private or public), e.g. `acme-corp/caveats`, with an `entries/` directory.
41
+ 2. Either point your `knowledgeRepo` at that repo (write directly to it) or copy shareable entries into it by hand. Then `git push` as usual.
42
+ 3. Each teammate runs `caveat community add https://github.com/acme-corp/caveats` once, and `caveat pull` to refresh.
43
+
44
+ Trust is defined socially — by who has write access to your group repo — instead of by automated content gates on stranger PRs.
45
+
46
+ ## MCP tools (6)
36
47
 
37
48
  Exposed to Claude Code via the MCP server that `caveat init` registers:
38
49
 
39
- `caveat_search`, `caveat_get`, `caveat_record`, `caveat_update`, `caveat_list_recent`, `caveat_pull`, `caveat_push`.
50
+ `caveat_search`, `caveat_get`, `caveat_record`, `caveat_update`, `caveat_list_recent`, `caveat_pull`.
40
51
 
41
- Claude can autonomously pull community updates (safe, idempotent) and push your recorded caveats (gated by Claude Code's tool permission prompt for user consent contribution is a public action).
52
+ 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.
42
53
 
43
- ## Pointing at a different shared DB
54
+ ## Pointing at a different knowledge repo
44
55
 
45
- For an internal/enterprise shared knowledge pool, override in `~/.caveatrc.json`:
56
+ If you want `~/.caveat/own/` to live elsewhere (e.g. a git-tracked directory you sync to a team repo), override in `~/.caveatrc.json`:
46
57
 
47
58
  ```json
48
- { "sharedRepo": "https://github.com/your-org/your-caveats" }
59
+ { "knowledgeRepo": "/absolute/path/to/your/caveats-repo" }
49
60
  ```
50
61
 
51
62
  ## Requirements
52
63
 
53
64
  - Node 22.5+ (for built-in `node:sqlite`)
54
- - `gh` CLI authenticated (`gh auth login`) if you want to use `caveat push`
55
- - Claude Code installed if you want MCP / hooks integration. Without it, `caveat init --skip-claude` still provisions local state + shared DB
65
+ - `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.
56
67
 
57
68
  ## License
58
69