license-picker
v3.0.0Compare open-source licenses, generate LICENSE files, and check compatibility. Use when choosing licenses, generating LICENSE files, checking terms.
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 todata.log. Example:2025-03-18 MIT license for project X. - remove
<item>— logs a removal event (note: does not physically delete fromdata.log— intended for audit trails). - search
<term>— runsgrep -iagainstdata.logand returns matching lines, or "Not found". - export — dumps
data.logcontents 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 prefixhistory.log— audit log of all command invocations with timestampsconfig.json— configuration file (referenced byconfigcommand)
Requirements
- Bash (with
set -euo pipefail) - Standard Unix utilities:
date,cat,grep,wc,echo - No external dependencies or API keys required
When to Use
- Quick data entry from the terminal — use
license-picker addto log timestamped notes, decisions, or records without leaving the command line - Searching through past entries — use
license-picker searchto find specific items across your data log - Exporting data for external tools — pipe
license-picker exportto files or other commands for processing - Checking tool health — run
license-picker statusorlicense-picker infoto verify the tool is set up correctly - Initializing on a new machine — run
license-picker initto 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 helpto see all available commands - The data directory is auto-created on first use — no manual setup needed
- Set
LICENSE_PICKER_DIRenvironment variable to use a custom data location - All commands are logged to
history.logfor a full audit trail - Pipe
license-picker exportintogrep,jq, or other tools for advanced filtering
Powered by BytesAgain | bytesagain.com | [email protected]