Docs · the web UI

A viewer with
no SQL of its own.

One command, no Node, nothing to install. Every page runs the same command you would type at the terminal. Ranking, scopes and what you are allowed to see are worked out in one place only, so the page can never disagree with the command line.

Running it #

$ ns-brain ui
serving http://127.0.0.1:7788 · opening a browser

$ ns-brain ui --port 8100 --no-open
$ ns-brain ui --host 127.0.0.1

It listens only on your own machine (loopback), serves its files from inside the binary and exits when you stop it. Nothing keeps running in the background and starting it writes nothing to disk.

What it shows #

ViewWhat it answers
BriefExactly what a session gets when it opens, shown as a page instead of terminal text.
MemoriesSearch and browse with the same ranking as the CLI. Filter by scope, type, tier and project.
TreeEvery scope as a tree. The quickest way to spot a scope somebody created with a typo.
EventsWhat happened, by kind and by date.
MeasuresNumbers tracked over time with their expected ranges. Much easier to read as a chart than as a column.
LeadsThe sales pipeline, for the projects that use it.
Map and statsScopes, kinds, pinned memories, counts and which database file you are really using.

Why it has no SQL #

An older viewer had its own copy of the search code in a Node server.js. Three fixes made in the CLI (to ranking, to the project filter and to snoozing) never reached it. The page kept looking fine while showing the wrong results.

So the rule is: if the UI needs data the CLI can't give it, we add it to the CLI. Never to the viewer. We also moved the viewer into the binary. The Node version was the only part of the product you had to install separately and in practice nothing ever installed it.

The one thing it writes #

The UI does write, but only one thing: forget, by running ns-brain forget. So when it refuses to delete a pinned memory, a guardrail or a memory that replaced others, you see the CLI's own message, with the same wording and the same rules.

Everything else only reads.

How the page is protected #

A page on your own machine is still a web page. Any other browser tab can send requests to localhost. So every write has to prove it came from this page: