Skip to content

freemty/selfOS

Repository files navigation

selfOS

A personal knowledge base that runs inside Claude Code. You talk to it with slash commands. It compiles your notes, conversations, and bookmarks into interlinked markdown — source pages, concept pages, entity pages — so you never re-derive the same insight twice.

I've been using it daily for 11 months. ~900 sources, ~80 concepts, ~90 entities.

Get Started

Prerequisites

Setup (2 minutes)

git clone https://github.com/freemty/selfOS
cd selfOS
./setup.sh

setup.sh registers the skill symlinks so Claude Code can find them. That's it — no Python environment, no database, no API keys.

Now open Claude Code in the selfOS directory:

claude

First 5 minutes

1. Initialize your wiki

/wiki init

Creates the directory structure (wiki/sources/, wiki/concepts/, wiki/entities/) and a CLAUDE.md schema file.

2. Ingest something

Paste a URL — an article, a paper, a blog post:

/wiki ingest https://arxiv.org/abs/2405.15071

Claude reads the source, creates a summary page in wiki/sources/, extracts concepts and entities into their own pages, and cross-links everything.

3. Record a thought

/thought the biggest leverage in the agent era is taste

One-liner saved to wiki/sources/thought-YYYY-MM-DD-<slug>.md. No interview, no friction.

4. Let the wiki interview you

/interview

The wiki looks at its own gaps — thin pages, unexpanded opinions, open questions — and asks you about them. Your answers get compiled back into the wiki.

5. Check what happened

/digest

Shows today's wiki changes: new pages, updates, and a recommended question to think about.

All Commands

Core — the daily loop

Command What it does
/thought <text> Capture a fleeting idea. Pure write, no questions.
/interview Wiki asks you questions based on its gaps.
/digest Today's changes + stats. /digest week for weekly.

Wiki — knowledge management

Command What it does
/wiki ingest <url-or-path> Fetch a source, compile into wiki pages.
/wiki query "question" Search the wiki, synthesize an answer with citations.
/wiki compile Batch-ingest unprocessed files in raw/.
/wiki synthesize Find clusters worth synthesizing, write cross-cutting analyses.
/wiki lint Health check: broken links, orphan pages, missing frontmatter.
/wiki status Page counts, word counts, recent activity.

Tasks — a lightweight todo stack

Command What it does
/todo add do "description" Add an action item.
/todo add read "description" Add a reading item.
/todo today Pick today's items from the pool.
/todo done <id> Mark done, archive.
/todo list Show current today + pool.

Help

/wiki-help

Prints the full command cheat sheet.

How It Works

raw/ (your data — immutable)
 │
 ▼
/wiki ingest
 │
 ├──→ wiki/sources/    one summary per source
 ├──→ wiki/concepts/   abstract ideas, cross-referenced
 ├──→ wiki/entities/   people, orgs, tools, papers
 │
 ├──→ wiki/index.md    master catalog
 └──→ wiki/log.md      operation history

Each source is processed once. Concepts and entities accumulate cross-references over time. Querying reads 2-3 markdown files — no LLM tokens burned per lookup.

Auto-Capture (optional)

A stop hook (hooks/auto-capture.sh) can silently extract personal context from every Claude Code session and write it into the wiki. It also tags unexpanded opinions for /interview to follow up on. Enable it during setup.sh if you want passive knowledge capture.

Directory Structure

selfOS/
├── .claude/skills/     7 skills (wiki, thought, interview, digest, todo, wiki-help, + internal)
├── hooks/              auto-capture stop hook
├── scripts/            utility scripts
├── raw/                your immutable source documents
├── wiki/
│   ├── index.md        master catalog
│   ├── log.md          operation log
│   ├── sources/        one page per ingested source
│   ├── concepts/       one page per concept
│   ├── entities/       one page per entity
│   ├── synthesis/      cross-cutting analyses
│   └── tasks/          do + read stacks
├── viewer/             Canvas graph visualization (optional)
├── setup.sh            one-time setup
├── CLAUDE.md           wiki schema (auto-generated by /wiki init)
└── README.md

FAQ

Do I need an API key? No. selfOS runs inside Claude Code, which handles authentication.

Can I use it with Obsidian? Yes. The wiki/ directory is a standard Obsidian vault. [[wiki-links]] work natively. The .obsidian/ config in this repo has graph view filters pre-configured.

What about search? /wiki query does LLM-powered search across the compiled wiki. For keyword search, qmd (optional) provides BM25 + vector + re-ranking.

How is this different from Notion / Obsidian / a Zettelkasten? You don't manually organize anything. You feed it sources and thoughts. The LLM handles filing, cross-referencing, and identifying gaps. The wiki structure emerges from your data, not from you dragging cards around.

Can I import existing notes? Put them in raw/, then /wiki compile. Supports Notion exports, Claude/Gemini conversation logs, PDFs, and web pages. See docs/guides/import-data.md.

License

MIT

About

selfOS — your personal operating system. Compiles notes, AI conversations, and documents into a persistent knowledge graph. Zero-friction capture, oral history interviews, hybrid search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors