Skip to main content

A zero-dependency CLI tool for managing curated project lists - zero dependencies, stdlib only

Project description

linkdb

A zero-dependency CLI tool for managing curated project lists (like "awesome" lists).

Single-file Python script using only the standard library. Python 3.8+.

Installation

# Clone and install
git clone https://github.com/user/linkdb.git
cd linkdb
uv sync

# Or just run directly
./linkdb.py --help

Quick Start

# Check data health
./linkdb.py doctor

# Import to database
./linkdb.py import

# List entries
./linkdb.py list

# List with filters
./linkdb.py list --stars-min 100 --language python --active-only

# Search
./linkdb.py search synthesizer

# Add a new entry (auto-fetches GitHub metadata)
./linkdb.py add -r "https://github.com/user/my-project" -c synthesis

# Add interactively
./linkdb.py add -i

# Add multiple entries from file
./linkdb.py add --file urls.txt -c synthesis

# Update an entry
./linkdb.py update my-project -d "An awesome synth"

# Remove an entry
./linkdb.py remove my-project

# Remove all entries in a category
./linkdb.py remove --category obsolete-category

# Sort entries.json
./linkdb.py sort
./linkdb.py sort --by-category

# Generate README
./linkdb.py generate -o README.md

# Create backup
./linkdb.py backup create

# View change history
./linkdb.py history
./linkdb.py history my-project

Commands

Command Description
add Add entry (--file for batch, -i for interactive)
backup Backup operations (create, restore, list)
category Manage categories (list, add, rm)
check Check 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 GitHub operations (fetch, stale, cache)
history Show change history
import Import JSON or .webloc files to database
list List entries with filters
remove Remove entry (--category for bulk)
search Search entries by name/description
sort Sort entries.json file
stats Show database statistics
update Update existing entry

GitHub Subcommands

./linkdb.py github fetch          # Fetch stats for all repos
./linkdb.py github fetch --no-cache  # Bypass cache
./linkdb.py github stale          # Find unmaintained projects
./linkdb.py github cache stats    # Show cache statistics
./linkdb.py github cache clear    # Clear expired cache entries

Backup Subcommands

./linkdb.py backup create         # Create new backup
./linkdb.py backup list           # List available backups
./linkdb.py backup restore <file> # Restore from backup

Global Options

-v, --verbose    # Increase verbosity (use -vv for debug)
-q, --quiet      # Suppress non-error output
--version        # Show version

Environment Variables

CURATOR_JSON     # Override default entries.json path
CURATOR_DB       # Override default database path
GITHUB_TOKEN     # GitHub API token for higher rate limits

Data Format

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"
    }
  ]
}

Each entry must have:

  • name - unique project name
  • category - from defined categories list
  • desc - description
  • url and/or repo - at least one link

Optional fields (auto-populated from GitHub):

  • tags - comma-separated tags
  • aliases - alternative names
  • mirror_urls - additional URLs

Programmatic API

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()

Development

# 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 typecheck

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linkdb-0.1.0.tar.gz (124.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linkdb-0.1.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file linkdb-0.1.0.tar.gz.

File metadata

  • Download URL: linkdb-0.1.0.tar.gz
  • Upload date:
  • Size: 124.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for linkdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 beb65b256f18233ef562c3b295d7bfbc2d355766ef47587bd27efde918dd2bc8
MD5 470de4fe79220f2b0077f501d9dfdd6a
BLAKE2b-256 80deb12168e95a035f9f699b2612f9218e036670ec599d6ab0e597a2a00ce6a3

See more details on using hashes here.

File details

Details for the file linkdb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: linkdb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for linkdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f22345a299d29c8455e6c097703a33186337664fd571b3a5b442ab6b31acd25c
MD5 d2c8343f0d23dce836524a6f648f11b8
BLAKE2b-256 9effc073f371a080bbd4dbf33449910bf8303db3c8faf7a5053d0fc27e1d0a66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page