glassbrain 0.1.2 → 0.1.4

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 CHANGED
@@ -5,12 +5,9 @@
5
5
  Your agent keeps knowledge graphs: of your code, your docs, its research, its own plans. glassbrain
6
6
  lets you read one at a glance, and when the agent learns something, shows you exactly what changed.
7
7
 
8
- ![A product's docs and app turned into a graph of user stories in four agent steps](https://raw.githubusercontent.com/voidixyn/glassbrain/main/docs/media/grow.gif)
8
+ ![The prompt suffix in an agent's input box: … Tell me all you know, using `npx glassbrain`](https://raw.githubusercontent.com/voidixyn/glassbrain/main/docs/media/composer.jpg)
9
9
 
10
- ```bash
11
- npx glassbrain kg/ # open a graph in the browser (kg/ = JSON files, or one folder per version)
12
- npx glassbrain diff HEAD~1 kg/ # what changed in the last commit
13
- ```
10
+ ![A product's docs and app turned into a graph of user stories in four agent steps](https://raw.githubusercontent.com/voidixyn/glassbrain/main/docs/media/grow.gif)
14
11
 
15
12
  [**Live demo**](https://voidixyn.github.io/glassbrain/) · [Agents write it](#1-a-brain-your-agent-can-write) ·
16
13
  [Humans read it](#2-read-it-like-a-brain-scan) · [Every brain](#3-every-brain-on-demand) ·
@@ -155,67 +152,44 @@ Each tool's own notion of "inside" becomes the structure; everything else become
155
152
 
156
153
  ## 4. Try it yourself
157
154
 
158
- *Light enough to try in a minute.* Nothing is hidden and nothing runs in the background:
159
-
160
- - **One file out.** `npx glassbrain` writes a single html page (about 1 MB plus your data): no
161
- server, no database, no requests of its own, opens from `file://`, can be sent to anyone.
162
- (Images that node descriptions link to load from their URLs.)
163
- - **Your data stays plain.** JSON files you can read, diff in git and edit by hand. Nothing
164
- derived (flags, validation, layout) is ever written back into them.
165
- - **No lock-in, no key.** Every supported format comes in, `convert` writes plain JSON out, and
166
- everything runs locally.
167
-
168
- **Three ways in:**
155
+ Four ways to try glassbrain—pick whichever fits.
169
156
 
170
- 1. Open the [live demo](https://voidixyn.github.io/glassbrain/), or drop a folder of your own JSON onto it.
171
- 2. Point it at something you have: `npx glassbrain <file-or-folder>`.
172
- 3. Ask your agent, no skill needed:
157
+ - **Demo.** Explore the [live demo](https://voidixyn.github.io/glassbrain/).
173
158
 
174
- > Map how our checkout flow works as a glassbrain graph (run `npx glassbrain` first).
159
+ - **Agent + npx.** In any context, add **"... using `npx glassbrain`."** to your prompt.
160
+ Skill-free and model-agnostic — any agent that can run terminal commands can use it.
161
+ You get a standalone HTML file to open locally and share.
175
162
 
176
- `npx glassbrain` with no arguments prints the format and how to build in passes, so the
177
- agent needs nothing else.
163
+ For example:
178
164
 
179
- Or give it the skills above and write your own: a skill is a short markdown file.
165
+ > Map the detailed plot and character relationships in *Pride and Prejudice*, using `npx glassbrain`.
180
166
 
181
- **In your own app** it is a React component on top of [cytoscape.js](https://js.cytoscape.org/):
182
-
183
- ```bash
184
- npm i glassbrain cytoscape cytoscape-fcose cytoscape-cose-bilkent
185
- ```
186
-
187
- ```tsx
188
- import { parseSources, diffModels, GraphCanvas } from 'glassbrain';
189
-
190
- const model = parseSources([{ origin: 'graph.json', text }]);
191
- <GraphCanvas model={model} /> // browse
192
- <GraphCanvas model={after} diff={diffModels(before, after)} /> // compare
193
- ```
167
+ > This refactor changed a lot. Show the architecture before and after, organized into layers, using `npx glassbrain`.
194
168
 
195
- Colors, layers, field names and your own JSON dialects go in a profile; the canvas can be made
196
- editable and hands you each edit as a patch. All of it is in [the guide](https://github.com/voidixyn/glassbrain/blob/main/docs/guide.md).
169
+ > Turn these research notes into a graph of ideas, evidence, and open questions, using `npx glassbrain`.
197
170
 
198
- How big it goes (the generated page in headless Chrome on an Apple M4 laptop, [method](https://github.com/voidixyn/glassbrain/blob/main/docs/cli.md#size)):
171
+ - **CLI.** Open or diff a graph you already have:
199
172
 
200
- | Graph | Ready | Pan / zoom |
201
- |---|---|---|
202
- | 1,000 nodes | 1.1 s | 60 fps |
203
- | 5,000 nodes | 4.7 s | 60 fps |
204
- | 10,000 nodes | 9.7 s | 30 fps |
173
+ ```bash
174
+ npx glassbrain kg/ # open a graph in the browser (kg/ = JSON files, or one folder per version)
175
+ npx glassbrain diff HEAD~1 kg/ # what changed in the last commit
176
+ ```
205
177
 
206
- Beyond about 10,000 nodes, look at [sigma.js](https://www.sigmajs.org/).
178
+ - **React.** Embed the graph component in your own app:
207
179
 
208
- ## Questions
180
+ ```bash
181
+ npm i glassbrain cytoscape cytoscape-fcose cytoscape-cose-bilkent
182
+ ```
209
183
 
210
- **Is this a graph database or a graph builder?** Neither. It is the screen: something else
211
- (your agent, Graphify, a script) builds the graph; glassbrain shows it and its changes.
184
+ ```tsx
185
+ import { parseSources, diffModels, GraphCanvas } from 'glassbrain';
212
186
 
213
- **How is it different from Graphify's or Understand-Anything's own viewer?** Those come with
214
- their extractors. glassbrain opens their output too, and adds stable structure and version
215
- comparison. Use both.
187
+ const model = parseSources([{ origin: 'graph.json', text }]);
188
+ <GraphCanvas model={model} /> // browse
189
+ <GraphCanvas model={after} diff={diffModels(before, after)} /> // compare
190
+ ```
216
191
 
217
- **Can I edit the graph by hand?** Yes, in your app (`onEdit`) or in the demo. Edits are a patch of
218
- small operations, so they can be replayed after the agent regenerates the graph.
192
+ Customize colors, layers, fields and editing in [the guide](https://github.com/voidixyn/glassbrain/blob/main/docs/guide.md).
219
193
 
220
194
  ## Docs
221
195