2 pointsby anth0nycodes19 hours ago1 comment
  • anth0nycodes19 hours ago
    Every time I start a new open-source project, I end up creating a license manually on GitHub's UI, then manually updating the year and my name. I got tired of doing this repeatedly, so I built a small CLI to automate it.

    License Generator is a Node.js CLI that creates a LICENSE file for your project in seconds. It pulls official license templates (MIT, Apache 2.0, GPL, etc.) from GitHub’s Licenses API, automatically fills in your name from git config, and writes the formatted LICENSE file to your current directory.

    It has an interactive mode that walks you through choosing a license:

    npx @anth0nycodes/license-generator

    There’s also a quick mode. You set a default license once, then generate it instantly for new projects:

    generate-license --set-license mit generate-license -q

    I built this because I noticed I was wasting the same few minutes at the start of every project doing identical setup work. This removes that friction, especially when scaffolding or prototyping multiple repos.

    Implementation-wise, it’s a thin wrapper around GitHub’s Licenses API with a simple terminal UI (clack/prompts + inquirer). The codebase is roughly ~200 lines of TypeScript.

    Features:

    Interactive selection from 13 common OSS licenses

    Auto-detects author name from git config

    Quick mode for one-command generation

    Overwrite protection for existing LICENSE files

    Clean terminal output

    GitHub: https://github.com/anth0nycodes/license-generator

    npm: https://www.npmjs.com/package/@anth0nycodes/license-generato...