@qtv/anchorkit 1.0.0-beta.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Clever Lopes
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,123 @@
1
+ # AnchorKit
2
+
3
+ AI-native coding CLI with a persistent, project-scoped knowledge vault.
4
+
5
+ AnchorKit wraps the AI agents you already use (Claude Code, Cursor, or
6
+ direct API access to Anthropic / OpenAI / Gemini) and adds:
7
+
8
+ - a Markdown vault under `.anchorkit/vault/` that survives across
9
+ sessions — decisions, incidents, module maps, runbooks
10
+ - slash commands for spec-driven work, code review, security review,
11
+ vault search, and more
12
+ - an MCP server you can plug into Claude Code so the same vault is
13
+ visible to both tools
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install -g @qtv/anchorkit
19
+ ```
20
+
21
+ Requires **Node ≥ 20**. The native SQLite binding ships as a prebuilt
22
+ binary for Linux x64/arm64, macOS x64/arm64, and Windows x64; on other
23
+ platforms `npm install` will compile it (Python + a C++ toolchain
24
+ required).
25
+
26
+ You also need at least one AI backend on your `PATH` or configured via
27
+ an API key:
28
+
29
+ | Backend | How |
30
+ |---|---|
31
+ | [Claude Code CLI](https://claude.com/claude-code) | `claude login` |
32
+ | [Cursor CLI](https://cursor.com/cli) | install + sign in |
33
+ | Anthropic API | `export ANTHROPIC_API_KEY=...` |
34
+ | OpenAI API | `export OPENAI_API_KEY=...` |
35
+ | Gemini API | `export GEMINI_API_KEY=...` |
36
+
37
+ Pick one inside the REPL with `/connect`.
38
+
39
+ ## Quick start
40
+
41
+ ```bash
42
+ cd your-project
43
+ anchorkit onboard # first time: scaffolds .anchorkit/vault/
44
+ anchorkit # opens the REPL
45
+ ```
46
+
47
+ Inside the REPL:
48
+
49
+ - `/help` — list every command
50
+ - `/connect` — choose the AI backend
51
+ - `/vault-map` — index the codebase into `.anchorkit/vault/`
52
+ - `/vault-query <query>` — semantic search across the vault
53
+ - `/commit` — generate a conventional-commit message from the staged diff
54
+ - `/review` / `/security-review` — code review and OWASP review of the diff
55
+ - `/exit` — quit
56
+
57
+ ## Resume a session
58
+
59
+ ```bash
60
+ anchorkit --resume # resume the most recent session
61
+ anchorkit --resume <session-id> # resume a specific saved session
62
+ ```
63
+
64
+ Sessions live under `.anchorkit/state.json` per project.
65
+
66
+ ## Use AnchorKit as an MCP server inside Claude Code
67
+
68
+ `anchorkit internal-mcp-server` boots a stdio-based MCP server that
69
+ exposes the vault tools (`VaultQuery`, `VaultMap`, `VaultWrite`,
70
+ `TodoWrite`, plan-mode helpers) to any MCP client. The typical wiring
71
+ is via Claude Code's `.claude/mcp.json`:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "anchorkit": {
77
+ "command": "anchorkit",
78
+ "args": ["internal-mcp-server"]
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ After that, Claude Code can read/write your vault and reuse the same
85
+ context AnchorKit's REPL builds up.
86
+
87
+ ## What's in the vault
88
+
89
+ `anchorkit onboard` lays out an Obsidian-compatible Zettelkasten under
90
+ `.anchorkit/vault/`:
91
+
92
+ ```
93
+ .anchorkit/vault/
94
+ ├── CLAUDE.md ← project rules and conventions (auto-injected)
95
+ ├── PROJECT.md ← project vision
96
+ ├── STATE.md ← persistent state across sessions
97
+ ├── knowledge/ ← concepts, patterns, module docs
98
+ ├── decisions/ ← ADRs
99
+ ├── incidents/ ← debugging sagas, root causes
100
+ ├── flows/ ← workflows, pipelines, runbooks
101
+ ├── maps/ ← Maps of Content (index notes)
102
+ ├── archive/ ← superseded knowledge
103
+ └── _sessions/ ← session lifecycle notes
104
+ ```
105
+
106
+ Everything is plain Markdown, so the vault is portable and reviewable
107
+ in git.
108
+
109
+ ## Beta status
110
+
111
+ This is a `1.0.0-beta` release. The API surface (slash commands, vault
112
+ schema, MCP tools) is stable; cloud sync features are wired but
113
+ disabled by default. Set `ANCHORKIT_SYNC_DISABLE=1` to silence sync
114
+ errors when you have no credentials.
115
+
116
+ ## License
117
+
118
+ MIT. See [LICENSE](./LICENSE).
119
+
120
+ ## Links
121
+
122
+ - Repository: <https://github.com/QTVentures/anchorkit-ai>
123
+ - Issues: <https://github.com/QTVentures/anchorkit-ai/issues>
package/bin/anchorkit ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ // Node ≥ 20 required. The sync manifest uses better-sqlite3 (native bindings
3
+ // installed via npm prebuild), and the build output is plain ESM.
4
+ import('../dist/cli.mjs').catch((err) => {
5
+ console.error('anchorkit: failed to start');
6
+ console.error(err);
7
+ process.exit(1);
8
+ });