gnosys 5.9.4 → 5.10.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 +31 -777
- package/dist/cli.js +114 -4
- package/dist/cli.js.map +1 -1
- package/dist/lib/dashboard.d.ts.map +1 -1
- package/dist/lib/dashboard.js +5 -1
- package/dist/lib/dashboard.js.map +1 -1
- package/dist/lib/db.d.ts +24 -0
- package/dist/lib/db.d.ts.map +1 -1
- package/dist/lib/db.js +122 -8
- package/dist/lib/db.js.map +1 -1
- package/dist/lib/dream.js +1 -1
- package/dist/lib/dream.js.map +1 -1
- package/dist/lib/federated.d.ts +2 -1
- package/dist/lib/federated.d.ts.map +1 -1
- package/dist/lib/federated.js +6 -3
- package/dist/lib/federated.js.map +1 -1
- package/dist/lib/ingest.js +1 -1
- package/dist/lib/ingest.js.map +1 -1
- package/dist/lib/machineConfig.d.ts +87 -0
- package/dist/lib/machineConfig.d.ts.map +1 -0
- package/dist/lib/machineConfig.js +146 -0
- package/dist/lib/machineConfig.js.map +1 -0
- package/dist/lib/machineMigrate.d.ts +39 -0
- package/dist/lib/machineMigrate.d.ts.map +1 -0
- package/dist/lib/machineMigrate.js +103 -0
- package/dist/lib/machineMigrate.js.map +1 -0
- package/dist/lib/paths.d.ts +11 -0
- package/dist/lib/paths.d.ts.map +1 -1
- package/dist/lib/paths.js +13 -0
- package/dist/lib/paths.js.map +1 -1
- package/dist/lib/portfolio.d.ts.map +1 -1
- package/dist/lib/portfolio.js +10 -2
- package/dist/lib/portfolio.js.map +1 -1
- package/dist/lib/projectPaths.d.ts +60 -0
- package/dist/lib/projectPaths.d.ts.map +1 -0
- package/dist/lib/projectPaths.js +100 -0
- package/dist/lib/projectPaths.js.map +1 -0
- package/dist/lib/projectScan.d.ts +40 -0
- package/dist/lib/projectScan.d.ts.map +1 -0
- package/dist/lib/projectScan.js +97 -0
- package/dist/lib/projectScan.js.map +1 -0
- package/dist/lib/remote.d.ts +5 -0
- package/dist/lib/remote.d.ts.map +1 -1
- package/dist/lib/remote.js +29 -5
- package/dist/lib/remote.js.map +1 -1
- package/dist/lib/setup.js +1 -1
- package/dist/lib/setup.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,809 +5,63 @@
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://www.npmjs.com/package/gnosys"><img src="https://img.shields.io/npm/v/gnosys.svg" alt="npm version"></a>
|
|
7
7
|
<a href="https://github.com/proticom/gnosys/actions"><img src="https://github.com/proticom/gnosys/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
8
|
-
<img src="https://img.shields.io/badge/tests-738%20passing-brightgreen" alt="tests">
|
|
9
|
-
<img src="https://img.shields.io/badge/coverage-lib%2040%25%20|%20sandbox%2045%25-yellow" alt="coverage">
|
|
10
8
|
<a href="https://gnosys.ai"><img src="https://img.shields.io/badge/docs-gnosys.ai-C04C4C" alt="docs"></a>
|
|
11
|
-
<a href="https://gnosys.ai/guide.html"><img src="https://img.shields.io/badge/
|
|
9
|
+
<a href="https://gnosys.ai/guide.html"><img src="https://img.shields.io/badge/CLI%20reference-gnosys.ai%2Fguide-555560" alt="user guide"></a>
|
|
12
10
|
<a href="https://github.com/proticom/gnosys/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/gnosys.svg" alt="license"></a>
|
|
13
11
|
</p>
|
|
14
12
|
|
|
15
13
|
<p align="center">
|
|
16
|
-
A <a href="https://proticom.com">Proticom</a> product.
|
|
14
|
+
A <a href="https://proticom.com">Proticom</a> product. · <b><a href="https://gnosys.ai">gnosys.ai</a></b> is the source of truth for docs.
|
|
17
15
|
</p>
|
|
18
16
|
|
|
19
17
|
---
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
# Gnosys — One Brain. Zero Context Bloat.
|
|
22
20
|
|
|
23
|
-
**Gnosys
|
|
21
|
+
**Gnosys gives AI agents persistent memory that survives across sessions, projects, and machines.**
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
The central brain is a single SQLite database at `~/.gnosys/gnosys.db` with sub-10ms reads — no vector DBs, no black boxes, no external services. Federated search ranks results across project, user, and global scopes. It runs as a CLI and as a full MCP server that drops straight into Claude Code, Claude Desktop (Chat / Cowork / Code), Cursor, Codex, Gemini CLI, Antigravity, Grok Build, or any MCP client. When you want a human-readable view, `gnosys export` regenerates a full Obsidian vault on demand.
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
No vector DBs. No black boxes. No external services. Just SQLite and optional Obsidian export — the way knowledge should be.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Why Gnosys?
|
|
34
|
-
|
|
35
|
-
Most "memory for LLMs" solutions use vector databases, embeddings, or proprietary services. They're opaque — you can't see what the model remembers, can't edit it, can't version it, can't share it.
|
|
36
|
-
|
|
37
|
-
Gnosys takes a different approach: the central brain is a single SQLite database (`~/.gnosys/gnosys.db`) with sub-10ms reads. SQLite is the sole source of truth — no dual-write, no scattered files. When you want a human-readable view, `gnosys export` generates a full Obsidian vault on demand. History lives in the audit_log table, not Git.
|
|
38
|
-
|
|
39
|
-
**What makes it different:**
|
|
40
|
-
|
|
41
|
-
- **Sandbox-first** — persistent background process + helper library. Agents call `gnosys.add()` / `gnosys.recall()` like regular code. No MCP overhead, near-zero context cost.
|
|
42
|
-
- **Centralized brain** — single `~/.gnosys/gnosys.db` unifies all projects with `project_id` + `scope` columns. No more per-project silos.
|
|
43
|
-
- **Federated search** — tier-boosted search across project (1.5x) > user (1.0x) > global (0.7x) scopes with recency and reinforcement boosts.
|
|
44
|
-
- **Web Knowledge Base** — `gnosys web build` turns any website into a searchable knowledge base for serverless chatbots. Powers [Sir Chats-A-Lot](https://sir-chats-a-lot.com).
|
|
45
|
-
- **Dream Mode** — idle-time consolidation: confidence decay, self-critique, summary generation, relationship discovery. Never deletes — only suggests reviews.
|
|
46
|
-
- **Transparent** — DB-only with on-demand Obsidian export. `gnosys export` generates a full vault of human-readable `.md` files whenever you need them.
|
|
47
|
-
- **Portfolio Dashboard** — `gnosys status` for one project, `gnosys status --global` for all projects, `gnosys status --web` for an HTML dashboard. `gnosys update-status` runs a guided 8-section checklist for AI agents.
|
|
48
|
-
- **Multimodal ingestion** — ingest PDFs, images, audio, and video. Extraction pipelines for each media type feed structured memories into the central DB.
|
|
49
|
-
- **Hybrid Search** — FTS5 keyword + semantic embeddings via Reciprocal Rank Fusion (RRF).
|
|
50
|
-
- **Multi-project** — MCP roots + per-tool `projectRoot` routing + central project registry. Multiple Cursor windows, zero conflicts.
|
|
51
|
-
- **Process tracing** — `gnosys trace <dir>` builds call chains from source code with `leads_to`, `follows_from`, and `requires` relationships.
|
|
52
|
-
- **Reflection API** — `gnosys.reflect(outcome)` updates confidence and consolidates memories based on real-world outcomes.
|
|
53
|
-
- **Bulk import** — CSV, JSON, JSONL. Import entire datasets in seconds.
|
|
54
|
-
- **Obsidian-native** — `gnosys export` generates a full vault with YAML frontmatter, `[[wikilinks]]`, summaries, and graph data.
|
|
55
|
-
- **Multi-machine sync** — share your `gnosys.db` across machines via NAS or shared drive. Remote NAS is the canonical source of truth; local DB is an offline-resilience cache. Built-in conflict detection with skip-and-flag resolution. Run `gnosys setup remote` to set up.
|
|
56
|
-
- **MCP-compatible** — also runs as a full MCP server that drops into Cursor, Claude Desktop (Chat / Cowork / Code), Claude Code, Codex, Gemini CLI, Antigravity, or any MCP client.
|
|
57
|
-
- **Zero infrastructure** — no external databases, no Docker (unless you want it), no cloud services. Just `npm install`.
|
|
58
|
-
|
|
59
|
-
> For the complete CLI reference and detailed guides, see the **[User Guide](https://gnosys.ai/guide.html)**.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Quick Start
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# 1. Install globally
|
|
67
|
-
npm install -g gnosys
|
|
68
|
-
|
|
69
|
-
# 2. Run the setup wizard (configures provider, API key, and IDE)
|
|
70
|
-
gnosys setup
|
|
71
|
-
|
|
72
|
-
# 3. Initialize a project
|
|
73
|
-
cd your-project
|
|
74
|
-
gnosys init
|
|
75
|
-
|
|
76
|
-
# 4. Start adding memories
|
|
77
|
-
gnosys add "We chose PostgreSQL over MySQL for its JSON support"
|
|
78
|
-
gnosys recall "database selection"
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
> **Postinstall hook:** After `npm install -g gnosys`, a postinstall script automatically runs `gnosys setup` if no configuration is detected, so first-time users are guided through provider and IDE setup immediately.
|
|
82
|
-
|
|
83
|
-
> **Multi-machine?** Set `GNOSYS_GLOBAL` to a cloud-synced folder (iCloud Drive, Dropbox, OneDrive) and both machines share the same brain. To update: run `gnosys upgrade` — it installs the latest gnosys, signals any running MCP servers to restart cleanly, and prompts to run `gnosys setup sync-projects` afterwards (re-syncs all projects, regenerates agent rules, warns other machines to upgrade). See the [User Guide — Installation & Setup](https://gnosys.ai/guide.html#guide-installation) for the full walkthrough, memory scopes, and multi-machine setup.
|
|
84
|
-
|
|
85
|
-
### Agent / Helper Library
|
|
86
|
-
|
|
87
|
-
```ts
|
|
88
|
-
import { gnosys } from "./gnosys-helper"; // generated once via: gnosys helper generate
|
|
89
|
-
|
|
90
|
-
await gnosys.add("We use conventional commits");
|
|
91
|
-
const ctx = await gnosys.recall("auth decisions");
|
|
92
|
-
await gnosys.reinforce("payment logic");
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The helper auto-starts the sandbox if it's not running. No MCP required.
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Interactive Chat (TUI)
|
|
100
|
-
|
|
101
|
-
`gnosys chat` opens a memory-aware terminal chat. Every prompt triggers federated recall against the central brain; the LLM sees relevant memories in context and cites them in its answers.
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
gnosys chat # new session
|
|
105
|
-
gnosys chat --resume <id> # continue an earlier session
|
|
106
|
-
gnosys chat --list # see all sessions
|
|
107
|
-
gnosys chat --search <query> # full-text search across session logs
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Free-text or slash commands.** "remember that flag default is OFF" works the same as `/remember flag default is OFF`. The TUI also recognizes "what did we decide about ULIDs?" → `/recall`, "thanks, that's all" → `/quit`. Destructive intents always confirm; non-destructive ones auto-accept after 5 confirmations of the same pattern.
|
|
111
|
-
|
|
112
|
-
**Slash-command palette (v5.8.0).** Type `/` at column 0 → filterable popup of every chat command appears. Arrow keys navigate, Tab autocompletes the highlighted command into the input, Esc dismisses. Paste detection: when input has newlines or exceeds 200 chars, a compact "[paste: N lines, M chars]" preview surfaces above the input so the buffer stays readable.
|
|
113
|
-
|
|
114
|
-
**24 slash commands** across reading, recall, writing, focus, and polish — type `/help` inside the TUI for the full list. Highlights:
|
|
115
|
-
|
|
116
|
-
- `/pin <id>`, `/scope`, `/threshold`, `/recall <q>` — tune what shows up in context
|
|
117
|
-
- `/remember <text>`, `/save-turn`, `/attach <file>` — promote chat content to gnosys memory (PDFs, images, audio all auto-pin to the session)
|
|
118
|
-
- `/focus <topic>`, `/branch`, `/resume-focus` — replace the "new chat" model with cheap focus boundaries; one continuous session log, instant pivot
|
|
119
|
-
- `/export <file.md>`, `/search-chats <q>`, `/dream-here` — round-trip the session, find old chats, or trigger a focused dream cycle
|
|
120
|
-
|
|
121
|
-
**Multiple choice.** When the model needs you to pick from a small set, it emits a fenced `gnosys-choose` block. The TUI parses it and shows an arrow-key selectable list — provider-agnostic, no tool-use API required.
|
|
122
|
-
|
|
123
|
-
Sessions live as append-only JSONL at `~/.gnosys/chat-sessions/`; promoted memories carry `session:<id>`, `from-chat:true`, and `source:remember|save-turn|auto|attach` provenance tags so you can find them later via federated search.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## Per-Project Bundles
|
|
128
|
-
|
|
129
|
-
Move a single project's memories between machines without dragging the whole central DB.
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
gnosys export project --to ./gnosys-public.json.gz # auto-detects current project
|
|
133
|
-
gnosys export project <projectId> --to <bundle> # explicit
|
|
134
|
-
gnosys import project <bundle> --strategy merge # default — skip existing
|
|
135
|
-
gnosys import project <bundle> --strategy replace # wipe target project first
|
|
136
|
-
gnosys import project <bundle> --strategy new-id # remap to a fresh project ID
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Bundles are gzipped JSON containing the project row, memories (with embeddings inline), relationships, and audit log. Lossless round-trip with the same DB schema; partially compatible across versions via the bundle manifest.
|
|
140
|
-
|
|
141
|
-
For an Obsidian-compatible markdown vault, use `gnosys export vault --to <dir>` (the v5.5.x form `gnosys export --to <dir>` keeps working).
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Web Knowledge Base
|
|
146
|
-
|
|
147
|
-
Turn any website into a searchable knowledge base for AI chatbots. No database required. Works on Vercel, Netlify, Cloudflare Pages, or any platform that can serve files.
|
|
148
|
-
|
|
149
|
-
### Quick Start
|
|
25
|
+
## Install
|
|
150
26
|
|
|
151
27
|
```bash
|
|
152
|
-
cd your-nextjs-site
|
|
153
28
|
npm install -g gnosys
|
|
154
|
-
gnosys
|
|
155
|
-
gnosys web init
|
|
156
|
-
# Edit gnosys.json to set your sitemapUrl
|
|
157
|
-
gnosys web build
|
|
158
|
-
# Add to package.json: "postbuild": "gnosys web build"
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### How It Works
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
DEVELOPMENT TIME (local machine)
|
|
165
|
-
─────────────────────────────────
|
|
166
|
-
gnosys web init → scaffolds /knowledge/ dir, adds config to gnosys.json
|
|
167
|
-
gnosys web ingest → crawls site → converts to markdown → writes /knowledge/*.md
|
|
168
|
-
gnosys web build-index → reads /knowledge/*.md → produces /knowledge/gnosys-index.json
|
|
169
|
-
gnosys web build → runs ingest + build-index in one shot
|
|
170
|
-
|
|
171
|
-
All files committed to git. Deployed with the app.
|
|
172
|
-
|
|
173
|
-
RUNTIME (serverless / any host)
|
|
174
|
-
───────────────────────────────
|
|
175
|
-
import { loadIndex, search } from 'gnosys/web'
|
|
176
|
-
|
|
177
|
-
1. loadIndex('knowledge/gnosys-index.json') → loads pre-computed index into memory
|
|
178
|
-
2. search(index, userMessage, { limit: 6 }) → returns ranked document references
|
|
179
|
-
3. Read matched .md files from filesystem → inject content into LLM prompt
|
|
180
|
-
4. Call Claude/GPT/etc with focused context → respond to user
|
|
181
|
-
|
|
182
|
-
No SQLite. No database. No network calls for search.
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Integration Example (Next.js)
|
|
186
|
-
|
|
187
|
-
```typescript
|
|
188
|
-
// app/api/chat/route.ts
|
|
189
|
-
import { loadIndex, search } from 'gnosys/web'
|
|
190
|
-
import { readFileSync } from 'fs'
|
|
191
|
-
import { join } from 'path'
|
|
192
|
-
|
|
193
|
-
const index = loadIndex(join(process.cwd(), 'knowledge', 'gnosys-index.json'))
|
|
194
|
-
|
|
195
|
-
export async function POST(req: Request) {
|
|
196
|
-
const { message } = await req.json()
|
|
197
|
-
|
|
198
|
-
const results = search(index, message, { limit: 6 })
|
|
199
|
-
const context = results.map(r =>
|
|
200
|
-
readFileSync(join(process.cwd(), 'knowledge', r.document.path), 'utf8')
|
|
201
|
-
).join('\n\n---\n\n')
|
|
202
|
-
|
|
203
|
-
// Pass context to your LLM of choice
|
|
204
|
-
const response = await callLLM({
|
|
205
|
-
system: `Answer using ONLY the provided context.\n\nContext:\n${context}`,
|
|
206
|
-
message
|
|
207
|
-
})
|
|
208
|
-
|
|
209
|
-
return Response.json({ reply: response })
|
|
210
|
-
}
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Web CLI Commands
|
|
214
|
-
|
|
215
|
-
| Command | Description |
|
|
216
|
-
|---------|-------------|
|
|
217
|
-
| `gnosys web init` | Scaffold knowledge directory and config |
|
|
218
|
-
| `gnosys web ingest` | Crawl source and generate knowledge markdown |
|
|
219
|
-
| `gnosys web build-index` | Generate search index from knowledge files |
|
|
220
|
-
| `gnosys web build` | Run ingest + build-index in one shot |
|
|
221
|
-
| `gnosys web add <url>` | Ingest a single URL |
|
|
222
|
-
| `gnosys web remove <path>` | Remove a knowledge file and rebuild index |
|
|
223
|
-
| `gnosys web status` | Show knowledge base status |
|
|
224
|
-
|
|
225
|
-
### Configuration
|
|
226
|
-
|
|
227
|
-
Add to `gnosys.json`:
|
|
228
|
-
|
|
229
|
-
```json
|
|
230
|
-
{
|
|
231
|
-
"web": {
|
|
232
|
-
"source": "sitemap",
|
|
233
|
-
"sitemapUrl": "https://yoursite.com/sitemap.xml",
|
|
234
|
-
"outputDir": "./knowledge",
|
|
235
|
-
"exclude": ["/api", "/admin", "/_next"],
|
|
236
|
-
"categories": {
|
|
237
|
-
"/blog/*": "blog",
|
|
238
|
-
"/services/*": "services",
|
|
239
|
-
"/products/*": "products",
|
|
240
|
-
"/about*": "company"
|
|
241
|
-
},
|
|
242
|
-
"llmEnrich": true,
|
|
243
|
-
"prune": false
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### The `/knowledge/` Directory
|
|
249
|
-
|
|
250
|
-
`gnosys web build` generates a `/knowledge/` directory containing:
|
|
251
|
-
|
|
252
|
-
- **Markdown files** — one per page, with YAML frontmatter (title, category, tags, relevance keywords, source URL, content hash)
|
|
253
|
-
- **`gnosys-index.json`** — pre-computed TF-IDF inverted index for sub-5ms in-memory search
|
|
254
|
-
- All files commit to git and deploy with your app — the knowledge base and the site are always in sync
|
|
255
|
-
|
|
256
|
-
This directory is the bridge between your website content and any AI system. [Sir Chats-A-Lot](https://sir-chats-a-lot.com) uses it to power website chatbots with zero infrastructure.
|
|
257
|
-
|
|
258
|
-
### Generative Engine Optimization (GEO)
|
|
259
|
-
|
|
260
|
-
The `/knowledge/` markdown files double as a structured content layer for AI crawlers and LLM-powered search engines. To make your knowledge base discoverable:
|
|
261
|
-
|
|
262
|
-
1. Add a [`llms.txt`](https://llmstxt.org/) file to your site root pointing to the knowledge directory
|
|
263
|
-
2. Reference individual markdown files in your `llms.txt` for fine-grained content exposure
|
|
264
|
-
3. YAML frontmatter provides structured metadata (title, category, tags) that LLMs can parse directly
|
|
265
|
-
|
|
266
|
-
This improves your site's visibility in AI-powered search results and enables LLMs to cite your content accurately.
|
|
267
|
-
|
|
268
|
-
### SQLite vs Web Mode
|
|
269
|
-
|
|
270
|
-
| Aspect | SQLite (default) | Web Knowledge Base |
|
|
271
|
-
|--------|------------------|--------------------|
|
|
272
|
-
| Storage | Central `~/.gnosys/gnosys.db` | Markdown files in repo |
|
|
273
|
-
| Search | FTS5 + optional embeddings | Pre-computed inverted index |
|
|
274
|
-
| Write support | Full CRUD | Read-only (build-time only) |
|
|
275
|
-
| Infrastructure | None (embedded SQLite) | None (files deploy with app) |
|
|
276
|
-
| Best for | Local agents, MCP, CLI | Web chatbots, serverless |
|
|
277
|
-
| Search latency | <10ms | <5ms (in-memory index) |
|
|
278
|
-
| Supports Dream Mode | Yes | No (read-only) |
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
## MCP Server Setup
|
|
283
|
-
|
|
284
|
-
The fastest way to wire gnosys into any supported client is to run `gnosys init <ide>` from the project directory you want memory-enabled. Examples:
|
|
285
|
-
|
|
286
|
-
```bash
|
|
287
|
-
gnosys init claude-desktop # Claude Desktop (covers Chat, Cowork, and Code)
|
|
288
|
-
gnosys init claude # Claude Code CLI
|
|
289
|
-
gnosys init cursor # Cursor
|
|
290
|
-
gnosys init codex # Codex
|
|
291
|
-
gnosys init gemini-cli # Gemini CLI
|
|
292
|
-
gnosys init antigravity # Google Antigravity
|
|
29
|
+
gnosys setup # configures provider, API key, and your IDE/agent
|
|
293
30
|
```
|
|
294
31
|
|
|
295
|
-
|
|
296
|
-
1. Wires gnosys into the IDE's MCP config (idempotent — safe to re-run).
|
|
297
|
-
2. Initializes the current directory as a gnosys project (creates `.gnosys/gnosys.json`, registers it in the central DB) so your memories can be scoped to it.
|
|
298
|
-
|
|
299
|
-
### One-time vs. per-project
|
|
300
|
-
|
|
301
|
-
The IDE wiring writes to a **user-level** config file, so it only needs to happen **once**. Re-running it in another project just re-merges the same `mcpServers.gnosys` entry — harmless.
|
|
302
|
-
|
|
303
|
-
The project registration is **per-directory**: every codebase you want to be memory-aware of needs its own `gnosys init`. From then on, agents pass `projectRoot: "/path/to/project"` to gnosys MCP tools to scope memory to that codebase.
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
# Once, anywhere — wires Claude Desktop's MCP config:
|
|
307
|
-
gnosys init claude-desktop
|
|
308
|
-
|
|
309
|
-
# Once per project — registers the codebase in the central DB:
|
|
310
|
-
cd /path/to/project-a && gnosys init
|
|
311
|
-
cd /path/to/project-b && gnosys init
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
> **Cowork users:** Cowork sessions don't have a working directory like a CLI does. The agent in Cowork uses whichever `projectRoot` it's told to use (typically auto-detected from open files or set via the system prompt). The "every working directory" question doesn't apply to Cowork itself — only to the projects you want memory-enabled. Run `gnosys init claude-desktop` once globally; run `gnosys init` per project.
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
## Setup Wizards
|
|
319
|
-
|
|
320
|
-
`gnosys setup` runs the full interactive wizard. To configure just one piece without walking the whole thing, use one of these subcommands:
|
|
32
|
+
## Quick start
|
|
321
33
|
|
|
322
34
|
```bash
|
|
323
|
-
|
|
324
|
-
gnosys
|
|
325
|
-
gnosys
|
|
326
|
-
gnosys
|
|
327
|
-
gnosys
|
|
328
|
-
gnosys setup routing # per-task LLM routing (structuring/synthesis/chat/vision/transcription)
|
|
35
|
+
cd your-project
|
|
36
|
+
gnosys init # register the project
|
|
37
|
+
gnosys add "We chose PostgreSQL over MySQL for JSON support"
|
|
38
|
+
gnosys recall "database selection" # what's relevant right now
|
|
39
|
+
gnosys chat # memory-aware terminal chat
|
|
329
40
|
```
|
|
330
41
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
Dream Mode is the idle-time consolidation engine — confidence decay, summary generation, self-critique, relationship discovery. With multi-machine sync (v5.3.0+), running dream cycles from every machine wastes work and fights for SQLite write locks. v5.4.2 introduces a **single designated machine** model:
|
|
334
|
-
|
|
335
|
-
- Run `gnosys setup dream` on the machine you want to host dream cycles.
|
|
336
|
-
- The wizard validates your provider/model with a live API probe before saving.
|
|
337
|
-
- Other machines stay quiet — they see the designation in the central DB and skip the scheduler.
|
|
338
|
-
- `gnosys dream log` shows recent runs; `gnosys status --system` has a `DREAM HEALTH` section with last-run timestamp, designated machine, and consecutive-failure counter.
|
|
339
|
-
- If the designated machine's LLM provider becomes unreachable, you'll see warnings at three layers: in audit log entries (`dream_provider_unreachable`), as stderr at MCP startup, and as a desktop notification after 3 consecutive failures.
|
|
340
|
-
|
|
341
|
-
### Removed in v5.4.2
|
|
42
|
+
That's the 60-second tour. **Everything else lives on [gnosys.ai](https://gnosys.ai).**
|
|
342
43
|
|
|
343
|
-
|
|
44
|
+
## What you get
|
|
344
45
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
46
|
+
- **Central brain** — one `~/.gnosys/gnosys.db` unifies every project (project / user / global scopes). Sub-10ms reads, SQLite as the sole source of truth.
|
|
47
|
+
- **Federated search** — tier-boosted hybrid (FTS5 keyword + semantic) search across scopes, with recency and reinforcement.
|
|
48
|
+
- **MCP server** — `gnosys serve` exposes 50+ memory tools to any MCP client. Sandbox-first runtime keeps context cost near zero.
|
|
49
|
+
- **Web Knowledge Base** — `gnosys web build` turns any site into a searchable index for serverless chatbots. Zero runtime deps.
|
|
50
|
+
- **Dream Mode** — idle-time consolidation: confidence decay, summaries, relationship discovery. Never deletes — only suggests.
|
|
51
|
+
- **Multi-machine sync** — share your brain across machines; conflict detection with skip-and-flag resolution.
|
|
52
|
+
- **Obsidian export** — `gnosys export` regenerates a full vault with frontmatter, `[[wikilinks]]`, and graph data.
|
|
351
53
|
|
|
352
|
-
|
|
54
|
+
## Documentation
|
|
353
55
|
|
|
354
|
-
|
|
|
56
|
+
| | |
|
|
355
57
|
|---|---|
|
|
356
|
-
|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
tells running MCP servers to exit-and-respawn against the new global
|
|
363
|
-
binary. Run it on each machine.
|
|
364
|
-
|
|
365
|
-
### Behaviour changes in v5.8.0
|
|
366
|
-
|
|
367
|
-
| What | Then | Now |
|
|
368
|
-
|---|---|---|
|
|
369
|
-
| `gnosys_sync` MCP tool | Always wrote a `GNOSYS:START/END` block into `CLAUDE.md` (a tracked file) | Inert by default — returns the block as text only. Pass `commit_to_disk: true` to actually write. |
|
|
370
|
-
| `gnosys_preference_set/delete` MCP success messages | Suggested "Run `gnosys_sync` to update agent rules" | No suggestion — SessionStart hook (`gnosys recall`) injects updated context next session. |
|
|
371
|
-
| `gnosys_add` / `gnosys_commit_context` when project's `gnosys.json` has no `llm` block | Failed with "set ANTHROPIC_API_KEY", ignoring the global xAI/OpenAI/etc. config | Resolves the LLM against the merged project+global config — falls back to the user's global provider. |
|
|
372
|
-
| Chat TUI input | Cleared before user turn appeared (visible glitch) | Both happen in the same render frame. |
|
|
373
|
-
| `gnosys --help`, `gnosys list`, etc. | Loaded `@huggingface/transformers` (80MB) every invocation | Heavy modules lazy-load on actual use (reindex, recall, chat, bootstrap, import). |
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
### Manual config (if you prefer)
|
|
378
|
-
|
|
379
|
-
If you'd rather edit configs by hand, here's where each client looks for MCP servers.
|
|
380
|
-
|
|
381
|
-
#### Claude Desktop (Chat, Cowork, and Code share the same config)
|
|
382
|
-
|
|
383
|
-
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS), `%APPDATA%\Claude\claude_desktop_config.json` (Windows), or `~/.config/Claude/claude_desktop_config.json` (Linux):
|
|
384
|
-
|
|
385
|
-
```json
|
|
386
|
-
{
|
|
387
|
-
"mcpServers": {
|
|
388
|
-
"gnosys": {
|
|
389
|
-
"command": "gnosys",
|
|
390
|
-
"args": ["serve"]
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
Restart Claude Desktop after editing.
|
|
397
|
-
|
|
398
|
-
#### Cursor
|
|
399
|
-
|
|
400
|
-
Add to `.cursor/mcp.json` in your project:
|
|
401
|
-
|
|
402
|
-
```json
|
|
403
|
-
{
|
|
404
|
-
"mcpServers": {
|
|
405
|
-
"gnosys": {
|
|
406
|
-
"command": "gnosys",
|
|
407
|
-
"args": ["serve"]
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
#### Claude Code
|
|
414
|
-
|
|
415
|
-
```bash
|
|
416
|
-
claude mcp add gnosys gnosys serve
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
#### Codex
|
|
420
|
-
|
|
421
|
-
Add to `.codex/config.toml`:
|
|
422
|
-
|
|
423
|
-
```toml
|
|
424
|
-
[mcp.gnosys]
|
|
425
|
-
type = "local"
|
|
426
|
-
command = ["gnosys", "serve"]
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
#### Gemini CLI
|
|
430
|
-
|
|
431
|
-
Add to `~/.gemini/settings.json` (preserves any existing settings):
|
|
432
|
-
|
|
433
|
-
```json
|
|
434
|
-
{
|
|
435
|
-
"mcpServers": {
|
|
436
|
-
"gnosys": {
|
|
437
|
-
"command": "gnosys",
|
|
438
|
-
"args": ["serve"]
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
#### Antigravity
|
|
445
|
-
|
|
446
|
-
Add to `~/.gemini/antigravity/mcp_config.json`:
|
|
447
|
-
|
|
448
|
-
```json
|
|
449
|
-
{
|
|
450
|
-
"mcpServers": {
|
|
451
|
-
"gnosys": {
|
|
452
|
-
"command": "gnosys",
|
|
453
|
-
"args": ["serve"]
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
Antigravity reloads MCP servers automatically when you save the file.
|
|
460
|
-
|
|
461
|
-
> **Note:** API keys are configured via `gnosys setup` (macOS Keychain, environment variable, or `~/.config/gnosys/.env`). See [LLM Provider Setup](https://gnosys.ai/guide.html#guide-llm-provider-setup) in the User Guide.
|
|
462
|
-
|
|
463
|
-
---
|
|
464
|
-
|
|
465
|
-
## MCP Tools
|
|
466
|
-
|
|
467
|
-
| Tool | Description |
|
|
468
|
-
|------|-------------|
|
|
469
|
-
| `gnosys_discover` | Find relevant memories by keyword (start here) |
|
|
470
|
-
| `gnosys_read` | Read a specific memory |
|
|
471
|
-
| `gnosys_search` | Full-text search across stores |
|
|
472
|
-
| `gnosys_hybrid_search` | Hybrid keyword + semantic search (RRF fusion) |
|
|
473
|
-
| `gnosys_semantic_search` | Semantic similarity search (embeddings) |
|
|
474
|
-
| `gnosys_ask` | Ask a question, get a synthesized answer with citations |
|
|
475
|
-
| `gnosys_reindex` | Rebuild semantic embeddings from all memories |
|
|
476
|
-
| `gnosys_list` | List memories with optional filters |
|
|
477
|
-
| `gnosys_lens` | Filtered views — combine category, tag, status, confidence, date filters |
|
|
478
|
-
| `gnosys_add` | Add a memory (LLM-structured) |
|
|
479
|
-
| `gnosys_add_structured` | Add with explicit fields (no LLM) |
|
|
480
|
-
| `gnosys_update` | Update frontmatter or content |
|
|
481
|
-
| `gnosys_reinforce` | Signal usefulness of a memory |
|
|
482
|
-
| `gnosys_commit_context` | Extract memories from conversation context |
|
|
483
|
-
| `gnosys_bootstrap` | Batch-import existing markdown documents |
|
|
484
|
-
| `gnosys_import` | Bulk import from CSV, JSON, or JSONL |
|
|
485
|
-
| `gnosys_init` | Initialize a new store |
|
|
486
|
-
| `gnosys_stale` | Find memories not modified within N days |
|
|
487
|
-
| `gnosys_history` | Version history for a memory (audit log) |
|
|
488
|
-
| `gnosys_rollback` | Rollback a memory to a previous version |
|
|
489
|
-
| `gnosys_timeline` | Show when memories were created/modified over time |
|
|
490
|
-
| `gnosys_stats` | Summary statistics for the memory store |
|
|
491
|
-
| `gnosys_links` | Show wikilinks and backlinks for a memory |
|
|
492
|
-
| `gnosys_graph` | Full cross-reference graph across all memories |
|
|
493
|
-
| `gnosys_maintain` | Run vault maintenance (decay, dedup, consolidation, archiving) |
|
|
494
|
-
| `gnosys_dearchive` | Force-dearchive memories from archive back to active |
|
|
495
|
-
| `gnosys_dashboard` | System dashboard (memory count, health, archive, graph, LLM status) |
|
|
496
|
-
| `gnosys_reindex_graph` | Build/rebuild the wikilink graph |
|
|
497
|
-
| `gnosys_dream` | Run a Dream Mode cycle (decay, self-critique, summaries, relationships) |
|
|
498
|
-
| `gnosys_export` | Export gnosys.db to an Obsidian-compatible vault |
|
|
499
|
-
| `gnosys_recall` | Fast memory injection for agent orchestrators (sub-50ms) |
|
|
500
|
-
| `gnosys_audit` | View structured audit trail of all memory operations |
|
|
501
|
-
| `gnosys_stores` | Show active stores, MCP roots, and detected project stores |
|
|
502
|
-
| `gnosys_tags` | List tag registry |
|
|
503
|
-
| `gnosys_tags_add` | Add a new tag to the registry |
|
|
504
|
-
| `gnosys_ingest_file` | Ingest a file (PDF, image, audio, video, DOCX) into memory |
|
|
505
|
-
| `gnosys_portfolio` | Portfolio dashboard — project status across all registered projects |
|
|
506
|
-
| `gnosys_update_status` | Guided 8-section status update checklist for AI agents |
|
|
507
|
-
| **Centralized Brain** | |
|
|
508
|
-
| `gnosys_backup` | Create a point-in-time backup of the central DB |
|
|
509
|
-
| `gnosys_restore` | Restore the central DB from a backup |
|
|
510
|
-
| `gnosys_migrate_to_central` | Migrate project data into the central DB |
|
|
511
|
-
| `gnosys_preference_set` | Set a user preference (stored as scoped memory) |
|
|
512
|
-
| `gnosys_preference_get` | Get one or all preferences |
|
|
513
|
-
| `gnosys_preference_delete` | Delete a preference |
|
|
514
|
-
| `gnosys_sync` | Regenerate agent rules file from preferences + conventions |
|
|
515
|
-
| `gnosys_federated_search` | Tier-boosted search across project > user > global scopes |
|
|
516
|
-
| `gnosys_detect_ambiguity` | Check if a query matches multiple projects |
|
|
517
|
-
| `gnosys_briefing` | Generate project briefing (categories, activity, tags, summary) |
|
|
518
|
-
| `gnosys_working_set` | Get recently modified memories for the current project |
|
|
519
|
-
| **Multi-Machine Sync** | |
|
|
520
|
-
| `gnosys_remote_status` | Check sync state (pending changes, conflicts, reachability) |
|
|
521
|
-
| `gnosys_remote_push` | Push local changes to remote |
|
|
522
|
-
| `gnosys_remote_pull` | Pull remote changes to local |
|
|
523
|
-
| `gnosys_remote_resolve` | Resolve a conflict by choosing local or remote |
|
|
524
|
-
|
|
525
|
-
---
|
|
526
|
-
|
|
527
|
-
## Key Features
|
|
528
|
-
|
|
529
|
-
### Central Brain
|
|
530
|
-
|
|
531
|
-
All memories live in a single `~/.gnosys/gnosys.db` with `project_id` and `scope` columns. SQLite is the sole source of truth — no dual-write, no markdown files on disk. Sub-10ms reads, WAL mode for concurrent access. Use `gnosys export` to generate an Obsidian vault on demand. See the [User Guide](https://gnosys.ai/guide.html) for the full schema and memory format.
|
|
532
|
-
|
|
533
|
-
### Multi-Machine Sync
|
|
534
|
-
|
|
535
|
-
Gnosys supports running across multiple machines with a shared database on a NAS or network share.
|
|
536
|
-
|
|
537
|
-
**How it works:**
|
|
538
|
-
- Remote DB on a network share (e.g. `/Volumes/nas/gnosys/`) is the canonical source of truth
|
|
539
|
-
- Local DB at `~/.gnosys/gnosys.db` is an offline-resilience cache, not a performance optimization
|
|
540
|
-
- Reads hit remote when reachable; fall back to local cache when remote is offline
|
|
541
|
-
- Writes go to remote first; queue locally and auto-flush when offline
|
|
542
|
-
- Per-memory `modified` timestamps detect conflicts; ULID memory IDs prevent collisions across concurrent writers
|
|
543
|
-
- Skip-and-flag is the safe default; `--newer-wins` for unattended sync
|
|
544
|
-
|
|
545
|
-
**Setup:**
|
|
546
|
-
```bash
|
|
547
|
-
gnosys setup remote
|
|
548
|
-
# interactive: validates path, tests SQLite locking, checks latency
|
|
549
|
-
```
|
|
550
|
-
|
|
551
|
-
**Daily commands:**
|
|
552
|
-
```bash
|
|
553
|
-
gnosys remote status # pending changes, conflicts, last sync
|
|
554
|
-
gnosys remote sync # two-way sync (push then pull)
|
|
555
|
-
gnosys remote push # local → remote only
|
|
556
|
-
gnosys remote pull # remote → local only
|
|
557
|
-
gnosys remote resolve <id> --keep <local|remote>
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
**AI-mediated conflict resolution:** Agents using gnosys via MCP can detect sync state and prompt the user when conflicts arise, rather than silently picking a winner. The agent presents both versions and asks which to keep.
|
|
561
|
-
|
|
562
|
-
### LLM Providers
|
|
563
|
-
|
|
564
|
-
Eight providers behind a single interface — switch between cloud and local with one command:
|
|
565
|
-
|
|
566
|
-
| Provider | Type | Default Model | API Key Env Var |
|
|
567
|
-
|----------|------|---------------|-----------------|
|
|
568
|
-
| **Anthropic** | Cloud | claude-sonnet-4-6 | `GNOSYS_ANTHROPIC_KEY` |
|
|
569
|
-
| **Ollama** | Local | llama3.2 | — (runs locally) |
|
|
570
|
-
| **Groq** | Cloud | llama-3.3-70b-versatile | `GNOSYS_GROQ_KEY` |
|
|
571
|
-
| **OpenAI** | Cloud | gpt-4o-mini | `GNOSYS_OPENAI_KEY` |
|
|
572
|
-
| **LM Studio** | Local | default | — (runs locally) |
|
|
573
|
-
| **xAI** | Cloud | grok-3 | `GNOSYS_XAI_KEY` |
|
|
574
|
-
| **Mistral** | Cloud | mistral-small-latest | `GNOSYS_MISTRAL_KEY` |
|
|
575
|
-
| **Custom** | Any | (user-defined) | `GNOSYS_CUSTOM_KEY` |
|
|
576
|
-
|
|
577
|
-
> Model lists and pricing are fetched dynamically from [OpenRouter](https://openrouter.ai) during `gnosys setup` and cached for 24 hours. Bundled defaults are used when offline.
|
|
578
|
-
|
|
579
|
-
> **API Key Security:** `gnosys setup` offers three storage options: macOS Keychain (recommended — encrypted, no plaintext), environment variable (shell profile), or `~/.config/gnosys/.env` (least secure). Legacy env var names (`ANTHROPIC_API_KEY`, `GROQ_API_KEY`, `OPENAI_API_KEY`, etc.) are still supported for backward compatibility.
|
|
580
|
-
|
|
581
|
-
Route tasks to different providers — a cheap model for structuring, a powerful model for synthesis:
|
|
582
|
-
|
|
583
|
-
```json
|
|
584
|
-
{
|
|
585
|
-
"llm": {
|
|
586
|
-
"defaultProvider": "anthropic",
|
|
587
|
-
"anthropic": { "model": "claude-sonnet-4-6" },
|
|
588
|
-
"ollama": { "model": "llama3.2", "baseUrl": "http://localhost:11434" }
|
|
589
|
-
},
|
|
590
|
-
"taskModels": {
|
|
591
|
-
"structuring": { "provider": "ollama", "model": "llama3.2" },
|
|
592
|
-
"synthesis": { "provider": "anthropic", "model": "claude-sonnet-4-6" }
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
### Dream Mode
|
|
598
|
-
|
|
599
|
-
Idle-time consolidation inspired by biological memory: confidence decay, self-critique, summary generation, and relationship discovery. Runs automatically when the sandbox is idle, or manually with `gnosys dream`. Never deletes — only flags for review. See the [User Guide](https://gnosys.ai/guide.html) for configuration and scheduling.
|
|
600
|
-
|
|
601
|
-
### Federated Search
|
|
602
|
-
|
|
603
|
-
All search commands support `--federated` to search across project (1.5x boost), user (1.0x), and global (0.7x) scopes in the central DB. Recency adds a 1.3x boost, reinforcement count adds up to 25%. Results include `scope` and `boosts` fields so agents know where each memory came from. See the [User Guide](https://gnosys.ai/guide.html) for details.
|
|
604
|
-
|
|
605
|
-
### Process Tracing
|
|
606
|
-
|
|
607
|
-
`gnosys trace ./src` scans TypeScript/JavaScript files, extracts function declarations and call sites, then stores each as a procedural "how" memory with `leads_to`, `follows_from`, and `requires` relationships. `gnosys traverse <id>` walks relationship chains via BFS with depth limiting and type filtering. See the [User Guide](https://gnosys.ai/guide.html) for details.
|
|
608
|
-
|
|
609
|
-
### Obsidian Export
|
|
610
|
-
|
|
611
|
-
The primary store is the central `gnosys.db`. Use the Obsidian Export Bridge to generate a full vault:
|
|
612
|
-
|
|
613
|
-
```bash
|
|
614
|
-
gnosys export --to ~/vaults/my-project
|
|
615
|
-
gnosys export --to ~/vaults/my-project --overwrite
|
|
616
|
-
gnosys export --to ~/vaults/my-project --all # summaries, reviews, graph data
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
### Bulk Import
|
|
620
|
-
|
|
621
|
-
Import any structured dataset into atomic memories:
|
|
622
|
-
|
|
623
|
-
```bash
|
|
624
|
-
# JSON with field mapping
|
|
625
|
-
gnosys import foods.json --format json \
|
|
626
|
-
--mapping '{"description":"title","foodCategory":"category","notes":"content"}' \
|
|
627
|
-
--mode structured
|
|
628
|
-
|
|
629
|
-
# CSV
|
|
630
|
-
gnosys import data.csv --format csv \
|
|
631
|
-
--mapping '{"name":"title","type":"category","notes":"content"}'
|
|
632
|
-
|
|
633
|
-
# JSONL (one record per line)
|
|
634
|
-
gnosys import events.jsonl --format jsonl \
|
|
635
|
-
--mapping '{"event":"title","type":"category","details":"content"}'
|
|
636
|
-
```
|
|
637
|
-
|
|
638
|
-
---
|
|
639
|
-
|
|
640
|
-
## Comparison
|
|
641
|
-
|
|
642
|
-
| Aspect | Plain Markdown | RAG (Vector DB) | Knowledge Graph | **Gnosys** |
|
|
643
|
-
|--------|---------------|-----------------|-----------------|-----------|
|
|
644
|
-
| **Examples** | CLAUDE.md, .cursorrules | Mem0, LangChain Memory | Graphiti/Zep, Mem0 Graph | — |
|
|
645
|
-
| **Storage** | `.md` files | Embeddings in vector DB | Nodes/edges in graph DB | Central SQLite DB (on-demand Obsidian export) |
|
|
646
|
-
| **Transparency** | Perfect | Lossy (embeddings) | High (query nodes) | High (SQLite + audit log + Obsidian export) |
|
|
647
|
-
| **Version history** | Git native | None built-in | None built-in | Audit log table in SQLite |
|
|
648
|
-
| **Keyword search** | Manual / grep | BM25 layer (some) | BM25 layer (some) | FTS5 (built-in) |
|
|
649
|
-
| **Semantic search** | None | Vector similarity | Graph + vectors | Vector + FTS5 hybrid (RRF) |
|
|
650
|
-
| **Relationship traversal** | None | None | Multi-hop graph queries | Wikilinks (manual encoding) |
|
|
651
|
-
| **Scale comfort zone** | ~5K memories | 100K+ | 100K+ | 100K+ (unified SQLite + archive tier) |
|
|
652
|
-
| **Setup time** | < 5 min | 30 min - 2 hours | 4 - 8 hours | 15 - 30 min |
|
|
653
|
-
| **Infrastructure** | None | Vector DB + embeddings API | Graph DB + LLM | SQLite (embedded) |
|
|
654
|
-
| **Human editability** | Excellent | Poor (re-embed) | Moderate | Excellent |
|
|
655
|
-
| **MCP integration** | Via skill files | Custom server | Mem0 ships MCP | MCP server (included) |
|
|
656
|
-
| **Obsidian compatible** | Partially | No | No | Yes (full vault) |
|
|
657
|
-
| **Cost** | Free | $0-500+/mo (cloud DB + embeddings) | $250+/mo (Mem0 Pro) or self-host | Free (MIT) |
|
|
658
|
-
| **Offline capable** | Yes | Self-hosted only | Self-hosted only | Yes (Ollama/LM Studio) |
|
|
659
|
-
|
|
660
|
-
---
|
|
661
|
-
|
|
662
|
-
## CLI Reference
|
|
663
|
-
|
|
664
|
-
All commands support `--json` for programmatic output. See the [User Guide](https://gnosys.ai/guide.html) for full details.
|
|
665
|
-
|
|
666
|
-
**Getting started:** `setup`, `init`, `upgrade`
|
|
667
|
-
|
|
668
|
-
**Memory operations:** `add`, `add-structured`, `commit-context`, `read`, `update`, `reinforce`, `bootstrap`, `import`
|
|
669
|
-
|
|
670
|
-
**Search:** `discover`, `search`, `hybrid-search`, `semantic-search`, `ask`, `recall`, `fsearch`
|
|
671
|
-
|
|
672
|
-
**Views & analysis:** `list`, `lens`, `stale`, `timeline`, `stats`, `links`, `graph`, `tags`, `tags-add`, `audit`
|
|
673
|
-
|
|
674
|
-
**History:** `history`, `rollback`
|
|
675
|
-
|
|
676
|
-
**Maintenance:** `maintain`, `dearchive`, `dream`, `reindex`, `reindex-graph`
|
|
677
|
-
|
|
678
|
-
**Export & config:** `export`, `setup`, `config show`, `config set`, `dashboard`, `doctor`, `stores`
|
|
679
|
-
|
|
680
|
-
**Portfolio & status:** `status`, `status --global`, `status --web`, `portfolio`, `update-status`
|
|
681
|
-
|
|
682
|
-
**Centralized brain:** `backup`, `restore`, `migrate`, `pref set/get/delete`, `sync`, `ambiguity`, `briefing`, `working-set`
|
|
683
|
-
|
|
684
|
-
**Multimodal ingestion:** `ingest-file` (PDF, image, audio, video, DOCX)
|
|
685
|
-
|
|
686
|
-
**Sandbox:** `sandbox start/stop/status`, `helper generate`
|
|
687
|
-
|
|
688
|
-
**Web knowledge base:** `web init`, `web ingest`, `web build-index`, `web build`, `web add`, `web remove`, `web status`
|
|
689
|
-
|
|
690
|
-
**Multi-machine sync:** `remote status`, `remote sync`, `remote push`, `remote pull`, `remote resolve` (configure via `gnosys setup remote`)
|
|
691
|
-
|
|
692
|
-
**Server:** `serve`, `serve --with-maintenance`
|
|
693
|
-
|
|
694
|
-
---
|
|
695
|
-
|
|
696
|
-
## Development
|
|
697
|
-
|
|
698
|
-
```bash
|
|
699
|
-
npm install # Install dependencies
|
|
700
|
-
npm run build # Compile TypeScript
|
|
701
|
-
npm test # Run test suite (738 tests)
|
|
702
|
-
npm run test:watch # Run tests in watch mode
|
|
703
|
-
npm run test:coverage # Run tests with v8 coverage report (HTML in coverage/)
|
|
704
|
-
npm run dev # Run MCP server in dev mode (tsx)
|
|
705
|
-
```
|
|
706
|
-
|
|
707
|
-
738 tests across 35+ files. CI runs on Node 20 + 22 with multi-project scenario testing, network-share simulation, and TypeScript strict checking. Publishing uses OIDC trusted publishing via GitHub Actions — no npm tokens needed.
|
|
708
|
-
|
|
709
|
-
---
|
|
710
|
-
|
|
711
|
-
## Architecture
|
|
712
|
-
|
|
713
|
-
```
|
|
714
|
-
src/
|
|
715
|
-
index.ts # MCP server — 50+ tools + gnosys://recall resource
|
|
716
|
-
cli.ts # CLI — full command suite with --json output
|
|
717
|
-
lib/
|
|
718
|
-
db.ts # Central SQLite (6-table schema, project_id + scope)
|
|
719
|
-
dbSearch.ts # Adapter bridging GnosysDB to search interfaces
|
|
720
|
-
dbWrite.ts # DB write helpers (SQLite sole source of truth)
|
|
721
|
-
migrate.ts # Migration: v1.x -> v2.0 -> central DB
|
|
722
|
-
dream.ts # Dream Mode engine + idle scheduler
|
|
723
|
-
export.ts # Obsidian Export Bridge (gnosys.db -> vault)
|
|
724
|
-
federated.ts # Federated search, ambiguity detection, briefings
|
|
725
|
-
preferences.ts # User preferences as scoped memories
|
|
726
|
-
rulesGen.ts # Agent rules generation (GNOSYS:START/END blocks)
|
|
727
|
-
store.ts # Bootstrap/import of external markdown files
|
|
728
|
-
search.ts # FTS5 search and discovery
|
|
729
|
-
embeddings.ts # Lazy semantic embeddings (all-MiniLM-L6-v2)
|
|
730
|
-
hybridSearch.ts # Hybrid search with RRF fusion
|
|
731
|
-
ask.ts # Freeform Q&A with LLM synthesis + citations
|
|
732
|
-
llm.ts # LLM abstraction (8 providers + setup wizard)
|
|
733
|
-
maintenance.ts # Auto-maintenance: decay, dedup, archiving
|
|
734
|
-
archive.ts # Two-tier memory: active <-> archive
|
|
735
|
-
recall.ts # Ultra-fast recall for agent orchestrators
|
|
736
|
-
audit.ts # Structured audit logging
|
|
737
|
-
graph.ts # Persistent wikilink graph
|
|
738
|
-
trace.ts # Process tracing + reflection
|
|
739
|
-
config.ts # gnosys.json loader with Zod validation
|
|
740
|
-
resolver.ts # Layered multi-store resolution + MCP roots
|
|
741
|
-
import.ts # Bulk import engine (CSV, JSON, JSONL)
|
|
742
|
-
portfolio.ts # Portfolio dashboard (single/global project status)
|
|
743
|
-
portfolioHtml.ts # HTML dashboard renderer for gnosys status --web
|
|
744
|
-
# Multimodal ingestion
|
|
745
|
-
multimodalIngest.ts # Orchestrator for multi-format file ingestion
|
|
746
|
-
attachments.ts # Attachment storage and linking
|
|
747
|
-
pdfExtract.ts # PDF text/structure extraction
|
|
748
|
-
imageExtract.ts # Image description via vision models
|
|
749
|
-
audioExtract.ts # Audio transcription
|
|
750
|
-
videoExtract.ts # Video transcription and frame extraction
|
|
751
|
-
# Web Knowledge Base
|
|
752
|
-
staticSearch.ts # Zero-dep web search runtime (gnosys/web)
|
|
753
|
-
structuredIngest.ts # No-LLM fallback with TF-IDF keyword extraction
|
|
754
|
-
webIndex.ts # Build-time inverted index generator
|
|
755
|
-
webIngest.ts # Site crawler (sitemap -> markdown)
|
|
756
|
-
sandbox/
|
|
757
|
-
server.ts # Unix socket server + Dream Mode scheduler
|
|
758
|
-
client.ts # Client for agent connections
|
|
759
|
-
manager.ts # Process lifecycle management
|
|
760
|
-
```
|
|
761
|
-
|
|
762
|
-
---
|
|
763
|
-
|
|
764
|
-
## Benchmarks
|
|
765
|
-
|
|
766
|
-
Real numbers from a 120-memory test vault:
|
|
767
|
-
|
|
768
|
-
| Metric | Result |
|
|
769
|
-
|--------|--------|
|
|
770
|
-
| Import 100 records (structured) | 0.6s |
|
|
771
|
-
| Cold start (first load) | 0.3s |
|
|
772
|
-
| Keyword search (FTS5) | <10ms |
|
|
773
|
-
| Hybrid search (keyword + semantic) | ~50ms |
|
|
774
|
-
| Reindex 120 embeddings | ~8s (first run downloads ~80 MB model) |
|
|
775
|
-
| Maintenance dry-run (120 memories) | ~2s |
|
|
776
|
-
| Graph reindex (120 memories) | <1s |
|
|
777
|
-
| Storage per memory | ~1 KB (SQLite row) |
|
|
778
|
-
| Embedding storage (120 memories) | ~0.3 MB |
|
|
779
|
-
| Test suite | 738 tests, 0 errors |
|
|
780
|
-
|
|
781
|
-
All benchmarks on Apple M-series hardware, Node.js 20+. Structured imports bypass LLM entirely.
|
|
782
|
-
|
|
783
|
-
---
|
|
784
|
-
|
|
785
|
-
## Community & Next Steps
|
|
786
|
-
|
|
787
|
-
Gnosys is open source (MIT) and actively developed. Here's how to get involved:
|
|
788
|
-
|
|
789
|
-
**Get started fast:**
|
|
790
|
-
- **Cursor template:** Add Gnosys to any Cursor project with one MCP config line (see [MCP Server Setup](#mcp-server-setup))
|
|
791
|
-
- **Docker:** `docker build -t gnosys . && docker compose up` for containerized deployment
|
|
792
|
-
|
|
793
|
-
**Contribute:**
|
|
794
|
-
- [GitHub Discussions](https://github.com/proticom/gnosys/discussions) — share ideas, ask questions, show what you've built
|
|
795
|
-
- [Issues](https://github.com/proticom/gnosys/issues) — bug reports and feature requests
|
|
796
|
-
- PRs welcome — especially for new import connectors, LLM providers, and Obsidian plugins
|
|
797
|
-
|
|
798
|
-
**What's next:**
|
|
799
|
-
- Improved network share latency (write-ahead batching for high-latency NAS)
|
|
800
|
-
- Automated background sync via LaunchAgent (macOS) / systemd (Linux)
|
|
801
|
-
- Temporal memory versioning (valid_from / valid_until)
|
|
802
|
-
- Cross-session "deep dream" overnight consolidation
|
|
803
|
-
- Graph visualization in the dashboard
|
|
804
|
-
- Obsidian community plugin for native vault integration
|
|
805
|
-
- Docker Hub published image for one-line deployment
|
|
806
|
-
- Improved test coverage targets
|
|
807
|
-
- Automated CHANGELOG generation
|
|
808
|
-
|
|
809
|
-
---
|
|
58
|
+
| **Full docs & guides** | <https://gnosys.ai> |
|
|
59
|
+
| **Complete CLI + MCP reference** | <https://gnosys.ai/guide.html> |
|
|
60
|
+
| **Changelog** | [CHANGELOG.md](./CHANGELOG.md) |
|
|
61
|
+
| **Contributing** | [CONTRIBUTING.md](./CONTRIBUTING.md) |
|
|
62
|
+
| **Security policy** | [SECURITY.md](./SECURITY.md) |
|
|
63
|
+
| **Report a bug / request a feature** | [GitHub Issues](https://github.com/proticom/gnosys/issues) |
|
|
810
64
|
|
|
811
65
|
## License
|
|
812
66
|
|
|
813
|
-
MIT
|
|
67
|
+
MIT © [Proticom](https://proticom.com). See [LICENSE](./LICENSE).
|