@nano-step/nano-brain 2026.5.3007 → 2026.5.3101
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 +5 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -175,25 +175,13 @@ Large sessions (100K+ tokens) are handled via map-reduce chunking — no session
|
|
|
175
175
|
|
|
176
176
|
| Variable | Description |
|
|
177
177
|
|----------|-------------|
|
|
178
|
-
| `NANO_BRAIN_CONFIG` | Path to YAML config file (12-factor; useful in Docker/k8s). Precedence: `--config` flag > `NANO_BRAIN_CONFIG` > `~/.nano-brain/config.yml`. Leading/trailing whitespace is stripped. If the env-pointed file does not exist, a `WARNING:` is printed to stderr and defaults are used (operator can spot typos). |
|
|
179
178
|
| `DATABASE_URL` | PostgreSQL connection string |
|
|
180
179
|
| `VOYAGE_API_KEY` | Voyage AI API key |
|
|
181
180
|
| `OPENCODE_DB_ROOT` | OpenCode per-project DB root directory (multi-DB mode) |
|
|
182
181
|
| `OPENCODE_DB_PATH` | OpenCode single SQLite database path |
|
|
183
182
|
| `OPENCODE_STORAGE_DIR` | OpenCode session directory (legacy) |
|
|
184
183
|
| `NANO_BRAIN_SUMMARIZE_API_KEY` | API key for the summarization LLM provider |
|
|
185
|
-
| `NANO_BRAIN_*` | Override any config
|
|
186
|
-
|
|
187
|
-
**Docker example** — run the server in a container against a host PostgreSQL:
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
# /path/to/container-config.yml uses host.docker.internal for DB/Ollama
|
|
191
|
-
docker run -d \
|
|
192
|
-
-e NANO_BRAIN_CONFIG=/etc/nano-brain/config.yml \
|
|
193
|
-
-v /path/to/container-config.yml:/etc/nano-brain/config.yml:ro \
|
|
194
|
-
-p 3100:3100 \
|
|
195
|
-
nano-brain:latest
|
|
196
|
-
```
|
|
184
|
+
| `NANO_BRAIN_*` | Override any config (e.g., `NANO_BRAIN_SERVER_PORT=3100`) |
|
|
197
185
|
|
|
198
186
|
## REST API
|
|
199
187
|
|
|
@@ -205,7 +193,6 @@ docker run -d \
|
|
|
205
193
|
| GET | `/api/status` | Server status with version, uptime, workspace stats |
|
|
206
194
|
| POST | `/api/v1/init` | Register workspace |
|
|
207
195
|
| GET | `/api/v1/workspaces` | List all workspaces (with doc counts) |
|
|
208
|
-
| DELETE | `/api/v1/workspaces/:hash` | Permanently delete a workspace + cascade docs/chunks/embeddings |
|
|
209
196
|
| GET | `/api/v1/wake-up` | Workspace briefing |
|
|
210
197
|
| POST | `/api/harvest` | Trigger session harvesting |
|
|
211
198
|
| POST | `/api/reload-config` | Hot-reload configuration |
|
|
@@ -226,8 +213,6 @@ Workspace is passed in the JSON body for POST, query param for GET.
|
|
|
226
213
|
| PUT | `/api/v1/collections/:name` | Rename collection |
|
|
227
214
|
| DELETE | `/api/v1/collections/:name` | Remove collection |
|
|
228
215
|
| GET | `/api/v1/tags` | List tags with counts |
|
|
229
|
-
| POST | `/api/v1/get` | Get single document by source_path or id |
|
|
230
|
-
| POST | `/api/v1/multi-get` | Batch fetch documents by paths or ids |
|
|
231
216
|
| POST | `/api/v1/reindex` | Queue reindex (202) |
|
|
232
217
|
| POST | `/api/v1/update` | Queue update (202) |
|
|
233
218
|
| POST | `/api/v1/summarize` | Trigger LLM summarization of harvested sessions |
|
|
@@ -246,20 +231,13 @@ Workspace is passed in the JSON body for POST, query param for GET.
|
|
|
246
231
|
|---------|-------------|
|
|
247
232
|
| `nano-brain` (no args) | Start HTTP server (default: port 3100) |
|
|
248
233
|
| `nano-brain init --root=<path>` | Register workspace |
|
|
249
|
-
| `nano-brain workspaces list` | List registered workspaces with doc counts |
|
|
250
|
-
| `nano-brain workspaces remove --workspace=<hash> [--dry-run\|--force]` | Permanently delete a workspace + all its documents/chunks/embeddings |
|
|
251
234
|
| `nano-brain write` | Write document via CLI |
|
|
252
|
-
| `nano-brain query
|
|
253
|
-
| `nano-brain search
|
|
254
|
-
| `nano-brain vsearch
|
|
255
|
-
| `nano-brain wake-up --workspace=<hash>` | Workspace briefing (collections, stats, recent memories) |
|
|
256
|
-
| `nano-brain get <source_path\|uuid> --workspace=<hash>` | Fetch a single document by source_path or UUID |
|
|
257
|
-
| `nano-brain tags --workspace=<hash>` | List all tags with document counts |
|
|
258
|
-
| `nano-brain multi-get --workspace=<hash> --paths=p1,p2` | Fetch multiple documents in one round-trip |
|
|
235
|
+
| `nano-brain query` | Hybrid search |
|
|
236
|
+
| `nano-brain search` | BM25 keyword search |
|
|
237
|
+
| `nano-brain vsearch` | Vector similarity search |
|
|
259
238
|
| `nano-brain collection add\|remove\|list` | Manage collections |
|
|
260
239
|
| `nano-brain harvest` | Trigger session harvesting |
|
|
261
240
|
| `nano-brain cleanup-stale-raw [--dry-run]` | Delete pre-#192 raw OpenCode session docs superseded by summaries |
|
|
262
|
-
| `nano-brain cleanup-orphan-workspaces [--dry-run]` | Delete documents/chunks under workspace_hash values not registered in `workspaces`. Run BEFORE migration 00011 (issue #238). |
|
|
263
241
|
| `nano-brain bench generate\|run\|compare\|stress` | Benchmarking suite |
|
|
264
242
|
| `nano-brain db:migrate` | Run pending goose migrations |
|
|
265
243
|
| `nano-brain db:migrate --from-v1 <path>` | Import V1 SQLite data |
|
|
@@ -270,7 +248,7 @@ Workspace is passed in the JSON body for POST, query param for GET.
|
|
|
270
248
|
|
|
271
249
|
## MCP Tools
|
|
272
250
|
|
|
273
|
-
nano-brain exposes
|
|
251
|
+
nano-brain exposes 9 tools via MCP (Model Context Protocol):
|
|
274
252
|
|
|
275
253
|
| Tool | Description |
|
|
276
254
|
|------|-------------|
|
|
@@ -283,10 +261,6 @@ nano-brain exposes 13 tools via MCP (Model Context Protocol):
|
|
|
283
261
|
| `memory_status` | Server and embedding status |
|
|
284
262
|
| `memory_update` | Trigger re-embedding |
|
|
285
263
|
| `memory_wake_up` | Workspace briefing |
|
|
286
|
-
| `memory_graph` | Knowledge graph view (module → function → dep) |
|
|
287
|
-
| `memory_trace` | Call chain trace from entry point |
|
|
288
|
-
| `memory_impact` | Cross-file change impact analysis |
|
|
289
|
-
| `memory_symbols` | Symbol search (functions, types, constants) |
|
|
290
264
|
|
|
291
265
|
### MCP Configuration
|
|
292
266
|
|