SkillHub

license-picker

v3.0.0

Compare open-source licenses, generate LICENSE files, and check compatibility. Use when choosing licenses, generating LICENSE files, checking terms.

Sourced from ClawHub, Authored by bytesagain1

Installation

Please help me install the skill `license-picker` from SkillHub official store. npx skills add bytesagain1/license-picker

License Picker

Multi-purpose utility tool for managing data entries from the command line. Add, list, search, remove, and export entries with a simple file-based backend. Includes configuration, initialization, and health-check commands.

Commands

Command Description
license-picker run <args> Execute main function — logs the run action
license-picker config <args> Show or manage configuration (points to config.json in data dir)
license-picker status <args> Show current status (reports "ready")
license-picker init <args> Initialize the data directory
license-picker list <args> List all entries from the data log
license-picker add <item> Add a new timestamped entry to the data log
license-picker remove <item> Remove an entry (logs the removal)
license-picker search <term> Search the data log for a keyword (case-insensitive)
license-picker export <args> Export/dump the full data log to stdout
license-picker info <args> Show version and data directory path
license-picker help Show help message with all commands
license-picker version Show version (v2.0.0)

Command Details

  • run — executes and logs the action. Useful as a generic "do something" entry point.
  • config — displays the path to the configuration file ($DATA_DIR/config.json). Extend by editing config.json manually.
  • status — quick health check. Always reports "ready" and logs the check.
  • init — ensures the data directory exists at ~/.local/share/license-picker/ (created automatically on first use).
  • list — prints the full contents of data.log. If empty, shows (empty).
  • add <item> — appends a line with today's date plus your input to data.log. Example: 2025-03-18 MIT license for project X.
  • remove <item> — logs a removal event (note: does not physically delete from data.log — intended for audit trails).
  • search <term> — runs grep -i against data.log and returns matching lines, or "Not found".
  • export — dumps data.log contents to stdout. Pipe to a file for backups: license-picker export > backup.txt.
  • info — prints the current version and data directory path.

Every command logs its invocation to history.log with a timestamp for audit purposes.

Data Storage

All data is stored in ~/.local/share/license-picker/ (override with LICENSE_PICKER_DIR or XDG_DATA_HOME):

  • data.log — main data file, one entry per line with date prefix
  • history.log — audit log of all command invocations with timestamps
  • config.json — configuration file (referenced by config command)

Requirements

  • Bash (with set -euo pipefail)
  • Standard Unix utilities: date, cat, grep, wc, echo
  • No external dependencies or API keys required

When to Use

  1. Quick data entry from the terminal — use license-picker add to log timestamped notes, decisions, or records without leaving the command line
  2. Searching through past entries — use license-picker search to find specific items across your data log
  3. Exporting data for external tools — pipe license-picker export to files or other commands for processing
  4. Checking tool health — run license-picker status or license-picker info to verify the tool is set up correctly
  5. Initializing on a new machine — run license-picker init to set up the data directory, then start adding entries immediately

Examples

# Initialize the data directory
license-picker init

# Add a new entry
license-picker add "MIT license selected for web-app project"

# Add another entry
license-picker add "Apache-2.0 for backend API — patent clause needed"

# List all entries
license-picker list

# Search for entries containing "MIT"
license-picker search MIT

# Check current status
license-picker status

# Show version and data path
license-picker info

# Export all data to a backup file
license-picker export > ~/license-decisions-backup.txt

Tips

  • Run license-picker help to see all available commands
  • The data directory is auto-created on first use — no manual setup needed
  • Set LICENSE_PICKER_DIR environment variable to use a custom data location
  • All commands are logged to history.log for a full audit trail
  • Pipe license-picker export into grep, jq, or other tools for advanced filtering

Powered by BytesAgain | bytesagain.com | [email protected]