Skip to content

glenpi/bkmk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bkmk

Organize your Chrome bookmarks with help from a Claude agent.

A small local web app that reads your Chrome bookmarks, asks Claude to propose a folder taxonomy, lets you refine it through a chat (the agent edits the tree via tool calls), and exports a bookmarks.html file you can import back into Chrome.

Prerequisites

  • macOS with Google Chrome installed (the bookmarks file is read from ~/Library/Application Support/Google/Chrome/Default/Bookmarks)
  • Python 3.11+
  • uv (brew install uv)
  • An Anthropic API key

Setup

git clone <this-repo> bkmk
cd bkmk
uv sync
export ANTHROPIC_API_KEY=sk-ant-...

Tip: copy .env.example to .env and source it from your shell, or paste the export line into your ~/.zshrc. The repo's .gitignore excludes .env so your key won't be committed.

Run

uv run python -m bkmk

Open http://127.0.0.1:8000 in your browser.

How to use it

The UI has three buttons across the top — work through them in order:

  1. Load Chrome bookmarks. Reads your Chrome bookmarks file and shows them under a single Unsorted folder.

  2. Propose organization. Sends the bookmarks to Claude, which returns a folder taxonomy with each bookmark assigned. Takes 20–40 seconds. The rationale appears in the chat panel.

  3. Chat to refine. Talk to the agent in the right pane. Examples:

    • "Rename AI Tools to AI."
    • "Move Rust and Go out of Dev Resources, then delete Dev Resources."
    • "Where did you put the Factorio wiki?" (questions don't trigger edits)

    The agent edits the tree directly via tool calls; each call shows up in the chat as a small grey row so you can see what changed.

  4. Export bookmarks.html. Downloads a Netscape-format file.

Importing into Chrome

  1. Chrome → ⋮ menu → Bookmarks and lists → Bookmark manager
  2. In the manager, click ⋮ → Import bookmarks
  3. Select the bookmarks.html you downloaded

Chrome adds the imported tree alongside your existing bookmarks (under a folder named Imported or similar) — it does not replace them. To do a clean swap, delete your existing bookmarks first, or move the imported folders to where you want them.

What's in the project

  • bkmk/chrome.py — Chrome bookmarks JSON reader
  • bkmk/state.py — in-memory folder/bookmark model + mutation ops
  • bkmk/agent.py — Claude calls (initial proposal + chat agent loop with edit tools)
  • bkmk/export.py — Netscape HTML emitter
  • bkmk/server.py — FastAPI server
  • bkmk/static/ — single-page UI (vanilla JS, no build step)

Notes

  • State is held in memory in the server process; restarting the server resets everything. Re-run "Load" then "Propose" to start fresh.
  • Single-user, single-session — no auth, only listens on 127.0.0.1.
  • Costs a few cents in API spend per session at 26 bookmarks; scales with bookmark count and chat length. Uses claude-opus-4-7.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors