Bookmark Manager
A Rust library and toolkit to import, search, organize, and generate knowledge graphs from browser bookmarks and history.
Features
- Multi-browser support: Chrome, Firefox, Safari, Edge
- Search and open bookmarks instantly
- Export bookmarks and history to YAML
- Remove duplicates and organize into folders
- Generate knowledge graphs (DOT, JSON, GEXF formats)
- Three usage modes: CLI, Library API, MCP Server
Installation
CLI Tool (Default)
MCP Server
Library
Add to your Cargo.toml:
[]
= "0.1.2"
Quick Start
# Run the demo
# Or try specific examples
Usage Modes
1. CLI Mode (Default)
Command-line interface for interactive use:
# Export bookmarks
# Search bookmarks
# Generate knowledge graph
2. Library API
Use as a Rust library in your projects:
use ;
See examples/library_usage.rs for a complete example.
3. MCP Server
Model Context Protocol server for AI assistants:
# Build and run MCP server
Available MCP Tools:
export_bookmarks- Export bookmarks from browserssearch_bookmarks- Search bookmarks by querylist_browsers- List available browsersprocess_bookmarks- Deduplicate and organizegenerate_graph- Generate knowledge graphs
Basic Usage
# Export bookmarks
# Search bookmarks
# Open a bookmark
# Process (dedupe + organize)
# Generate knowledge graph
Commands
export - Export bookmarks/history
list - List browsers
search - Search bookmarks
open - Open in browser
process - Dedupe and organize
graph - Generate knowledge graphs
config - Manage settings
Knowledge Graphs
Generate visual graphs showing relationships between bookmarks:
- Domain-based: Links bookmarks from the same domains
- Folder-based: Links bookmarks in the same folders
- Formats: DOT (Graphviz), JSON (web), GEXF (Gephi)
# Generate DOT for Graphviz
# Generate GEXF for Gephi
Safari Export
On macOS, Safari bookmarks are protected. Export manually:
- Copy
~/Library/Safari/Bookmarks.plistto Desktop - Run:
cargo run -- export --browser safari --profile-dir ~/Desktop/Bookmarks.plist
Options
| Option | Values |
|---|---|
--browser |
chrome, firefox, safari, edge, all |
--data-type |
bookmarks, history, both |
--format |
dot, json, gexf (graph) |
--mode |
dedupe, organize, both |
--strategy |
first, last, recent, merge |
--org-strategy |
domain, category, custom |
Development
# Build all modes
# Build specific modes
# Test all modes
# Run tests individually
# Debug logging
RUST_LOG=debug
Build Features
- default: CLI mode with
clap,dialoguer,open - cli: Command-line interface dependencies
- mcp: MCP server support
Examples
See examples/ directory for demo scripts:
- demo.sh - Full feature demo (interactive)
- examples/quick-start.sh - Export, search, graph generation
- examples/knowledge-graph.sh - Graph generation (DOT, JSON, GEXF)
- examples/processing.sh - Deduplication and organization
- examples/search-open.sh - Search patterns and opening
See examples/README.md for detailed documentation.
Changelog
See CHANGELOG.md for version history and release notes.
License
Apache-2.0