An open API service indexing awesome lists of open source software.

https://github.com/inferis995/llm-wiki-portable

AI-powered knowledge base on a USB stick. 3D graph, markdown wikilinks, works with Claude Code & OpenCode. Zero install, fully portable.
https://github.com/inferis995/llm-wiki-portable

3d-graph ai claude-code knowledge-base markdown offline opencode personal-knowledge-base portable second-brain usb wiki

Last synced: about 1 month ago
JSON representation

AI-powered knowledge base on a USB stick. 3D graph, markdown wikilinks, works with Claude Code & OpenCode. Zero install, fully portable.

Awesome Lists containing this project

README

          

# LLM Wiki Portable


LLM Wiki Portable β€” 3D Knowledge Graph


Live Demo
Stars
License
Last Commit
Repo Size
Python
Platform
Offline


🌐 llm-wiki-lyart.vercel.app

Your personal AI-powered knowledge base β€” on a USB stick or any folder.

Based on the [Karpathy LLM Wiki method](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f). Works with **Claude Code** and **OpenCode**. Write markdown pages with `[[wikilinks]]`, visualize them as a 3D graph, and carry everything on a USB drive. Ask Claude to ingest sources, query your knowledge base, and generate new pages automatically.

## Features

- **3D Knowledge Graph** β€” Interactive force-directed graph, color-coded by category
- **AI-Powered** β€” Claude Code or OpenCode read, write, and query the wiki for you
- **USB Portable** β€” Plug into any PC, run one command, done
- **Markdown + Wikilinks** β€” `[[page-links]]` like Obsidian, backlinks auto-generated
- **Offline** β€” Static HTML/JS, works with `file://`, no server needed
- **Python 3.8+** β€” No external dependencies beyond Python for the core

## Dashboard


Dashboard β€” 3D Knowledge Graph with sidebar navigation

Interactive 3D graph with color-coded categories: **Fonti** (blue), **EntitΓ ** (green), **Concetti** (amber), **Confronti** (purple). Click any node to read the page. Sidebar with live search (searches titles, tags, and content). Keyboard: `/` to search, `Esc` to go back.

## Quick Start

### Step 1 β€” Clone the repo

```bash
git clone https://github.com/inferis995/llm-wiki-portable
cd llm-wiki-portable
```

### Step 2 β€” Install commands

```bash
# Linux / macOS
bash install-commands.sh

# Windows (PowerShell)
powershell -File install-commands.ps1
```

This copies the slash commands to Claude Code and OpenCode.

### Step 3 β€” Set up your wiki

Open **Claude Code** or **OpenCode** and run:

```
/install-portable-wiki
```

Claude will ask:
1. **Where** to put the wiki (USB drive path or any folder)
2. **Which template** to use:

| Template | Use case | Folders |
|----------|----------|---------|
| `general` | General use, study, notes, personal research β€” original Karpathy method | sources / entities / concepts / comparisons |
| `work` | Freelance / project & client management | projects / clients / meetings / tasks / resources |
| `business` | Company knowledge base, SOPs, decisions | departments / processes / people / decisions / documents / meetings |
| `professional` | Lawyer, accountant, consultant, doctor | clients / matters / deadlines / contacts |
| `research` | Researcher, journalist, PhD student, analyst | sources / insights / topics / people / output |
| `custom` | Any domain β€” Claude generates the structure from your answers | folders defined during setup |

Then Claude will:
- Copy the web UI and sync script
- Write `~/.claude/CLAUDE.md` globally so Claude finds your wiki from any directory
- Create the folder structure for your chosen template

OpenCode with commands


OpenCode with LLM Wiki Portable commands

### Step 4 β€” Use it

```
/llm-dashboard ← Open the 3D graph in your browser
```

Then talk to Claude:
- *"Ingest this PDF"* β†’ Claude creates wiki pages with wikilinks
- *"What do I know about Docker networking?"* β†’ Claude reads the wiki and answers
- *"Show me everything related to [[kubernetes]]"* β†’ Claude reads the graph

> **After setup:** Claude finds your wiki from **any directory** β€” you don't need to open a terminal in the wiki folder. The global `~/.claude/CLAUDE.md` points to your USB/folder path.

## Templates

| Template | Use case | Folders |
|----------|----------|---------|
| `general` | General use, study, notes, personal research β€” original Karpathy method | `sources / entities / concepts / comparisons` |
| `work` | Freelance / project & client management | `projects / clients / meetings / tasks / resources` |
| `business` | Company knowledge base, SOPs, decisions | `departments / processes / people / decisions / documents / meetings` |
| `professional` | Lawyer, accountant, consultant, doctor | `clients / matters / deadlines / contacts` |
| `research` | Researcher, journalist, PhD student, analyst | `sources / insights / topics / people / output` |
| `custom` | Any domain β€” Claude generates the structure from your answers | folders defined during setup |

All templates use the same Karpathy method: ingest β†’ query β†’ lint. Claude rewrites existing pages with progressive synthesis β€” pages always represent the state of the art, not accumulated notes. The 3D graph colors are assigned automatically from the actual folders in your wiki.

## How It Works

Based on the Karpathy method β€” the LLM acts as a "compiler" that incrementally builds a structured wiki from raw sources. Claude reads markdown files directly; no embedding server or vector database needed.

```
~/.claude/CLAUDE.md ← Global AI instructions (points to your USB path)
~/.config/opencode/agents/wiki.md ← OpenCode global agent

USB Drive (or any folder)/
β”œβ”€β”€ wiki/ ← Your pages (markdown with wikilinks)
β”‚ β”œβ”€β”€ sources/src-*.md ← Source summaries
β”‚ β”œβ”€β”€ entities/ ← Tools, companies, people
β”‚ β”œβ”€β”€ concepts/ ← Ideas, protocols, patterns
β”‚ └── comparisons/ ← A vs B
β”œβ”€β”€ raw/ ← Original files (PDFs, images) β€” never modified
β”œβ”€β”€ web/ ← Static web UI (open index.html in browser)
β”‚ └── data.js ← Auto-generated by sync.py
└── sync.py ← Regenerates graph data from markdown
```

### The Workflow

1. **You give Claude a source** (PDF, URL, paste text)
2. **Claude creates wiki pages** with `[[wikilinks]]` and cross-references
3. **Claude runs `sync.py`** to rebuild the graph
4. **You open `/llm-dashboard`** to see the 3D graph
5. **You ask questions** β€” Claude reads the wiki files and answers with `[[citations]]`

### Moving to Another PC

Plug the USB into a new computer β†’ open Claude Code or OpenCode β†’ run `/install-portable-wiki`. The command detects the existing wiki and only configures the local system (global CLAUDE.md, commands). Your data stays on the USB.

## Page Format

```markdown
---
created: 2026-05-08
updated: 2026-05-08
sources: [[src-my-source]]
tags: [tag1, tag2]
---

# Page Title

Content with [[wikilinks]] to other pages.

## Key Points
- Point 1

## Related
- [[other-page]]
```

## Requirements

| Requirement | Notes |
|-------------|-------|
| **Claude Code** or **OpenCode** | AI assistant that runs the commands |
| **Python 3.8+** | For `sync.py` (generates the 3D graph data) |
| **USB drive or folder** | Any writable path works |
| **Browser** | For the 3D graph UI |

> Python must be in your system PATH before running `install-commands.sh`.

## Commands

| Command | Description |
|---------|-------------|
| `/install-portable-wiki` | Install wiki on USB or configure on a new PC |
| `/llm-dashboard` | Open the 3D graph in browser (auto-syncs if pages changed) |

## Tech Stack

- **Web UI**: Vanilla HTML/CSS/JS (no framework, no build step)
- **Graph**: [3d-force-graph](https://github.com/vasturiano/3d-force-graph) + Three.js + D3.js
- **Markdown**: [marked.js](https://marked.js.org/)
- **Sync**: `sync.py` β€” zero dependencies, Python 3.8+

## License

MIT