Skip to content

Personal second-brain tool with semantic search. Save bookmarks, notes, images — search by meaning, retrieve later.

Notifications You must be signed in to change notification settings

vojtaholik/mymind

Repository files navigation

mymind

Personal second-brain tool with semantic search. Save bookmarks, notes, images — search by meaning, retrieve later.

Architecture

┌─────────────────────┐     ┌──────────────────┐
│   Claude Code CLI   │────▶│     Skills       │
└─────────────────────┘     └────────┬─────────┘
                                     │
┌─────────────────────┐              │
│    Next.js Web UI   │────▶┌────────▼─────────┐
└─────────────────────┘     │                  │
                            │  pglite+pgvector │
┌─────────────────────┐     │   (local db)     │
│  OpenAI Embeddings  │◀────┤                  │
└─────────────────────┘     └──────────────────┘
image

Setup

1. Clone and Install

git clone <repo>
cd mymind
bun install

2. API Keys

Create a .env.local file:

# Required - OpenAI API key for embeddings
# Get one at: https://platform.openai.com/api-keys
OPENAI_API_KEY=sk-...

# Required - Anthropic API key for chat & summarization
# Get one at: https://console.anthropic.com/settings/keys
ANTHROPIC_API_KEY=sk-ant-...

# Optional - Port for dev server (defaults to 3000)
PORT=3000

3. Run

bun dev
# Opens http://localhost:3000

Usage

Web UI

The web UI provides:

  • Semantic search across all items
  • Browse recent saves
  • Filter by tags and type (bookmarks, notes, images)
  • Preview content and screenshots

CLI

# Save a bookmark
bun cli/mymind.ts save_bookmark '{"url":"https://example.com","tags":["dev"]}'

# Save a note
bun cli/mymind.ts save_note '{"content":"Remember this idea","tags":["thoughts"]}'

# Search
bun cli/mymind.ts search '{"query":"how to build APIs"}'

# List items
bun cli/mymind.ts list_items '{"limit":10,"tag":"dev"}'
bun cli/mymind.ts list_items '{"type":"note"}'

# Add tags
bun cli/mymind.ts add_tags '{"url":"https://example.com","tags":["important"]}'

# Delete
bun cli/mymind.ts delete_item '{"url":"https://example.com"}'

With Claude Code

The killer feature: use Claude as your interface to save and search.

# One-liner to save
claude --system-prompt "$(cat cli/system-prompt.md)" "Save https://example.com/article"

# Search your mind
claude --system-prompt "$(cat cli/system-prompt.md)" "Find articles about TypeScript patterns"

# Interactive mode
claude --system-prompt "$(cat cli/system-prompt.md)"

Script Kit

Global cmd+shift+s shortcut to save anything using Script Kit:

Install save-bookmark

  • Browser focused — bookmark current tab (Chrome, Arc, Safari, Brave, Edge)
  • Finder focused — save selected image files with AI description
  • Clipboard URL — bookmark a copied link
  • Clipboard image — save screenshots with AI description
  • Clipboard text — save as a note

Skills

Skill Description
save_bookmark Save URL with auto-scraped metadata + embedding
save_note Save a text note with embedding
save_image Save an image with optional description
search Semantic search across all items
list_items List recent/filtered items by type or tag
add_tags Tag an item
delete_item Remove an item

How it Works

  1. Save: When you save a URL, the scraper extracts title, description, and main content using Mozilla's Readability
  2. Embed: Content is embedded using OpenAI's text-embedding-3-small (1536 dimensions)
  3. Store: Everything goes into a local pglite database with pgvector for vector similarity
  4. Search: Queries are embedded and matched against stored content using cosine similarity

Tech Stack

  • Runtime: Bun
  • Framework: Next.js 16 (App Router)
  • Database: pglite + pgvector (local, zero config)
  • ORM: Drizzle
  • Embeddings: OpenAI text-embedding-3-small
  • Scraping: Mozilla Readability + linkedom + Puppeteer (screenshots)
  • Validation: Zod
  • Styling: Tailwind CSS 4

Environment Variables

Variable Required Description
OPENAI_API_KEY Yes API key for OpenAI embeddings
ANTHROPIC_API_KEY Yes API key for Claude (chat & summarization)
PORT No Dev server port (default: 3000)
MYMIND_API_URL No API base URL for CLI (default: localhost)

License

MIT

About

Personal second-brain tool with semantic search. Save bookmarks, notes, images — search by meaning, retrieve later.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages