[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116634":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":31,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":35,"discoverSource":36},116634,"second-brain-black-hole","williamwasen\u002Fsecond-brain-black-hole","williamwasen","A 3D black-hole map of your notes. One HTML file, rus on the GPU. Includes a Markdown importer. Available with or without Obsidian, on Mac and Windows.","https:\u002F\u002Fwilliamwasen.github.io\u002Fsecond-brain-black-hole\u002F",null,"JavaScript",99,3,2,1,0,5,47,32,76.51,"MIT License",false,"main",true,[26,27,28,29,30],"black-hole","knowledge-graph","obsidian","second-brain","webgl","2026-11-19 22:55:01","2026-11-24 20:52:53","# Second Brain Black Hole\n\nA 3D map of your notes. One black hole sits in the middle, your notes orbit it as stars, and light bends around it. It runs on the GPU, fully on your computer: no server, no tracking, no network requests.\n\nThere are two ways to use it:\n\n- **[Use it in Obsidian](#use-it-in-obsidian)**: a plugin in Obsidian's community plugin list that shows your vault as the black hole in its own tab. No terminal needed.\n- **[Use it with any notes folder](#use-it-with-any-notes-folder)**: turn a folder of Markdown files into one HTML file you can open in a browser.\n\nIt is only the visual. It has no note-taking app, AI or sync built in.\n\n## Try the demo\n\n**Live demo: https:\u002F\u002Fwilliamwasen.github.io\u002Fsecond-brain-black-hole\u002F**\n\nIt shows 14 made-up notes. Drag to rotate, scroll to zoom, click a star to read it. To run it offline, open `docs\u002Findex.html` in Chrome, Edge, Safari or Firefox.\n\n## Use it in Obsidian\n\nThe plugin shows your vault as the black hole in an Obsidian tab. Desktop only (Windows, Mac and Linux).\n\n### Install\n\n1. In Obsidian, open **Settings → Community plugins**. If asked, select **Turn on community plugins**.\n2. Select **Browse**, search for **Second Brain Black Hole**, then select **Install** and **Enable**.\n3. Select the orbit icon in the left sidebar, or open the command palette (Ctrl+P, or Cmd+P on Mac) and run **Open black hole map**.\n\nOr open its page in the [Obsidian community directory](https:\u002F\u002Fcommunity.obsidian.md\u002Fplugins\u002Fsecond-brain-black-hole) and select **Add to Obsidian**.\n\n### Using it\n\n- Drag to rotate, scroll to zoom. Point at a star to see its note's name.\n- Select a star to open the note. Ctrl-click (Cmd-click on Mac) opens it in a new tab.\n- Select a group's name to fly to that group. To go back out, select **← All groups** (top left) or press Esc.\n- Select **Home** (top left) or the black hole to open the dashboard: note, idea and link counts, notes updated per day, ideas by group and your most connected notes. Select a group or note there to jump to it. Press Esc, select **×**, or select **Home** again to close it.\n- To change the chart color, select the palette icon next to **×** on the dashboard. Drag in the color square and hue slider, type a hex code, or pick a swatch (the half-filled one uses your theme's accent color). Select **Save changes** to keep it, or **Revert** to undo.\n- The map updates by itself when you add, rename, link or delete notes, so there's nothing to schedule or rebuild.\n\n### Settings\n\nOpen **Settings → Second Brain Black Hole**:\n\n- **Group notes by**: *Automatic* uses your top-level folders if you have two or more, then tags if at least half your notes have one, then groups of notes that link to each other. You can also pick *Top-level folders*, *Tags* or *Groups of linked notes*. At most six groups are shown: the five biggest plus \"Other\".\n- **Maximum notes**: big vaults show only the most connected notes (default 500). Lower it if the map feels slow.\n- **Excluded folders**: one folder per line, for example `Templates`.\n- **Show unlinked notes**: turn off to hide notes with no links.\n- **Reset camera**: moves open maps back to the starting view.\n\n### Privacy\n\nEverything stays on your computer. The plugin reads Obsidian's own index of your vault (note names, links, tags and headings) to draw the map. It makes no network requests, has no telemetry, and never changes your notes. Its settings are saved in the plugin's own `data.json`.\n\n## Use it with any notes folder\n\n**Easiest way:** if you have Claude Code or the Claude desktop app (they can run commands on your computer), paste this:\n\n```\nInstall the 3D notes viewer from https:\u002F\u002Fgithub.com\u002Fwilliamwasen\u002Fsecond-brain-black-hole and build it from my notes. First ask me two things: my computer type (Windows, Mac or Linux) and the full path to my notes folder. Then install Node.js 18 or newer if it's missing (ask me first), download the repo, run npm install, and run the importer on my folder with --open. Only read my notes: never modify, move or delete them. Explain each step in plain words. When it's done, tell me where my-brain.html is, and remind me it contains the full text of my notes, so I shouldn't upload or share it.\n```\n\n**Or do it yourself.** You need [Node.js](https:\u002F\u002Fnodejs.org) 18 or newer. The LTS download is fine.\n\n### Windows\n\n1. Install the **LTS** version of Node.js from [nodejs.org](https:\u002F\u002Fnodejs.org) with the default options.\n2. On this repo's GitHub page, click **Code → Download ZIP**. No git needed. Right-click the ZIP → **Extract All**.\n3. In the unzipped folder, double-click **`Build My Brain (Windows).bat`**. Pick your notes folder, type a name, and the map opens in your browser.\n\nPrefer typing? Open PowerShell in the unzipped folder (right-click the folder → **Open in Terminal**) and run:\n\n```\nnpm install --omit=dev\nnode scripts\\import-markdown.mjs \"C:\\Users\\You\\Documents\\Notes\" --owner \"Your Name\" --open\n```\n\nIf something goes wrong:\n- **`'node' is not recognized`**: Node.js isn't installed, or the window was opened before you installed it. Install the LTS version, then close and reopen PowerShell (or sign out of Windows and back in).\n- **`running scripts is disabled on this system`** when you run `npm`: type `npm.cmd` instead of `npm`, for example `npm.cmd install --omit=dev`.\n- **Paths with spaces**: put the whole path in double quotes and don't end it with a backslash: `\"C:\\My Notes\"`, not `\"C:\\My Notes\\\"`. Shift + right-click a folder → **Copy as path** gives you a quoted path.\n- **\"Windows protected your PC\"** when you open the `.bat`: Windows warns about any downloaded script. Click **More info → Run anyway**. You can open the `.bat` in Notepad first to read it; it's short.\n\n### Mac and Linux\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fwilliamwasen\u002Fsecond-brain-black-hole.git\ncd second-brain-black-hole\nnpm install --omit=dev\nnpm run import -- ~\u002FDocuments\u002FNotes --owner \"Your Name\" --open\n```\n\nNo git? **Code → Download ZIP** works here too.\n\n### What you get\n\nThe importer writes `my-brain.html` in the repo folder. `--open` opens it in your browser; otherwise double-click it.\n\n**It contains the full text of your notes.** It is git-ignored here, but don't upload or share it unless you want your notes public.\n\nWhat the importer understands:\n- Every `.md` file in the folder, including subfolders. Hidden folders (like `.obsidian`) are skipped, and so are folders it doesn't have permission to read.\n- `[[wiki links]]`, `[[Note|alias]]`, and normal relative links between notes. Each link becomes a connection.\n- Tags: `tags:` in front matter (`[a, b]`, `a, b`, or a `- a` list) and `#tags` in the text (not inside code).\n- Clusters: if your notes are in two or more top-level folders, the folders become the clusters. Otherwise it groups by tags (if at least half your notes are tagged), then by groups of linked notes. If there are more than six clusters, the five biggest stay and the rest are grouped as \"Other\".\n- A `title:` or `updated:` in front matter, or the first `# Heading`. File dates are used otherwise.\n- Raw HTML in notes is shown as plain text, never run.\n\nOptions:\n- `--owner \"Name\"` sets the name under the heading.\n- `--open` opens the map in your browser when it's done.\n- `--cluster auto|folders|tags|links` picks how notes are grouped (default `auto`, described above). It prints which one it used.\n- `--out file.html` sets the output file (default `my-brain.html`).\n- `--max 500` caps how many notes are drawn (default 500, keeping the most connected). Large vaults are untested for speed, so lower this if it feels slow.\n- `--json graph.json` also saves the graph data.\n- `--help` shows all of this with examples.\n\n## Automate it (notes-folder version only)\n\n> **Using Obsidian? Skip this section.** The plugin already updates the map by itself whenever you add, rename, link or delete notes. This section is only for the notes-folder version, which makes a fixed file you have to rebuild.\n\nWant it to refresh nightly, pull from Notion, Apple Notes, Google Drive or chat exports, or have an AI link and summarize your notes? That part depends on your setup, so it isn't included. [`PROMPT.md`](PROMPT.md) has a prompt you can paste into Claude to build it for you, step by step.\n\n## Notes\n\n- The sky and stars are generated by shaders at startup. No photo is used.\n- Lensing is physically inspired, not an exact relativistic simulation.\n- The HTML version remembers your last visit and recent pages in your browser's local storage so new notes can glow.\n- Needs a browser with WebGL2.\n\n## For developers\n\nNone of this is needed to use the map.\n\n### Build the plugin yourself\n\n```\nnpm install\nnpm run build:plugin\n```\n\nThat type-checks the plugin and writes `main.js` and `styles.css` to the repo folder. To try it, copy them with `manifest.json` into `\u003Cyour vault>\u002F.obsidian\u002Fplugins\u002Fsecond-brain-black-hole\u002F`, or link this folder there and run `npm run dev:plugin`, which rebuilds on every change.\n\n- `npm run lint` checks the code with the same rules as Obsidian's plugin review.\n- `npm run test:plugin` writes test vaults to `test-vaults\u002F` (open them in Obsidian to try things by hand) and builds `test-vaults\u002Fharness.html`, which runs the plugin against a stand-in for Obsidian's API in a browser. Open it through a local web server, for example `npx http-server test-vaults`.\n- Releases: run `npm version 0.2.0` (it updates `manifest.json` and `versions.json` too), then push the tag with `git push origin 0.2.0`. A GitHub Action builds the plugin and attaches `main.js`, `manifest.json` and `styles.css` to a draft release for you to publish. Obsidian picks up each published release and reviews it automatically.\n\nCode layout: the visual lives in `src\u002F` (`blackhole.js` and the WebGL files it uses), shared by the HTML page (`src\u002Fprototype.html` and `src\u002Fapp.mjs`) and the plugin (`obsidian\u002F`). `src\u002Fgraph.js` holds the grouping rules both use.\n\n### Use the map in your own page\n\n`src\u002Fblackhole.js` is an ES module:\n\n```js\nimport { createBlackHole } from '.\u002Fsrc\u002Fblackhole.js';\nconst map = createBlackHole(element, graph, {\n  onSelect: (node, { event }) => { \u002F* a star was clicked; node is null for empty space *\u002F },\n  readingPanel: false, \u002F\u002F false: clicks only call onSelect, so you show notes your own way\n});\nmap.update(newGraph);  \u002F\u002F new data, same WebGL contexts\nmap.resize();\nmap.destroy();         \u002F\u002F frees every WebGL context, animation frame and listener\n```\n\nInclude `src\u002Fblackhole.css`. `graph` uses the format below; see `src\u002Fblackhole.d.ts` for every option and method.\n\n### Data format\n\nYou can skip the importer and write the graph yourself. See `data\u002Fsample-graph.json`, then:\n\n```\nnode scripts\u002Fbuild.mjs path\u002Fto\u002Fgraph.json out.html\n```\n\n```json\n{\n  \"owner\": \"Your Name\",\n  \"regions\": { \"Projects\": { \"center\": [x, y, z], \"spread\": [x, y, z], \"density\": 850 } },\n  \"nodes\": [\n    { \"title\": \"...\", \"category\": \"Note\", \"region\": \"Projects\", \"path\": \"...\", \"url\": \"#\",\n      \"status\": \"unknown\", \"updated\": \"2026-11-01\", \"modified\": 1793500000000,\n      \"html\": \"\u003Cp>Page text as safe HTML\u003C\u002Fp>\", \"ideas\": [\"Section title\"],\n      \"position\": [x, y, z], \"degree\": 3 }\n  ],\n  \"edges\": [[0, 1], [1, 2]]\n}\n```\n\n- `regions` are the clusters; names must match each node's `region`. About six reads best.\n- `edges` are pairs of node indexes. `degree` is each node's link count.\n- `html` is inserted as HTML, so escape or sanitize it first.\n- `ideas` is optional: the headings inside the note.\n\n## License\n\nMIT. See `LICENSE`.\n","这是一个将个人笔记库可视化为3D黑洞星图的本地化前端工具，核心功能是将Markdown笔记（支持Obsidian vault或任意文件夹）实时渲染为引力场环绕的动态知识图谱，所有计算在浏览器GPU上完成，无需网络连接或服务器。技术特点包括单HTML文件部署、WebGL加速渲染、自动分组（按文件夹\u002F标签\u002F链接关系）、实时增量更新及交互式探索（旋转、缩放、点击跳转、颜色定制）。适用于知识管理实践者、第二大脑方法论使用者及需要直观理解笔记关联结构的个人学习者。","2026-11-25 04:59:36","CREATED_QUERY"]