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 +32 -21
- package/dist/index.js +258 -501
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
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.
|
|
18
|
-
3.
|
|
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
|
|
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"
|
|
27
|
-
caveat list
|
|
28
|
-
caveat
|
|
29
|
-
caveat
|
|
30
|
-
caveat
|
|
31
|
-
caveat community
|
|
32
|
-
caveat
|
|
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
|
-
##
|
|
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
|
|
50
|
+
`caveat_search`, `caveat_get`, `caveat_record`, `caveat_update`, `caveat_list_recent`, `caveat_pull`.
|
|
40
51
|
|
|
41
|
-
Claude can autonomously pull
|
|
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
|
|
54
|
+
## Pointing at a different knowledge repo
|
|
44
55
|
|
|
45
|
-
|
|
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
|
-
{ "
|
|
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
|
-
- `
|
|
55
|
-
- Claude Code installed if you want MCP / hooks integration. Without it, `caveat init --skip-claude` still provisions local state
|
|
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
|
|