Decree: Python 3.11+ reimplementation of adr-tools with a typed API and Typer CLI.
Project description
decree
Python 3.11+ reimplementation of adr-tools with a typed API and a Typer CLI.
install
pipx install decree
# or after release: brew install steven-cutting/decree/decree
quickstart
decree init
decree new Use beartype on public API
decree list
decree generate toc > doc/adr/README.md
decree generate graph # exits non-zero, not implemented
cli
decree init [DIR]decree new [--status STATUS] [--template PATH] [--dir DIR] [--date YYYY-MM-DD] TITLE...decree link SRC REL TGT [--reverse / --no-reverse]decree listdecree generate tocdecree generate graph(not implemented)decree upgrade-repository
exit codes
Decree follows sysexits where
available and falls back to portable numbers on platforms such as Windows. The
fallback values are listed below; on POSIX you will see the native os.EX_*
numbers (for example, usage errors exit with 64).
| Fallback | ExitCode member | Meaning |
|---|---|---|
| 0 | ExitCode.SUCCESS |
Successful run. |
| 1 | ExitCode.GENERAL_ERROR |
Unexpected runtime failure or abort. |
| 2 | ExitCode.USAGE_ERROR |
CLI usage error (missing/bad arguments). |
| 66 | ExitCode.INPUT_MISSING |
Required input was missing or unreadable. |
| 69 | ExitCode.UNAVAILABLE |
Service or dependency unavailable. |
| 78 | ExitCode.CONFIG_ERROR |
Configuration or environment problem. |
Examples:
decree new "Valid ADR" # -> 0
decree new --template missing.md foo # -> 66 (missing template)
ADR_DATE=bad-date decree new Foo # -> 78 (invalid config)
Contributors should raise click.UsageError for argument problems and
click.ClickException with ExitCode for domain failures. See the
Click exception guide
for details.
configuration
ADR_DATE: if set, used verbatim as the ADR date after validationADR_TEMPLATE: path to a custom template file
Template precedence is explicit CLI flag first, then the environment variable, then the built-in default:
ADR_TEMPLATE=/path/to/template.md decree new "Use beartype"
decree new --template /other/path.md "Use beartype" # CLI overrides env var
dependabot
Dependabot checks uv dependencies and GitHub Actions every Monday at 09:00 America/Los_Angeles.
Edit .github/dependabot.yml to change the schedule window,
and adjust the groups block if you want different buckets for runtime versus dev tooling updates.
Date handling and reproducibility
New ADRs always render Date: YYYY-MM-DD in their front matter. By default, the
current local date is used. Supply --date YYYY-MM-DD or set the ADR_DATE
environment variable to override the value (the CLI flag takes precedence). Any
override must already be in ISO format; otherwise, the command exits with an
error.
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 decree-0.1.0.tar.gz.
File metadata
- Download URL: decree-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7bfc312b0fe1256e5339430932839c4af3d4c05bd9af6fef27df50b877ba06
|
|
| MD5 |
8cef3e6c6f0cc9eb38d195b90f876f0a
|
|
| BLAKE2b-256 |
2c927c63f91d7589eb0ebb588a61e5522826531602df0230476f8231264c05ac
|
Provenance
The following attestation bundles were made for decree-0.1.0.tar.gz:
Publisher:
python-publish.yml on steven-cutting/decree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decree-0.1.0.tar.gz -
Subject digest:
ed7bfc312b0fe1256e5339430932839c4af3d4c05bd9af6fef27df50b877ba06 - Sigstore transparency entry: 598514384
- Sigstore integration time:
-
Permalink:
steven-cutting/decree@cfac007d2257d7348cb9f22b3fd27ae2a2382571 -
Branch / Tag:
refs/pull/23/merge - Owner: https://github.com/steven-cutting
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cfac007d2257d7348cb9f22b3fd27ae2a2382571 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file decree-0.1.0-py3-none-any.whl.
File metadata
- Download URL: decree-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba7949b3ba6389189f1b5fbd634beec76fb8ae645e5b3aafd96ec426f11b025e
|
|
| MD5 |
a2dadff59ea32689d77ffa76030fab6d
|
|
| BLAKE2b-256 |
b800fb50bbddc09a7e6b564b62639990aaf1dec808f65a86ed9626e9f3b398a7
|
Provenance
The following attestation bundles were made for decree-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on steven-cutting/decree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
decree-0.1.0-py3-none-any.whl -
Subject digest:
ba7949b3ba6389189f1b5fbd634beec76fb8ae645e5b3aafd96ec426f11b025e - Sigstore transparency entry: 598514385
- Sigstore integration time:
-
Permalink:
steven-cutting/decree@cfac007d2257d7348cb9f22b3fd27ae2a2382571 -
Branch / Tag:
refs/pull/23/merge - Owner: https://github.com/steven-cutting
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cfac007d2257d7348cb9f22b3fd27ae2a2382571 -
Trigger Event:
pull_request
-
Statement type: