caveat-cli 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 kitepon-rgb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # caveat-cli
2
+
3
+ External spec gotcha knowledge base CLI — markdown + SQLite FTS5 + MCP server + Claude Code hooks.
4
+
5
+ **Source / full docs**: https://github.com/kitepon-rgb/Caveat
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install -g caveat-cli
11
+ caveat init
12
+ ```
13
+
14
+ `caveat init` creates `~/.caveat/`, registers the MCP server with Claude Code (via `claude mcp add --scope user`), and merges `UserPromptSubmit` / `Stop` hooks into `~/.claude/settings.json`. Existing hook entries are preserved; the settings file is backed up before any write. Run `caveat init --dry-run` to preview, or `caveat init --skip-claude` to skip Claude Code wiring.
15
+
16
+ ## Basic usage
17
+
18
+ ```sh
19
+ caveat search "rtx" # FTS against your knowledge repo
20
+ caveat list # recent entries
21
+ caveat serve # http://localhost:4242 read-only portal
22
+ caveat community add <url> # shallow-clone another user's caveats repo
23
+ caveat uninstall # reverse `caveat init` Claude integration
24
+ ```
25
+
26
+ ## Requirements
27
+
28
+ - Node 22.5+ (for built-in `node:sqlite`)
29
+ - Optional: Claude Code installed for MCP / hooks integration. Without it, `caveat init --skip-claude` still provisions the local knowledge repo + index.
30
+
31
+ ## License
32
+
33
+ MIT
package/dist/caveat.js ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ process.removeAllListeners('warning');
3
+ process.on('warning', (w) => {
4
+ if (w && w.name === 'ExperimentalWarning' && typeof w.message === 'string' && w.message.includes('SQLite')) return;
5
+ process.stderr.write('(' + (w && w.name) + ') ' + (w && w.message) + '\n');
6
+ });
7
+ import('./index.js').catch((err) => {
8
+ process.stderr.write('[caveat:fatal] ' + (err && err.stack || err) + '\n');
9
+ process.exit(1);
10
+ });