selfhub_linkedin_trimmed.mp4
Once upon a time, personal context was scattered across a thousand chat windows and AI providers: half-remembered preferences, lost goals, forgotten life events, fragments of identity trapped behind product walls. Each new model asked the same questions like it had never met me before, and I kept reintroducing myself to machines that claimed to be intelligent. This era has to end. If AI is going to move from chatbot to true assistant, it needs a memory layer that is portable, inspectable, editable, and owned by the person it represents, not by the platform that captured it. I built SelfHub to close that gap, not for one model, but for AI as a whole. This repo is where it began. — @dimichoueiry, March 2026 (writing style totally inspired by: @karpathy)
SelfHub is a CLI-first personal memory system.
It helps you own your identity data in plain Markdown files inside a Git repo you control. You can save, read, search, recall, delete, and sync personal knowledge with full version history.
For now, while SelfHub's native agent architecture is still being strengthened, the best experience is to pair SelfHub CLI with coding agents that can run terminal commands and tools (for example: Codex, Claude Code, Cursor, and OpenCode).
If SelfHub is installed and available on PATH, these agents can call selfhub commands directly to save, retrieve, and manage memory.
- Onboard with a guided setup wizard (
selfhub setup) - Save memory into structured or custom Markdown paths (
selfhub save) - Read any memory file or folder (
selfhub read) - Search and recall with lexical + semantic retrieval (
selfhub search,selfhub recall) - Delete bad saved entries (
selfhub delete) - Sync to GitHub with normal git history (
selfhub sync) - Use an interactive console with command/chat modes (
selfhub console)
Requirements:
- Python 3.12+
- uv
- Git
Option A: Run from source (recommended for now)
git clone https://github.com/dimichoueiry/SelfHub.git
cd SelfHub
uv venv
source .venv/bin/activate
uv sync --all-packages
uv run selfhub --helpOption B: Install as a local uv tool after cloning
cd SelfHub
uv tool install --force --editable packages/selfhub-cli --with-editable packages/selfhub-core
selfhub --helpRun the onboarding wizard:
selfhub setupThe wizard configures:
- local repo path
- local/remote/GitHub repo wiring
- thinking model (save classification and dedupe)
- chat model (
/chatmode in console) - key storage for GitHub/OpenRouter credentials when keychain is available
selfhub init
selfhub setup
selfhub save "I am building SelfHub"
selfhub save --file preferences/coding-workflow.md "I like small, frequent commits."
selfhub read
selfhub read experiences/career.md
selfhub search "what do i do for work?" --mode hybrid
selfhub recall "what do you know about me?"
selfhub delete --file experiences/career.md --contains "wrong text"
selfhub sync
selfhub log --file experiences/career.mdStart:
selfhub consoleIn console:
- command mode accepts normal commands (
read,save,delete,search,recall,status, ...) /chatenters chat mode/unchatreturns to command mode/save <content>saves immediately in chat mode/save --file <path> <content>saves to a specific file in chat mode/toolslists available CLI/slash tools/exitexits console
Thinking model overrides:
export SELFHUB_THINKING_PROVIDER=openrouter
export SELFHUB_THINKING_MODEL=anthropic/claude-3.5-haiku
export OPENROUTER_API_KEY=...Chat model overrides:
export SELFHUB_CHAT_PROVIDER=ollama
export SELFHUB_CHAT_MODEL=qwen2.5:14b
export OLLAMA_BASE_URL=http://localhost:11434Semantic embedding overrides (search --mode semantic|hybrid, recall):
export SELFHUB_EMBEDDING_PROVIDER=openrouter # or ollama
export SELFHUB_EMBEDDING_MODEL=openai/text-embedding-3-smallNotes:
- If embedding vars are not set, SelfHub falls back to thinking/chat defaults.
- OpenRouter embeddings require
OPENROUTER_API_KEY. - Ollama embedding default is
nomic-embed-text.
List tools and usage hints:
selfhub toolsGenerate a strict agent spec:
selfhub agent-spec
selfhub agent-spec --jsonuv sync --group dev --all-packages
uv run pre-commit install
uv run pytest
uv run ruff check .
uv run mypy packages tests