fossel 1.0.8 → 1.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/README.md +150 -88
- package/dist/cli.js +1704 -275
- package/dist/index.js +1300 -54
- package/package.json +27 -3
package/README.md
CHANGED
|
@@ -1,105 +1,124 @@
|
|
|
1
1
|
# Fossel
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Local-first MCP memory for every repo you work on.** Store conventions, bug fixes, reviewer patterns, and decisions in **SQLite on your machine** (with FTS5 search). Works with **Cursor**, **Claude Desktop**, and any **stdio MCP** client. **No accounts, no cloud.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- Full-text search with SQLite FTS5
|
|
9
|
-
- Repo-aware context retrieval grouped by memory type
|
|
10
|
-
- Pinned memories that stay at the top of repo context
|
|
11
|
-
- Structured markdown summaries for PR and planning context
|
|
12
|
-
- Simple delete workflow by memory id
|
|
13
|
-
- Partial memory updates by numeric id
|
|
14
|
-
- CLI onboarding with `fossel init`
|
|
15
|
-
- Local `stdio` MCP server for tools such as Cursor and Claude Desktop
|
|
7
|
+
## Quick start (~2 minutes)
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
1. **Onboard** (prints copy-paste MCP config + creates a sample memory):
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
- `decision`
|
|
23
|
-
- `issue`
|
|
24
|
-
- `general`
|
|
11
|
+
```bash
|
|
12
|
+
npx -y fossel init
|
|
13
|
+
```
|
|
25
14
|
|
|
26
|
-
|
|
15
|
+
2. **Add the JSON** from the output to **Cursor** (`~/.cursor/mcp.json`) or **Claude Desktop** MCP settings, then restart the app.
|
|
27
16
|
|
|
28
|
-
|
|
29
|
-
npm install
|
|
30
|
-
```
|
|
17
|
+
3. **Run the server** (what the IDE launches; you can also run it manually for testing):
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
```bash
|
|
20
|
+
npx -y fossel
|
|
21
|
+
```
|
|
33
22
|
|
|
34
|
-
|
|
35
|
-
npx -y fossel
|
|
36
|
-
```
|
|
23
|
+
4. In chat, just say *"remember this"* and Fossel handles the rest. See [Simple mode](#simple-mode-recommended) below.
|
|
37
24
|
|
|
38
|
-
|
|
25
|
+
**Database path:** `~/.fossel/memory.db` (override with `FOSSEL_DB_PATH`).
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
npx -y fossel # start MCP server over stdio
|
|
42
|
-
npx -y fossel init # onboarding for current repository
|
|
43
|
-
```
|
|
27
|
+
---
|
|
44
28
|
|
|
45
|
-
##
|
|
29
|
+
## Why Fossel?
|
|
46
30
|
|
|
47
|
-
|
|
31
|
+
| You get | Details |
|
|
32
|
+
|--------|---------|
|
|
33
|
+
| **Local data** | SQLite + migrations; nothing leaves your disk unless you share it. |
|
|
34
|
+
| **Repo-scoped memory** | One canonical key per repo; aliases collapse automatically. |
|
|
35
|
+
| **Find anything** | FTS5 search across notes; pin what matters; summarize for PRs. |
|
|
36
|
+
| **Ambient capture** | Natural-language `remember`; dedupes near-duplicates on save. |
|
|
37
|
+
| **Evolving schema** | Startup migrations keep upgrades safe for existing databases. |
|
|
48
38
|
|
|
49
|
-
|
|
39
|
+
---
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
- Content: `Fossel is active for this repo. Use store_context to save context.`
|
|
41
|
+
## Simple mode (recommended)
|
|
53
42
|
|
|
54
|
-
|
|
43
|
+
Two tools cover the 80% case. Neither needs you to specify `type` or `tags`.
|
|
55
44
|
|
|
56
|
-
|
|
57
|
-
- `get_repo_context`: Fetch recent memories for a repository, grouped by type. Pinned entries are always listed first and marked `📌 Pinned`.
|
|
58
|
-
- `search_memory`: Full-text search memories across all repos or a single repo.
|
|
59
|
-
- `delete_memory`: Delete a memory by id.
|
|
60
|
-
- `update_memory`: Update memory content and/or type by numeric id.
|
|
61
|
-
- `pin_memory`: Pin a memory by numeric id.
|
|
62
|
-
- `unpin_memory`: Unpin a memory by numeric id.
|
|
63
|
-
- `summarize_repo_context`: Return a structured markdown summary for a repo.
|
|
45
|
+
### `remember` — save a memory
|
|
64
46
|
|
|
65
|
-
|
|
47
|
+
Just send a sentence. Fossel infers the memory type, generates tags, resolves the repo, and merges near-duplicates into the existing row.
|
|
66
48
|
|
|
67
|
-
|
|
49
|
+
> **You:** Remember: JWT lives in localStorage and 401 redirects to /login.
|
|
50
|
+
>
|
|
51
|
+
> **Agent calls** `remember({ note: "JWT lives in localStorage and 401 redirects to /login." })`
|
|
52
|
+
>
|
|
53
|
+
> **Fossel:** Stored as `convention` with tags `jwt, auth, login` for `7vignesh/fossel`.
|
|
68
54
|
|
|
69
|
-
|
|
55
|
+
### `get_context` — pull repo context
|
|
70
56
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
57
|
+
Pinned first, then recent, then FTS matches if you pass a `query`. Default limit of 8 is tuned for LLM context injection.
|
|
58
|
+
|
|
59
|
+
> **You:** What does Fossel remember about auth here?
|
|
60
|
+
>
|
|
61
|
+
> **Agent calls** `get_context({ query: "auth" })`
|
|
62
|
+
>
|
|
63
|
+
> **Fossel:** returns a markdown block ready to drop into the system prompt.
|
|
64
|
+
|
|
65
|
+
That's it for daily use. The repo is detected from your `cwd` automatically.
|
|
66
|
+
|
|
67
|
+
### Zero-prompt usage in Cursor
|
|
78
68
|
|
|
79
|
-
|
|
69
|
+
Fossel exposes a static MCP resource at `fossel://context/current-repo`. Cursor and Claude Desktop list resources on session start, so Fossel's pinned + recent memories show up before you type anything. Clients that don't list resources can still call `get_context` from the agent's first turn — that's all the prompting needed.
|
|
80
70
|
|
|
81
|
-
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Advanced mode
|
|
74
|
+
|
|
75
|
+
Every original tool is still available for power users.
|
|
76
|
+
|
|
77
|
+
| Tool | Purpose |
|
|
78
|
+
|------|---------|
|
|
79
|
+
| `remember` | Natural-language save with auto-type/tags/dedupe (preferred). |
|
|
80
|
+
| `get_context` | Unified pinned + recent + FTS retrieval. |
|
|
81
|
+
| `resolve_repo` | Show canonical key, aliases, detected git remote. |
|
|
82
|
+
| `dedupe_repo` | Find or merge near-duplicate memories. |
|
|
83
|
+
| `store_context` | Explicit save with `type` and `tags`. |
|
|
84
|
+
| `get_repo_context` | Recent memories grouped by type (pinned first). |
|
|
85
|
+
| `search_memory` | FTS search, optional repo filter. |
|
|
86
|
+
| `summarize_repo_context` | Markdown brief for a repo. |
|
|
87
|
+
| `pin_memory` / `unpin_memory` | Pin important items. |
|
|
88
|
+
| `update_memory` | Partial update by numeric id. |
|
|
89
|
+
| `delete_memory` | Delete by legacy string id. |
|
|
90
|
+
|
|
91
|
+
### Memory types
|
|
92
|
+
|
|
93
|
+
`convention`, `bug_fix`, `reviewer_pattern`, `decision`, `issue`, `general`.
|
|
94
|
+
|
|
95
|
+
### Tool examples
|
|
96
|
+
|
|
97
|
+
`store_context` (explicit form):
|
|
82
98
|
|
|
83
99
|
```json
|
|
84
100
|
{
|
|
85
|
-
"
|
|
101
|
+
"repo": "7vignesh/fossel",
|
|
102
|
+
"type": "convention",
|
|
103
|
+
"note": "Use pnpm workspaces for all package scripts.",
|
|
104
|
+
"tags": ["pnpm", "workspaces"]
|
|
86
105
|
}
|
|
87
106
|
```
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Input:
|
|
108
|
+
`pin_memory`:
|
|
92
109
|
|
|
93
110
|
```json
|
|
94
|
-
{
|
|
95
|
-
"repo": "RocketChat"
|
|
96
|
-
}
|
|
111
|
+
{ "id": 12 }
|
|
97
112
|
```
|
|
98
113
|
|
|
99
|
-
|
|
114
|
+
`summarize_repo_context`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{ "repo": "RocketChat/Rocket.Chat" }
|
|
118
|
+
```
|
|
100
119
|
|
|
101
120
|
```md
|
|
102
|
-
Fossel Context Summary: RocketChat
|
|
121
|
+
Fossel Context Summary: RocketChat/Rocket.Chat
|
|
103
122
|
|
|
104
123
|
📌 Pinned
|
|
105
124
|
- (12) Always run test matrix before merge.
|
|
@@ -111,9 +130,55 @@ Bug Fixes
|
|
|
111
130
|
- (5) Fixed webhook retries by making queue idempotent.
|
|
112
131
|
```
|
|
113
132
|
|
|
114
|
-
|
|
133
|
+
`dedupe_repo` (dry run, then apply):
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{ "repo": "7vignesh/fossel", "apply": false }
|
|
137
|
+
{ "repo": "7vignesh/fossel", "apply": true, "threshold": 0.85 }
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Repo identity
|
|
143
|
+
|
|
144
|
+
Fossel resolves the canonical key for your workspace in this order:
|
|
145
|
+
|
|
146
|
+
1. `git remote get-url origin` → normalized to `owner/repo`
|
|
147
|
+
2. folder basename
|
|
148
|
+
3. anything you pass explicitly is recorded as an alias of the above
|
|
149
|
+
|
|
150
|
+
Memories saved under any alias are reachable from the canonical key, and `npx fossel init` automatically merges legacy alias rows (e.g. `studentmanager` → `7vignesh/student-manager`).
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Commands
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
npx -y fossel # MCP server over stdio
|
|
158
|
+
npx -y fossel init # onboarding + canonical key + safe alias merge
|
|
159
|
+
npx -y fossel doctor # diagnose repo sprawl, duplicates, MCP config
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### `fossel init`
|
|
163
|
+
|
|
164
|
+
Detects the canonical repo key, prints **Cursor** and **Claude Desktop** MCP snippets, merges legacy alias rows into the canonical key, and inserts a starter memory only when the database is empty.
|
|
165
|
+
|
|
166
|
+
### `fossel doctor`
|
|
115
167
|
|
|
116
|
-
|
|
168
|
+
Reports on:
|
|
169
|
+
|
|
170
|
+
- canonical repo key for the workspace
|
|
171
|
+
- sibling keys that look like the same repo (offers a fix)
|
|
172
|
+
- exact-duplicate memory clusters (suggest `dedupe_repo`)
|
|
173
|
+
- detected MCP config files
|
|
174
|
+
|
|
175
|
+
Exits non-zero when issues are found so it can run in CI.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Cursor MCP config
|
|
180
|
+
|
|
181
|
+
`~/.cursor/mcp.json`:
|
|
117
182
|
|
|
118
183
|
```json
|
|
119
184
|
{
|
|
@@ -126,9 +191,7 @@ Add this to your Cursor MCP configuration:
|
|
|
126
191
|
}
|
|
127
192
|
```
|
|
128
193
|
|
|
129
|
-
## Claude Desktop MCP
|
|
130
|
-
|
|
131
|
-
Add this to your Claude Desktop MCP config:
|
|
194
|
+
## Claude Desktop MCP config
|
|
132
195
|
|
|
133
196
|
```json
|
|
134
197
|
{
|
|
@@ -141,29 +204,28 @@ Add this to your Claude Desktop MCP config:
|
|
|
141
204
|
}
|
|
142
205
|
```
|
|
143
206
|
|
|
144
|
-
|
|
207
|
+
---
|
|
145
208
|
|
|
146
|
-
|
|
147
|
-
npm run dev
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
This starts the local MCP server over stdio.
|
|
151
|
-
|
|
152
|
-
## Build
|
|
209
|
+
## Development (from source)
|
|
153
210
|
|
|
154
211
|
```bash
|
|
212
|
+
npm install
|
|
213
|
+
npm run dev # MCP server over stdio
|
|
214
|
+
npm run typecheck
|
|
215
|
+
npm test # unit tests (node:test via tsx)
|
|
216
|
+
npm run smoke # end-to-end MCP roundtrip
|
|
155
217
|
npm run build
|
|
218
|
+
npm run start # node dist/index.js
|
|
219
|
+
npm run ci # typecheck + tests + build + smoke
|
|
156
220
|
```
|
|
157
221
|
|
|
158
|
-
##
|
|
222
|
+
## Notes
|
|
159
223
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
224
|
+
- **Local-first:** data stays on your machine.
|
|
225
|
+
- **Search:** FTS5 (no `sqlite-vec` in v1).
|
|
226
|
+
- **`FOSSEL_DB_PATH`:** optional override for DB location (e.g. tests).
|
|
227
|
+
- **Schema:** migrations live in `src/db/migrate.ts`; reference shape in `src/db/schema.sql`.
|
|
163
228
|
|
|
164
|
-
##
|
|
229
|
+
## Community
|
|
165
230
|
|
|
166
|
-
|
|
167
|
-
- FTS5 is used for V1 search (no `sqlite-vec`).
|
|
168
|
-
- Optional: set `FOSSEL_DB_PATH` to override the default database path for testing.
|
|
169
|
-
- DB schema changes are managed via startup migrations in `src/db/migrate.ts`.
|
|
231
|
+
If Fossel saves you time, **[star the repo](https://github.com/7vignesh/fossel)** and **[open an issue](https://github.com/7vignesh/fossel/issues)** for bugs or ideas — that helps others discover it too.
|