I’m excited to announce the release of smartpin, a new command-line tool that leverages AI to improve the metadata you capture for your Pinboard bookmarking. This tool scratches an itch that I’ve had for a while to apply some meaningful curation and organization to the links and articles I save off.
The Problem with Manual Bookmarking
We’ve all been there - you find an interesting article, quickly save it to your bookmarking service, and promise yourself you’ll come back later to properly tag and describe it. But “later” rarely comes, and you end up with a graveyard of poorly organized bookmarks that are nearly impossible to find when you need them.
Even when you do take the time to add metadata, it’s often inconsistent. Sometimes you use “machine-learning,” other times “ml” or “AI.” Your descriptions might be too verbose one day and non-existent the next. This inconsistency makes your bookmark collection less useful over time.
Enter SmartPin
smartpin solves this problem by using AI to automatically analyze web pages and extract relevant metadata. When you install the package from PyPI, you get the pinit
command-line tool that:
- Extracts meaningful titles - Not just the HTML title tag, but the actual content headline
- Generates concise descriptions - A 1-2 sentence summary of what the page is actually about
- Suggests relevant tags - 3-8 contextually appropriate tags for better organization
- Supports multiple AI models - Use Claude, GPT-4, Gemini, or other LLMs based on your preference
How It Works
The usage is dead simple. Once configured with your Pinboard API token and AI provider credentials, just run:
pinit add https://example.com/interesting-article
The tool fetches the page content, sends it to your chosen AI model for analysis, and automatically creates a well-structured bookmark with proper metadata. No manual input required!
Here’s what the output looks like:
┌─ Extracted Bookmark ─────────────────────────────────┐
│ Title: How to Build Better Software with AI │
│ URL: https://example.com/ai-software-development │
│ Description: A comprehensive guide exploring how │
│ artificial intelligence can enhance software │
│ development workflows and code quality. │
│ Tags: ai, software-development, programming, guide │
└──────────────────────────────────────────────────────┘
✓ Bookmark saved successfully!
Key Features
Flexible AI Integration: The tool uses Simon Willison’s excellent LLM library, which means you can easily switch between different AI providers. Prefer Claude? Use it. Have OpenAI credits? Switch to GPT-4. The choice is yours.
Privacy Controls: Mark bookmarks as private or “to read” with simple flags:
pinit add https://example.com --private --toread
Dry Run Mode: Preview what the AI extracts before saving:
pinit add https://example.com --dry-run
JSON Output: Need to integrate with other tools? Get machine-readable output:
pinit add https://example.com --json | jq '.tags'
Multiple Configuration Options: Configure via environment variables, local .env
files, or user config at ~/.pinit/config
. The tool supports whatever workflow fits your style.
Installation and Setup
Getting started is straightforward:
# Install from PyPI
pip install smartpin
# Or if you use uv (recommended)
uv pip install smartpin
# Set up your API tokens
export PINBOARD_API_TOKEN=your_username:your_token
export ANTHROPIC_API_KEY=your_key # Or OPENAI_API_KEY, etc.
# Start bookmarking!
pinit add https://example.com
Technical Details
For the curious, smartpin is built with:
- Click for the CLI framework
- Rich for beautiful terminal output
- BeautifulSoup for robust HTML parsing
- httpx for reliable web page fetching
- Type hints throughout for better development experience
The architecture is modular and clean, making it easy to extend or modify. The AI prompting is done through Jinja2 templates, so you can even customize how the AI analyzes pages if needed.
What’s Next?
This is just the beginning. Some ideas for future development:
- Bulk import of existing bookmarks for re-tagging
- Integration with browser extensions
- iOS share extension for quick capture of links on your iOS devices
Try It Out
smartpin is open source and available now on PyPI and GitHub. I’d love to hear your feedback, feature requests, or contributions.