Metadata-Version: 2.4
Name: linkmark
Version: 1.0.0
Summary: Annotated bookmark CLI — save links with mandatory context
Author: linkmark contributors
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# linkmark — Annotated Bookmark CLI

Save links with mandatory context — because bookmarks are useless without the "why."

## Install

```bash
# Clone or copy the file
cp linkmark.py /usr/local/bin/linkmark
chmod +x /usr/local/bin/linkmark

# Or run directly
python3 linkmark.py
```

**Requirements:** Python 3.11+, zero external dependencies (stdlib only).

## Quick start

```bash
# Add a bookmark (note is mandatory)
linkmark add "https://docs.python.org/3/library/sqlite3.html" "Python sqlite3 docs — FTS5 reference" --tag python --tag docs

# List recent bookmarks
linkmark list

# Search
linkmark search "python"

# Export
linkmark export --format markdown > bookmarks.md
linkmark export --format json > bookmarks.json

# Stats
linkmark stats

# List tags
linkmark tags

# Delete
linkmark delete 1
```

## Commands

| Command | Description |
|---------|-------------|
| `add <url> <note> [--tag TAG ...]` | Save a bookmark with mandatory annotation |
| `list [--page N] [--limit N]` | List recent bookmarks, newest first |
| `search <query> [--limit N]` | Full-text search (FTS5, falls back to LIKE) |
| `export [--format markdown\|json]` | Export all bookmarks |
| `stats` | Show total, this week, top tags |
| `delete <id>` | Remove a bookmark by ID |
| `tags` | List all tags with counts |

## Storage

- SQLite database at `~/.local/share/linkmark/bookmarks.db`
- FTS5 virtual table for full-text search (auto-created if available)
- Tags stored in normalized many-to-many tables
