I made licensectl, a CLI tool to manage software licenses
“Automation is not about saving time, it’s about preserving flow.”
Every single time I start a new project—whether it’s a quick weekend experiment, a small utility script, or a full-blown crate—I run into the exact same minor annoyance: adding the license file.
It’s never hard, but it’s always friction. The process usually goes like this:
- Realize I need a
LICENSEfile in the repository root. - Open another project on my machine or search online for a template.
- Copy-paste the raw text.
- Manually edit the standard placeholders like
[year]and[fullname].
It’s a tiny 30-second task, but doing it dozens of times turns a zero-friction moment into an annoying speedbump right when you just want to write code and ship.
I wanted a single, lightweight command line utility to manage, fetch, and inject open-source license templates right from the terminal—without bloat, without web trackers, and without manually tracking down template files.
So I built licensectl.
What It Does
licensectl is a terminal utility written in Rust designed to streamline fetching, storing, and applying open-source license templates directly inside your projects.
Here is how simple the workflow is:
1. Store your favorite licenses locally
You can fetch any standard license plain-text from a URL and save it to your local registry once:
licensectl add MIT <mit-license-url>
licensectl add Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0.txt
Licenses are stored safely in plain text according to the XDG spec ($XDG_CONFIG_HOME/licensectl/licenses on Linux or standard platform config paths on macOS/Windows).
2. Check registered templates
licensectl list
MIT (needs: year, copyright holder)
Apache-2.0
licensectl automatically scans templates for standard {{var}} placeholders and tells you what inputs it will require.
3. Initialize a LICENSE file with smart defaults
Inside your project root, just run:
licensectl init MIT
Instead of making you type everything out, it interactively prompts you with smart, sensible defaults:
{{year}}defaults automatically to the current calendar year.{{copyright holder}},{{author}},{{owner}}, etc., automatically pull your name directly fromgit config user.name.
Value for "year" [2026]:
Value for "copyright holder" [Subhranil Maity]:
Just hit Enter, and a clean, fully rendered LICENSE file is written to ./LICENSE.
It also replaces [placeholder] or <placeholder> with the {{placeholder}} syntax, so you can copy-paste templates from the web without worrying about formatting.
Design Choices & Under the Hood
When writing CLI utilities for developer environments, small details matter:
- Zero-bloat dependencies & Rustls: Network requests for fetching license templates use
rustlsinstead of standardnative-tlsor OpenSSL wrappers. This keeps builds fast, binaries lean, and cross-compilation hassle-free. - Safety First:
licensectlwon’t blindly overwrite an existingLICENSEfile in your directory unless you explicitly pass the-f/--forceflag. - Custom Output Paths: If you need to target a specific folder or non-standard file name, pass
-o:
licensectl init MIT -o ./docs/LICENSE
Installation
If you have Cargo set up:
cargo install licensectl
Check out the repository on GitHub or view the crate on crates.io .