Skip to content

org-atelier/org-anchor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

org-anchor ⚓

🚧 Work in Progress — Actively under development. APIs and features may change.

A local-first knowledge copilot for Org-mode wikis. Browse the web, and your existing notes surface automatically in a sidebar — no cloud, no account, no tracking.

Inspired by the Analogy concept (smart copilot for Notion), but rebuilt from scratch for Org-mode users who want everything local and open source.

How it works

You browse the web                     Your Org wiki
       │                                    │
       ▼                                    ▼
┌──────────────┐    HTTP localhost    ┌──────────────┐
│ org-anchor   │◄────────────────────►│  org-qmd     │
│ (Chrome ext) │    search + clip     │  (local)     │
│              │                      │              │
│ Side Panel:  │                      │ BM25+vector  │
│ related notes│                      │ hybrid search│
│ clip button  │                      │ on-device    │
└──────────────┘                      └──────────────┘
  1. Content Script extracts the current page's main text using Readability.js
  2. Side Panel sends the text to a local org-qmd server
  3. org-qmd runs BM25 + vector hybrid search against your indexed Org files
  4. Related notes appear in the sidebar — click to expand, or clip the page to your wiki

Everything runs on your machine. The extension talks only to localhost.

Features

  • Passive discovery — related notes surface as you browse, no manual search needed
  • Manual search — type a query in the sidebar to search your wiki directly
  • One-click clip — save any web page to your raw/clips/ directory as an .org file
  • Server health indicator — see at a glance whether org-qmd is running
  • Debounced + cancellable — fast tab switching won't flood the server

Prerequisites

  • org-qmd (fork with Org-mode support) installed and working
  • An Org-mode wiki indexed by org-qmd (qmd collection add ~/org/wiki --name wiki)
  • Node.js >= 22

Setup

# 1. Clone
git clone https://github.com/YOUR_USERNAME/org-anchor.git
cd org-anchor

# 2. Install dependencies
pnpm install

# 3. Build the extension
pnpm run build

# 4. Load in Chrome
#    → chrome://extensions
#    → Enable "Developer mode"
#    → Click "Load unpacked"
#    → Select the dist/ directory

# 5. Start the org-qmd server (in another terminal)
cd /path/to/org-qmd
npx tsx src/cli/qmd.ts mcp --http --daemon

Usage

  1. Click the org-anchor icon in your Chrome toolbar to open the side panel
  2. Browse any web page — related notes from your wiki appear automatically
  3. Type in the search box to manually search your wiki
  4. Click 📎 Clip to wiki to save the current page to raw/clips/

Development

pnpm run dev    # Start Vite dev server (hot reload)
pnpm run build  # Production build to dist/
pnpm run test   # Run tests

Architecture

src/
├── manifest.json          # Chrome MV3 manifest
├── background.ts          # Service Worker — relays page content
├── content.ts             # Content Script — extracts page text
├── lib/
│   └── api.ts             # HTTP client for org-qmd server
└── sidepanel/
    ├── index.html         # Side Panel UI
    ├── main.ts            # Search logic, rendering, clip
    └── styles.css         # Minimal CSS

Data flow

Page loads
  → content.ts: Readability extracts text (≤5000 chars)
  → chrome.runtime.sendMessage to background
  → background.ts: stores in chrome.storage.session
  → sidepanel/main.ts: reads storage, sends first 500 chars to search
  → GET http://localhost:8181/search?q=...&n=5
  → org-qmd: BM25 + vector search on indexed .org files
  → results rendered as cards in Side Panel

Server API

org-anchor expects these endpoints on localhost:8181:

Endpoint Method Description
/health GET Server health check
/search?q=TEXT&n=N GET Search indexed documents
/clip POST Save {url, title, content} as .org file

These endpoints are provided by org-qmd with our Org-mode patches.

Part of org-atelier

org-anchor is part of the org-atelier project — a suite of local-first tools for Org-mode knowledge management:

  • org-qmd — On-device hybrid search for Org + Markdown files
  • org-anchor — Browser extension that surfaces related notes (this repo)
  • LLM Wiki — Claude Code schema for LLM-maintained Org wikis

License

MIT

About

Local-first knowledge copilot for Org-mode wiki

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors