{"id":51008421,"url":"https://github.com/voidd0/licenseme","last_synced_at":"2026-06-20T23:31:03.621Z","repository":{"id":353200384,"uuid":"1218355025","full_name":"voidd0/licenseme","owner":"voidd0","description":"generate a LICENSE file in seconds. MIT, Apache-2.0, GPL, BSD, and more.","archived":false,"fork":false,"pushed_at":"2026-04-29T06:14:39.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T20:46:16.307Z","etag":null,"topics":["apache-2-0","cli","devtools","gpl","javascript","license-generator","mit","nodejs","software-license"],"latest_commit_sha":null,"homepage":"https://tools.voiddo.com/licenseme/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voidd0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-22T19:44:00.000Z","updated_at":"2026-04-29T06:14:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/voidd0/licenseme","commit_stats":null,"previous_names":["voidd0/licenseme"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/voidd0/licenseme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Flicenseme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Flicenseme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Flicenseme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Flicenseme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidd0","download_url":"https://codeload.github.com/voidd0/licenseme/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidd0%2Flicenseme/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34589204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-2-0","cli","devtools","gpl","javascript","license-generator","mit","nodejs","software-license"],"created_at":"2026-06-20T23:31:02.819Z","updated_at":"2026-06-20T23:31:03.562Z","avatar_url":"https://github.com/voidd0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# licenseme\n\n[![npm version](https://img.shields.io/npm/v/@v0idd0/licenseme.svg?color=A0573A)](https://www.npmjs.com/package/@v0idd0/licenseme)\n[![npm downloads](https://img.shields.io/npm/dw/@v0idd0/licenseme.svg?color=1F1A14)](https://www.npmjs.com/package/@v0idd0/licenseme)\n[![License: MIT](https://img.shields.io/badge/license-MIT-A0573A.svg)](LICENSE)\n[![Node ≥14](https://img.shields.io/badge/node-%E2%89%A514-1F1A14)](package.json)\n\n**LICENSE file generator + detector.** Pick one of 18 open-source licenses, fill in your name and year, write `./LICENSE` — done. Or point it at an existing `LICENSE` and let it tell you *which* license you're actually shipping under.\n\nFree forever gift from [vøiddo](https://voiddo.com).\n\n```\n$ licenseme mit -n \"Jane Doe\"\n  ✓ Wrote LICENSE (MIT) → /repo/LICENSE\n\n$ licenseme --detect ./LICENSE\n  License:     Apache License 2.0\n  SPDX:        Apache-2.0\n  Confidence:  98%  (fingerprint)\n```\n\n## Why licenseme\n\n`npm init` asks you to pick a license by name and dumps \"MIT\" into package.json without writing the actual `LICENSE` file. GitHub's \"Add a license\" button works but needs a browser. `choosealicense.com` is great at education but not at shelling.\n\nlicenseme is a single binary that:\n- writes the **full SPDX text** of 18 open-source licenses,\n- emits **source-file copyright headers** (JS / Python / HTML / plain) with SPDX tags,\n- **detects** what license an existing `LICENSE` file is, via SPDX tag or token-fingerprint,\n- **bumps the copyright year** in an existing `LICENSE` (`2023` → `2023-2026`),\n- prints **SPDX identifiers** for your `package.json` / `pyproject.toml` / `Cargo.toml`.\n\n## Install\n\n```bash\nnpm install -g @v0idd0/licenseme\n```\n\nOr one-shot with `npx`:\n\n```bash\nnpx -y @v0idd0/licenseme mit -n \"Jane Doe\"\n```\n\n## Quickstart\n\n```bash\n# Write ./LICENSE\nlicenseme mit -n \"Jane Doe\"\nlicenseme apache-2.0 -n \"Acme, Inc.\" -y 2026\n\n# Copyleft\nlicenseme gpl-3.0 -n \"Linus\" --stdout\nlicenseme agpl -n \"SaaS Ltd\" -o ./licenses/AGPL.txt\n\n# Print to stdout (no file write)\nlicenseme isc -n \"Jane\" --stdout\n\n# Source-file header with SPDX tag\nlicenseme mit -n \"Jane\" --header                             # jsblock (default)\nlicenseme mit -n \"Jane\" --header --style hash                # python / shell\nlicenseme mit -n \"Jane\" --header --style html                # html / markdown\n\n# Detect an existing LICENSE\nlicenseme --detect                                           # defaults to ./LICENSE\nlicenseme --detect ./vendor/some-lib/LICENSE\n\n# Update copyright year in place\nlicenseme --update                    # bumps to current year\nlicenseme --update -y 2027\n\n# List every bundled license\nlicenseme --list\nlicenseme --list --json | jq '.[] | select(.permissive == false)'\n\n# Get just the SPDX identifier\nlicenseme mit --spdx          # prints \"MIT\"\nlicenseme agpl --spdx         # prints \"AGPL-3.0-only\"\n```\n\n## Licenses bundled (18)\n\n### Permissive\n| Key | SPDX | Name |\n|-----|------|------|\n| `mit` | `MIT` | MIT License |\n| `apache` | `Apache-2.0` | Apache License 2.0 (full text, all 9 sections) |\n| `isc` | `ISC` | ISC License |\n| `bsd3` | `BSD-3-Clause` | BSD 3-Clause (\"New BSD\") |\n| `bsd2` | `BSD-2-Clause` | BSD 2-Clause (\"Simplified BSD\") |\n| `bsd0` | `0BSD` | BSD Zero Clause (no-attribution BSD) |\n| `unlicense` | `Unlicense` | The Unlicense (public domain) |\n| `wtfpl` | `WTFPL` | Do What The F*** You Want |\n| `zlib` | `Zlib` | zlib License |\n| `bsl` | `BSL-1.0` | Boost Software License 1.0 |\n| `cc0` | `CC0-1.0` | Creative Commons Zero (public domain) |\n| `ccby4` | `CC-BY-4.0` | Creative Commons Attribution 4.0 |\n\n### Copyleft / weak copyleft\n| Key | SPDX | Name |\n|-----|------|------|\n| `ccbysa4` | `CC-BY-SA-4.0` | Creative Commons Attribution-ShareAlike 4.0 |\n| `mpl2` | `MPL-2.0` | Mozilla Public License 2.0 |\n| `gpl2` | `GPL-2.0-only` | GNU General Public License v2 |\n| `gpl3` | `GPL-3.0-only` | GNU General Public License v3 |\n| `lgpl3` | `LGPL-3.0-only` | GNU Lesser General Public License v3 |\n| `agpl3` | `AGPL-3.0-only` | GNU Affero General Public License v3 |\n\n### Aliases\nTyped what you remember, not what the SPDX id is? It's fine:\n`apache-2.0 → apache`, `gpl-3.0 → gpl3`, `cc-by → ccby4`, `boost → bsl`, `public-domain → unlicense`, `0bsd → bsd0`, `mpl-2.0 → mpl2`.\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `-n, --name \u003cname\u003e` | Author / copyright holder |\n| `-y, --year \u003cyear\u003e` | Copyright year (default: current year) |\n| `-o, --output \u003cpath\u003e` | Write to this path (default: `./LICENSE`) |\n| `--stdout` | Print to stdout instead of writing a file |\n| `--header` | Emit a source-file copyright header with SPDX tag |\n| `--style \u003cstyle\u003e` | Header comment style: `jsblock`, `jsline`, `hash`, `html` |\n| `--file \u003cname\u003e` | Inline filename into the header (optional) |\n| `--detect [path]` | Identify an existing LICENSE (SPDX tag or fingerprint) |\n| `--update [path]` | Bump copyright year in place (`2023` → `2023-2026`) |\n| `--spdx` | Print the SPDX identifier and exit |\n| `--json` | Emit JSON (works with `--generate`, `--detect`, `--list`) |\n| `-l, --list` | List every bundled license |\n| `-h, --help` | Show help |\n| `--version` | Show version |\n\n## Features worth calling out\n\n### SPDX tags on generated files\n`licenseme mit -n \"Jane\" --header` gives you a block like:\n\n```js\n/*\n * src/index.js\n * Copyright (c) 2026 Jane\n * SPDX-License-Identifier: MIT\n *\n * Licensed under the MIT License. See LICENSE file for full text.\n */\n```\n\nThe `SPDX-License-Identifier:` line is the canonical way to mark source files per [spdx.dev](https://spdx.dev). Automated scanners (REUSE, ClearlyDefined, npm packages like `license-checker`) read it directly.\n\n### Detection — SPDX first, fingerprint fallback\n`--detect` runs two passes:\n1. Look for an explicit `SPDX-License-Identifier:` tag → 100% confidence.\n2. Tokenize the file, compare Jaccard similarity against every bundled template → confidence score.\n\nIf confidence drops below 35%, it bails out instead of guessing. The source (`spdx-tag` vs `fingerprint`) is surfaced in the output so you can trust or double-check.\n\n### Year bump\n`licenseme --update` walks the `Copyright (c) 2023 …` / `Copyright © 2023 …` line and turns it into `Copyright (c) 2023-2026 …`. Idempotent — if the year is already current, it's a no-op.\n\n### JSON output\nEverything has a `--json` mode:\n```bash\nlicenseme --list --json | jq '.[] | select(.spdx == \"AGPL-3.0-only\")'\nlicenseme --detect ./LICENSE --json\nlicenseme mit -n Jane --json\n```\nGreat for CI / scripts that need license metadata without parsing CLI output.\n\n## Programmatic use\n\n```js\nconst { generate, generateHeader, detect, updateYear, spdxId, list } =\n  require('@v0idd0/licenseme/src/generator');\n\n// Generate\nconst licenseText = generate('mit', { name: 'Jane', year: 2026 });\n\n// Source-file header\nconst header = generateHeader('mit', {\n  name: 'Jane',\n  style: 'jsblock',\n  file: 'src/index.js',\n});\n\n// Detect\nconst existing = require('fs').readFileSync('./LICENSE', 'utf8');\nconst detected = detect(existing);    // { key, spdx, name, confidence, source }\n\n// Bump year\nconst updated = updateYear(existing, 2026);\n\n// SPDX\nspdxId('agpl-3.0');    // \"AGPL-3.0-only\"\n\n// Catalog\nlist();                // [{ key, name, spdx, permissive }, ...]\n```\n\n## From the same studio\n\nvøiddo builds sharp, free-forever CLIs for devs who are tired of paywalls:\n\n- [`@v0idd0/jsonyo`](https://voiddo.com/tools/jsonyo/) — JSON that yells at you when it's broken\n- [`@v0idd0/tokcount`](https://voiddo.com/tools/tokcount/) — token counter for 60+ LLMs\n- [`@v0idd0/ctxstuff`](https://voiddo.com/tools/ctxstuff/) — stuff a repo into an LLM context window\n- [`@v0idd0/promptdiff`](https://voiddo.com/tools/promptdiff/) — diff two prompts\n- [`@v0idd0/httpwut`](https://voiddo.com/tools/httpwut/) — HTTP debugger with phase timing\n- [`@v0idd0/gitstats`](https://voiddo.com/tools/gitstats/) — local git analytics (hotspots, bus-factor, streaks)\n\nFull catalog: [voiddo.com/tools](https://voiddo.com/tools/).\n\n## License\n\nMIT © [vøiddo](https://voiddo.com) — free forever, no asterisks.\n\n## Links\n\n- Docs: https://voiddo.com/tools/licenseme/\n- Source: https://github.com/voidd0/licenseme\n- npm: https://npmjs.com/package/@v0idd0/licenseme\n- Studio: https://voiddo.com\n- Issues: https://github.com/voidd0/licenseme/issues\n- Support: support@voiddo.com\n\n---\n\nBuilt by [vøiddo](https://voiddo.com/) — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidd0%2Flicenseme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidd0%2Flicenseme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidd0%2Flicenseme/lists"}