Clean
Bookmarks

AI-powered bookmark organizer for Chromium. Local-first, bring-your-own-key.

TypeScript Node.js Chrome MV3 MIT
github.com/shafiqimtiaz/clean-bookmarks
The Problem

Bookmarks piled into Other Bookmarks,
sorted into a clean tree.

Clean Bookmarks scans the bookmarks piled into Other Bookmarks and the loose items on the Bookmarks Bar, asks an AI to propose a category structure, lets you tune it, then sorts everything into place. One click and it's all back the way it was.

Overview
02
Features

What it does

01

Two-pass AI

First pass proposes 8–12 top-level categories. Second pass assigns every bookmark. Sub-categories only when 10+ share a clear theme.

02

You stay in control

Review the proposed categories in the UI. Rename, remove, or add before anything moves.

03

Your prompt, your categories

The taxonomy prompt is editable in Settings. Bias the structure toward your work or hobbies. Reset with one click.

04

Non-destructive

Bookmarks Bar and Other Bookmarks roots are never moved. Named folders are flattened; "exclude" ones are left alone.

05

One-click undo

The current layout is snapshotted before any change. A single click restores it.

06

Bring your own key

API key stored in chrome.storage.local. Never synced. No install-time host permissions.

07

Cost transparency

See the estimated API calls, tokens, and cost before you spend a cent.

08

Resilient

Batched with bounded concurrency, automatic retries, and a safe Unsorted fallback.

Features
03
How it works

A small state machine

Toolbar popup

Organize

Kicks off the run.

Full-page tab

Runs the long job

Stays alive for multi-minute runs.

Service worker

chrome.bookmarks

Brokers fast read / apply / undo.

Your provider

The AI

The endpoint you configure.

WHY A TAB? MV3 service workers die after ~30s idle — that would interrupt a long run. The tab context stays alive instead.
Architecture
04
Pipeline

Read → Sort → Apply

01

Read scope

Collect everything in Other Bookmarks and loose items on the Bookmarks Bar.

02

Estimate

Batches, tokens, and dollar cost — shown before you spend.

03

Propose taxonomy

TypeBox-typed tool returns validated structured args. No JSON parsing.

04

Review

You edit the proposed categories.

05

Assign

Every bookmark matched by numeric index, validated against a Zod schema.

06

Apply

Snapshot taken, then category folders created and bookmarks moved into place.

07

Undo

Restore the snapshot at any time.

Pipeline
05
Privacy

No backend.
No account.
No data store.

Your bookmarks stay in your browser. The only thing that ever leaves your device is bookmark titles and URLs — sent to the AI endpoint you configure.

Bring your own key
Stored in chrome.storage.local. Never synced.
Minimal payload
Only titles and URLs leave. Nothing else.
Explicit consent
First-run screen states exactly what is sent and where, before any run.
Scoped permissions
No install-time host access. Granted per-origin on first use.
Privacy
06
Get started

Build & load

1

Open chrome://extensions

2

Enable Developer mode

3

Load unpacked → pick dist/

4

Toolbar → Settings: provider, base URL, key, model

bash — clean-bookmarks
$ git clone …/clean-bookmarks.git
$ cd clean-bookmarks
$ npm install
$ npm run build
✓ bundled to dist/
27 PROVIDERS OpenAI, Anthropic, Google, Mistral, DeepSeek, Groq, xAI, OpenRouter, Ollama, LM Studio, … + Custom for any OpenAI-compatible endpoint.
Get started
07
Tech stack

Under the hood

Language
TypeScript
Typed end to end
Tooling
Node + esbuild
tsx runs the TS build scripts
Platform
Chrome MV3
Manifest V3
AI
pi-ai
Multi-provider streaming
Validation
Zod + TypeBox
Parse-time + tool schemas
UI
Vanilla DOM
No framework
Tech stack
08
Clean Bookmarks logo

Clean your bookmarks.

Local-first · Bring-your-own-key · One-click undo

github.com/shafiqimtiaz/clean-bookmarks ↗
09
01 / 09