kratos-memory 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +170 -0
  2. package/package.json +13 -2
package/README.md ADDED
@@ -0,0 +1,170 @@
1
+ <div align="center">
2
+
3
+ ```
4
+ ██╗ ██╗██████╗ █████╗ ████████╗ ██████╗ ███████╗
5
+ ██║ ██╔╝██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔════╝
6
+ █████╔╝ ██████╔╝███████║ ██║ ██║ ██║███████╗
7
+ ██╔═██╗ ██╔══██╗██╔══██║ ██║ ██║ ██║╚════██║
8
+ ██║ ██╗██║ ██║██║ ██║ ██║ ╚██████╔╝███████║
9
+ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
10
+ ```
11
+
12
+ ### The God of War remembers everything.
13
+
14
+ [![npm version](https://img.shields.io/npm/v/kratos-memory.svg)](https://www.npmjs.com/package/kratos-memory)
15
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
16
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
17
+ [![Formerly Kratos MCP](https://img.shields.io/badge/Formerly-Kratos%20MCP-333.svg)](https://github.com/ceorkm/kratos-mcp)
18
+
19
+ **Persistent memory for AI coding agents. Works with any agent — Claude Code, Codex, Cursor, Cline, or anything that runs Bash.**
20
+
21
+ </div>
22
+
23
+ ---
24
+
25
+ ## What is Kratos?
26
+
27
+ AI coding tools forget everything between sessions. You explain your architecture, your patterns, your decisions — and next session, you explain it all again.
28
+
29
+ Kratos gives your AI agent permanent memory. Every observation is saved, searchable, and encrypted locally. No cloud, no API keys, no vendor lock-in.
30
+
31
+ ```
32
+ > use npx kratos-memory CLI. save what you learn, search when you need context.
33
+
34
+ Agent runs: npx kratos-memory search "auth"
35
+ Agent gets: JWT auth with refresh tokens, 15-min expiry, httpOnly cookies...
36
+ Agent runs: npx kratos-memory save "Added rate limiter to /api routes" --tags middleware
37
+ ```
38
+
39
+ Works with **any** AI coding agent that can execute shell commands.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ npx kratos-memory
45
+ ```
46
+
47
+ That's it. No global install needed. Auto-detects your project.
48
+
49
+ ## Commands
50
+
51
+ | Command | What it does |
52
+ |---------|-------------|
53
+ | `npx kratos-memory save <text>` | Save a memory (`--tags`, `--importance 1-5`, `--paths`, `--compress`) |
54
+ | `npx kratos-memory search <query>` | Full-text search with FTS5 (`--limit`, `--tags`, `--debug`) |
55
+ | `npx kratos-memory ask <question>` | Natural language query |
56
+ | `npx kratos-memory recent` | Recent memories (`--limit`) |
57
+ | `npx kratos-memory get <id>` | Full memory details |
58
+ | `npx kratos-memory forget <id>` | Delete a memory |
59
+ | `npx kratos-memory status` | System dashboard |
60
+ | `npx kratos-memory switch <path>` | Switch project |
61
+ | `npx kratos-memory scan <text>` | Detect PII and secrets (`--redact`) |
62
+ | `npx kratos-memory hooks install` | Install auto-capture hooks |
63
+
64
+ ## How agents use it
65
+
66
+ Just tell your agent:
67
+
68
+ > Use `npx kratos-memory` CLI for persistent memory. Run `npx kratos-memory --help` to see commands. Save important observations. Search before starting work.
69
+
70
+ Or drop the included `AGENTS.md` file in your project root — any agent that reads project files will pick it up.
71
+
72
+ ### Claude Code
73
+
74
+ ```
75
+ > use npx kratos-memory CLI (run help first)
76
+ ```
77
+
78
+ ### Codex
79
+
80
+ ```
81
+ > use npx kratos-memory CLI for memory. search for context at the start, save decisions as you go.
82
+ ```
83
+
84
+ ### Cursor / Cline / Any agent
85
+
86
+ Same pattern. If it can run Bash, it can use Kratos.
87
+
88
+ ## Features
89
+
90
+ | Feature | Detail |
91
+ |---------|--------|
92
+ | **FTS5 Search** | Full-text search with porter tokenizer, smart fallbacks, <10ms retrieval |
93
+ | **AES-256-GCM Encryption** | Per-project encryption keys, all data encrypted at rest |
94
+ | **PII Detection** | Auto-detects SSN, credit cards, emails, phones, API keys, AWS keys, JWTs |
95
+ | **Project Isolation** | Each project gets its own SQLite database — zero cross-contamination |
96
+ | **Smart Compression** | Rule-based compression, no AI dependency |
97
+ | **Auto-Capture Hooks** | Optional hooks for Claude Code sessions |
98
+ | **Zero Network Calls** | Nothing leaves your machine. Ever. |
99
+
100
+ ## How it works
101
+
102
+ ```
103
+ You tell your agent "use kratos-memory"
104
+
105
+ Agent runs: npx kratos-memory search "relevant context"
106
+
107
+ Agent gets memories from local SQLite + FTS5
108
+
109
+ Agent works with full context
110
+
111
+ Agent runs: npx kratos-memory save "what it learned"
112
+
113
+ Encrypted, stored locally, searchable forever
114
+ ```
115
+
116
+ ## Data storage
117
+
118
+ ```
119
+ ~/.kratos/
120
+ ├── projects/
121
+ │ ├── proj_abc123/
122
+ │ │ ├── databases/
123
+ │ │ │ └── memories.db # SQLite + FTS5
124
+ │ │ └── project.json # Project metadata
125
+ │ └── proj_def456/
126
+ │ └── ...
127
+ ├── .keys/
128
+ │ └── proj_abc123.key # AES-256 encryption key
129
+ └── projects.json # Project registry
130
+ ```
131
+
132
+ Each project is completely isolated. Different database, different encryption key.
133
+
134
+ ## Security
135
+
136
+ - **AES-256-GCM** encryption at rest with per-project keys
137
+ - **PII detection** — SSN, credit cards, emails, phones, IPs, DOB
138
+ - **Secret scanning** — API keys, AWS keys, GitHub tokens, JWTs, private keys
139
+ - **Key rotation** support
140
+ - **Zero network calls** — nothing ever leaves your machine
141
+ - **No telemetry, no analytics, no cloud**
142
+
143
+ ## Coming from Kratos MCP?
144
+
145
+ This is the successor to [`kratos-mcp`](https://github.com/ceorkm/kratos-mcp). We moved from MCP to CLI because MCP eats too many tokens per tool call (JSON-RPC schema overhead on every interaction). The CLI is lighter, faster, and works with any agent — not just MCP-compatible ones.
146
+
147
+ **Your data is already compatible.** Both versions use the same `~/.kratos/` storage and SQLite format. Just start using `npx kratos-memory` and your existing memories are there.
148
+
149
+ ```bash
150
+ npx kratos-memory status # see your existing memories
151
+ npx kratos-memory recent # they're all here
152
+ ```
153
+
154
+ ## Contributing
155
+
156
+ PRs welcome at [github.com/ceorkm/kratos-cli/pulls](https://github.com/ceorkm/kratos-cli/pulls)
157
+
158
+ ## License
159
+
160
+ MIT
161
+
162
+ ---
163
+
164
+ <div align="center">
165
+
166
+ **Built for developers who are tired of repeating themselves.**
167
+
168
+ [Report Bug](https://github.com/ceorkm/kratos-cli/issues) · [Request Feature](https://github.com/ceorkm/kratos-cli/issues)
169
+
170
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kratos-memory",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Persistent memory for AI coding agents — CLI-first, encrypted, local",
5
5
  "main": "dist/cli/index.js",
6
6
  "type": "module",
@@ -18,7 +18,18 @@
18
18
  "start": "node dist/cli/index.js",
19
19
  "prepublishOnly": "npm run build"
20
20
  },
21
- "keywords": ["cli", "ai-memory", "ai-agents", "claude-code", "codex", "cursor", "sqlite", "fts5", "memory", "persistent"],
21
+ "keywords": [
22
+ "cli",
23
+ "ai-memory",
24
+ "ai-agents",
25
+ "claude-code",
26
+ "codex",
27
+ "cursor",
28
+ "sqlite",
29
+ "fts5",
30
+ "memory",
31
+ "persistent"
32
+ ],
22
33
  "author": "",
23
34
  "license": "MIT",
24
35
  "dependencies": {