linkdb is a simple, zero-dependency CLI tool for collecting and managing interesting project links (like "awesome" lists).
It lets you build a personal database of project URLs you want to remember and organize them locally with search, tags, and export tools.
Designed for people who enjoy discovering things on the internet and keeping track of what matters.
It consists of a single-file Python script using only the standard library. Python 3.10+.
linkdb uses two stores that serve different jobs:
| Store | Role | Edit with |
|---|---|---|
data/entries.json |
Git-friendly source of truth (categories, entries, links) | add, update, remove, hand-edits |
data/linkdb.db |
Query index, GitHub stats, history, and FTS search | import, github fetch, link commands |
Typical workflow:
-
Mutate entries in JSON (
add/update/ edit the file) — JSON stays canonical for catalogs. -
Run
linkdb import(orimport --update) so SQLite mirrors JSON. -
Enrich with
linkdb github fetch(stats live in the DB). -
Discover with
list/search; publish withgenerate/export. -
Periodically run
linkdb maintain(doctor + URL check + stale repos).
Override paths with LINKDB_JSON and LINKDB_DB if needed.
pip install linkdbor
# Clone and install
git clone https://github.com/user/linkdb.git
cd linkdb
uv sync
# Or just run directly
./linkdb.py --help# Check data health
linkdb doctor
# Import JSON → SQLite
linkdb import
# List entries
linkdb list
# List with filters
linkdb list --stars-min 100 --language python --active-only
linkdb list --tag rust
# Search (FTS5)
linkdb search synthesizer
# Add a new entry (auto-fetches GitHub metadata)
linkdb add -r "https://github.com/user/my-project" -c synthesis
# Add interactively
linkdb add -i
# Add multiple entries from file or stdin
linkdb add --file urls.txt -c synthesis
echo "https://github.com/user/repo" | linkdb add -c synthesis -
# Update an entry (including tags)
linkdb update my-project -d "An awesome synth" --tags rust,realtime
# Remove an entry
linkdb remove my-project
# Remove all entries in a category
linkdb remove --category obsolete-category
# Sort entries.json
linkdb sort
linkdb sort --by-category
# Generate README (uses linkdb.toml publish settings when present)
linkdb generate -o README.md
# Scheduled maintenance (doctor + check + github stale)
linkdb maintain
# Create backup
linkdb backup create
# View change history
linkdb history
linkdb history my-project| Command | Description |
|---|---|
add |
Add entry (supports --file/- for batch, -i for interactive) |
add-link |
Add a link to an entry |
backup create |
Create a backup of JSON and database |
backup restore |
Restore from a backup |
backup list |
List available backups |
category list |
List all categories |
category add |
Add a new category |
category rm |
Remove a category |
check |
Validate URLs for broken links |
dedupe |
Find and merge duplicate entries |
doctor |
Check data integrity and health |
export |
Export database to JSON |
generate |
Generate README from database |
github fetch |
Fetch GitHub repository stats |
github stale |
Find unmaintained projects |
github cache |
Manage GitHub API cache |
history |
Show change history (optional entry filter) |
import |
Import JSON to database (supports --webloc for .webloc files) |
list |
List entries with filters |
list-links |
List links for an entry or all entries |
maintain |
Run doctor + check + github stale (cron-friendly) |
remove |
Remove entry (supports --category for bulk removal) |
remove-link |
Remove a link from an entry |
search |
Search entries (FTS5) |
sort |
Sort entries.json file |
stats |
Show database statistics |
update |
Update an existing entry |
linkdb github fetch # Fetch stats for all repos
linkdb github fetch --no-cache # Bypass cache
linkdb github stale # Find unmaintained projects
linkdb github cache stats # Show cache statistics
linkdb github cache clear # Clear expired cache entrieslinkdb backup create # Create new backup
linkdb backup list # List available backups
linkdb backup restore <file> # Restore from backupAssociate relevant links (articles, tutorials, videos) with entries:
# Add a link to an entry
linkdb add-link my-project https://example.com/article -t "Getting Started" --type article
# Add with note
linkdb add-link my-project https://youtube.com/watch?v=xyz -t "Tutorial" --type video -n "Great intro"
# List links for an entry
linkdb list-links my-project
# List all links (JSON format)
linkdb list-links -f json
# Remove a link
linkdb remove-link my-project https://example.com/articleValid link types: article, tutorial, video, docs, discussion
-v, --verbose # Increase verbosity (use -vv for debug)
-q, --quiet # Suppress non-error output
--version # Show versionLINKDB_JSON # Override default entries.json path
LINKDB_DB # Override default database path
LINKDB_CONFIG # Override default linkdb.toml path
GITHUB_TOKEN # GitHub API token for higher rate limits
# Publish metadata; each overrides the matching linkdb.toml [publish] key
LINKDB_PUBLISH_TITLE
LINKDB_PUBLISH_TAGLINE
LINKDB_PUBLISH_AUTHOR
LINKDB_PUBLISH_REPO_URL
LINKDB_PUBLISH_HOMEPAGE
LINKDB_PUBLISH_ISSUES_URL
LINKDB_PUBLISH_CONTRIBUTING_URL
LINKDB_PUBLISH_LICENSE
LINKDB_PUBLISH_LICENSE_URLlinkdb generate reads the metadata for your list from linkdb.toml. The file
describes the list you publish, not linkdb itself, so it belongs alongside your
data rather than in this repo; linkdb ships without one and falls back to
generic defaults.
Create it next to your data/ directory, or point --config / LINKDB_CONFIG
at it:
[publish]
title = "Awesome Widgets"
tagline = "A curated guide to open-source widget projects."
author = "Your Name"
repo_url = "https://github.com/you/awesome-widgets"
homepage = ""
license = "CC0-1.0"
license_url = "http://creativecommons.org/publicdomain/zero/1.0/"Every key is optional; precedence runs defaults < linkdb.toml < environment.
issues_url is derived as <repo_url>/issues on GitHub, GitLab, and Codeberg
unless set explicitly. Set contributing_url to link a CONTRIBUTING.md from
the generated Contributing section. Absent metadata is omitted rather than
rendered as an empty link.
Entries are stored in data/entries.json:
{
"categories": ["synthesis", "dsp", "midi"],
"entries": [
{
"name": "project-name",
"category": "synthesis",
"desc": "Project description",
"url": "https://example.com",
"repo": "https://github.com/user/project",
"links": [
{
"url": "https://example.com/tutorial",
"title": "Getting Started Guide",
"link_type": "tutorial",
"note": "Great introduction"
}
]
}
]
}Each entry must have:
-
name- unique project name -
category- from defined categories list -
desc- description -
urland/orrepo- at least one link
Optional fields:
-
links- array of related links (articles, tutorials, videos, docs, discussions) -
tags- comma-separated tags -
aliases- alternative names -
mirror_urls- additional URLs
from linkdb import (
add_entry, update_entry, remove_entry, get_entry,
sort_entries_file, find_duplicates, create_backup
)
# Add entry (returns entry dict, raises ValueError/KeyError on error)
entry = add_entry("my-project", "dsp", "Description",
repo="https://github.com/...")
# Add from GitHub URL (auto-fetches metadata)
from linkdb import add_entry_from_github
entry = add_entry_from_github("https://github.com/user/repo", "dsp")
# Update entry
entry = update_entry("my-project", desc="New description")
# Get entry (returns dict or None)
entry = get_entry("my-project")
# Remove entry
entry = remove_entry("my-project")
# Sort entries file
sort_entries_file() # Sort by name
sort_entries_file(by_category=True) # Sort by category, then name
# Find duplicates
duplicates = find_duplicates()
# Create backup
backup_path = create_backup()# Install dev dependencies
uv sync
# Run tests
make test
# Run full QA (test + lint + typecheck + format)
make qa
# Lint only
make lint
# Type check
make typecheckMIT