Automate REUSE license annotation from git history.
Project description
reuseify
Automate REUSE license annotation from git history.
reuseify inspects which files are missing license headers (via reuse lint),
looks up their git commit authors, and applies reuse annotate, all from a single CLI.
Installation
uv pip install .
Usage
The workflow is two steps: collect authors → annotate files.
Step 1: collect authors
reuseify get-authors [OPTIONS]
Runs reuse lint, finds every file missing a license header, looks up its git
commit authors, and writes a JSON file:
{
"src/foo.py": ["Alice", "Bob"],
"src/bar.c": ["Alice"],
"src/new.py": [] #NOT_IN_GIT
}
| Option | Short | Default | Description |
|---|---|---|---|
--output |
-o |
reuse_annotate_authors.json |
Output JSON file |
--include-not-in-git |
-i |
off | Include files with no git history (empty author list) |
--exclude PATTERN |
-e |
Extra glob pattern to exclude (matched per path component, repeatable) |
Files matching built-in patterns are always excluded:
__pycache__, .venv, venv, .env, env, .git, .vscode, .idea,
*.egg-info, *.pyc, dist, build, node_modules, .tox,
.mypy_cache, .pytest_cache, .ruff_cache.
Files ignored by .gitignore are also excluded
automatically.
Examples
# defaults
reuseify get-authors
# custom output path + include untracked files
reuseify get-authors --output authors.json --include-not-in-git
# add an extra exclusion pattern
reuseify get-authors --exclude reports --exclude "*.tmp"
Step 2: annotate files
reuseify annotate [OPTIONS] [REUSE ANNOTATE FLAGS...]
Reads the JSON file from Step 1 and calls reuse annotate for every file.
--contributor flags are injected automatically from the JSON data.
All unrecognised flags are forwarded verbatim to reuse annotate, giving you
full control over --copyright, --license, --year, --style,
--fallback-dot-license, --force-dot-license, --skip-unrecognised, etc.
| Option | Short | Default | Description |
|---|---|---|---|
--input |
-i |
reuse_annotate_authors.json |
JSON file from get-authors |
--default-contributor NAME |
-d |
— | Fallback contributor for NOT_IN_GIT files (repeatable) |
Output is grouped: all successes first, then skips, then failures, then finally a summary.
Examples
# basic
reuseify annotate \
--copyright "2025 X-Men" \
--license Apache-2.0 \
--fallback-dot-license
# custom input + fallback contributor for untracked files
reuseify annotate \
--input authors.json \
--default-contributor "Charles Xavier" \
--copyright "2025 X-Men" \
--license Apache-2.0
# multiple default contributors
reuseify annotate \
--default-contributor "Professor X" \
--default-contributor "Cyclops" \
--copyright "2025 X-Men" \
--license MIT
Disclaimer
[!CAUTION] Use at your own risk.
reuse annotatemodifies files in place.
reuse annotate --help
This project is not affiliated with the REUSE project or its maintainers in any way.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reuseify-0.1.0.tar.gz.
File metadata
- Download URL: reuseify-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589d69efda29b2b16d75c5fd4bbc8f4bd8d6d74858d48a01a5029d7c9c277da3
|
|
| MD5 |
52b9142248e42dd69af1c909b5785160
|
|
| BLAKE2b-256 |
c9832a65cec6f3bfbf42c3f6afaef126ad3e142aa8f7f5ae57da772362c69ab0
|
File details
Details for the file reuseify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reuseify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28015b38b3bfad20efae8a0b1accdd0347c162b3857a178e308dc2a75e6e09b2
|
|
| MD5 |
551d44ea10a6023787c8ed32ef7f4b48
|
|
| BLAKE2b-256 |
7c044735734169784b12ae0c225414f6ed7d683f16942e6276d0932ee6624d6a
|