Skip to main content

Your personal AI-powered second brain. Feed it anything. Find everything.

Project description

VaultMind

Your personal AI-powered second brain. Feed it anything. Find everything.

A CLI tool that sits between the internet and your Obsidian vault. Give it a URL โ€” an article, GitHub repo, Reddit post, or tweet โ€” and it extracts the content, processes it through AI, and writes a beautifully structured, interlinked Markdown note into your vault.

Quick Start

# Install
uv pip install -e .

# Configure
cp .env.example .env              # Add your API keys
cp config.example.yaml config.yaml  # Set your vault path

# Save your first note
vm save https://example.com/article

Commands

vm save <url>

The core command. Processes any supported URL through the full pipeline:

  1. Detects the source type (article, Reddit, GitHub, tweet)
  2. Extracts clean content (strips ads, nav, tracking params)
  3. Enriches via AI โ€” summary, key ideas, quotes, counterarguments, tags, rating
  4. Generates flashcards and finds related notes already in your vault
  5. Writes an atomic Markdown file with YAML frontmatter to the correct vault folder
vm save https://github.com/astral-sh/uv
vm save https://www.reddit.com/r/MachineLearning/comments/abc123/some_post
vm save https://example.com/blog/great-article

# Options
vm save <url> --tag cli --tag python   # Add extra tags
vm save <url> --folder "๐Ÿ“š Sources/AI" # Override folder routing
vm save <url> --force                  # Re-process even if already saved
vm save <url> --no-flash               # Skip flashcard generation
vm save <url> --verbose                # Debug logging to stderr

Duplicate detection: If a URL was already saved, VaultMind skips it (use --force to re-process). Passing --tag on a duplicate merges the new tags into the existing note.

vm find [query]

Search across all saved notes by keyword or fuzzy match. Without a query, shows recent notes.

vm find "transformer architecture"
vm find                              # Show recent notes
vm find "rust" --limit 10

Scoring weights: exact title match (60), tag match (40), body match (20), plus Jaccard similarity and fuzzy title matching.

vm brief

Generate a weekly digest summarizing what you've saved recently. Uses the fast AI tier.

vm brief              # Last 7 days
vm brief --days 14    # Last 14 days
vm brief --limit 30   # Include up to 30 notes

Output includes themes, highlights, gaps in your reading, and suggested next steps.

vm digest <topic>

Deep synthesis on a specific topic across your entire vault. Uses the deep AI tier. Automatically generates a Map of Content (MOC) file when 5+ notes match.

vm digest "AI safety"
vm digest "rust" --no-moc    # Skip MOC generation
vm digest "design" --limit 20

vm reflect

A weekly thinking mirror โ€” surfaces patterns, belief shifts, tensions, and blind spots in your saves. Uses the deep AI tier.

vm reflect              # Last 7 days
vm reflect --days 30    # Last 30 days

vm flashcard

Quiz yourself on flashcards auto-generated from your saved notes. No AI call needed โ€” cards are parsed from the ## ๐Ÿƒ Flashcards section already embedded in each note.

vm flashcard                    # All cards, shuffled
vm flashcard --topic "AI"       # Filter by topic
vm flashcard --limit 10         # Cap at 10 cards

Interactive controls: space flip ยท n next ยท p previous ยท k known ยท u unsure ยท q quit

vm stats

Vault health dashboard โ€” total notes, breakdown by type and status, top tags, average rating, flashcard coverage, and MOC candidates.

vm stats

vm version

Show the current VaultMind version.

Supported Sources

Source Extractor What You Get
Articles / Blogs trafilatura Clean text, author, publication, reading time
GitHub Repos GitHub REST API Tool Card format โ€” description, stars, language, README summary
Reddit Posts Reddit JSON API Post + top 5 comments, discussion summary, subreddit as tag
Twitter / X Syndication API + trafilatura fallback Best-effort extraction (experimental, marked as partial on failure)

Configuration

config.yaml

vault_path: "/path/to/your/Obsidian Vault"

folders:
  inbox: "๐Ÿ“ฅ Inbox"
  articles: "๐Ÿ“š Sources"
  tools: "๐Ÿ› ๏ธ Tools"
  threads: "๐Ÿฆ Threads"
  discussions: "๐Ÿ’ฌ Discussions"
  # ... see config.example.yaml for all options

ai:
  default_provider: "anthropic"        # anthropic | openai | ollama
  fallback_chain: ["anthropic", "openai", "ollama"]
  max_tokens: 2000
  generate_flashcards: true
  generate_counterarguments: true
  providers:
    anthropic:
      models:
        fast: "claude-sonnet-4-20250514"       # Used by: save, brief
        deep: "claude-opus-4-5"     # Used by: digest, reflect
    openai:
      models:
        fast: "gpt-4.1-mini"
        deep: "gpt-4.1"

.env

# At least one AI provider key is required
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...

# Optional: higher GitHub API rate limits
GITHUB_TOKEN=ghp_...

Project Structure

src/vaultmind/
โ”œโ”€โ”€ main.py              # CLI entry point (typer)
โ”œโ”€โ”€ config.py            # Pydantic settings (config.yaml + .env)
โ”œโ”€โ”€ schemas.py           # Pipeline data models
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ router.py        # URL detection & canonicalization
โ”‚   โ”œโ”€โ”€ extractors.py    # Dispatcher to source-specific extractors
โ”‚   โ”œโ”€โ”€ scraper.py       # Article extraction (trafilatura)
โ”‚   โ”œโ”€โ”€ reddit.py        # Reddit JSON API client
โ”‚   โ”œโ”€โ”€ github.py        # GitHub REST API client
โ”‚   โ”œโ”€โ”€ twitter.py       # Twitter syndication + fallback
โ”‚   โ”œโ”€โ”€ renderers.py     # Source-specific Markdown body renderers
โ”‚   โ”œโ”€โ”€ writer.py        # Atomic vault file writer
โ”‚   โ”œโ”€โ”€ linker.py        # Related note finder (Jaccard similarity)
โ”‚   โ”œโ”€โ”€ vault_index.py   # Vault scanner for Phase 4 commands
โ”‚   โ”œโ”€โ”€ search.py        # Keyword & fuzzy search engine
โ”‚   โ”œโ”€โ”€ flashcards.py    # Flashcard parser from note bodies
โ”‚   โ””โ”€โ”€ moc.py           # Map of Content generator
โ”œโ”€โ”€ ai/
โ”‚   โ”œโ”€โ”€ pipeline.py      # Content โ†’ AIEnrichment flow
โ”‚   โ”œโ”€โ”€ prompts.py       # All prompt templates (provider-agnostic)
โ”‚   โ”œโ”€โ”€ knowledge.py     # Brief / Digest / Reflect synthesis
โ”‚   โ”œโ”€โ”€ json_utils.py    # JSON response cleanup
โ”‚   โ””โ”€โ”€ providers/       # Anthropic, OpenAI, Ollama (stub)
โ”œโ”€โ”€ commands/            # One file per CLI command
โ””โ”€โ”€ utils/               # Display, hashing, URLs, tags, logging

Tech Stack

  • CLI: Typer + Rich
  • AI: Anthropic SDK, OpenAI SDK (provider-agnostic via Protocol)
  • Extraction: trafilatura, httpx
  • Data: Pydantic models, YAML frontmatter
  • Resilience: tenacity retries with exponential backoff
  • Logging: structlog (JSON to file, human-readable in verbose mode)
  • Package manager: uv

Requirements

  • Python โ‰ฅ 3.11
  • An Anthropic or OpenAI API key
  • An Obsidian vault directory

See PRD.md for the full project blueprint.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vaultmind-0.1.0.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vaultmind-0.1.0-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file vaultmind-0.1.0.tar.gz.

File metadata

  • Download URL: vaultmind-0.1.0.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for vaultmind-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ebf6c126db4b3f081dfa576175197c437178febf6afd74ab8583d540e0b7e788
MD5 b61b90fb1c0469487490aa78489cbfa5
BLAKE2b-256 15d908bcfcf00ccb41c9552b0143639d4421970bac57e6890ba3aa3f4f8f09a8

See more details on using hashes here.

File details

Details for the file vaultmind-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vaultmind-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for vaultmind-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebfefcb3d70d5f8c97d7a0abde71f1d2060f6c5c05639861d9029ff8f1fdd294
MD5 f2e01b4e0d2a533b5c11ffec1fd40b36
BLAKE2b-256 652eecf345d37df868381eca997440422b997dc1a81ad3944edb66d846b245fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page