User Guide


attribution has multiple commands broken into two categories: info commands that display project state to the user, and actions that modify project state or configuration.



Initialize configuration for a new project, with interactive prompts. Writes or updates the [tool.attribution] table in your project’s pyproject.toml with any chosen configuration options.

$ attribution init
Project name [project]:
Package namespace [project]:
Use file [Y/n]:
Use GPG signed tags [Y/n]:

Create a new, tagged release. This process automates the following steps:

  • Prompt the user for a changelog entry

  • Write the updated CHANGELOG

  • Write the updated version file

  • Create a “version bump” commit

  • Created an annotated (or signed) tag from that commit



Print a log of revisions since the last tagged version, from oldest to newest. This is the same revision log presented to the user when tagging a new release.

Experimental: Ignored authors are automatically filtered from the resulting output.

$ attribution log
commit 77315cfffd0b67037740463d0588e947d16d6e53
Author: Amethyst Reese <>
Date:   Sun Sep 11 00:06:11 2022 -0700

    Better theme from ufmt

commit e1c44e46720253070ade5eb6f35d2a160e7b6fc5 (upstream/main, main)
Author: Amethyst Reese <>
Date:   Sun Sep 11 00:21:46 2022 -0700

    Basic documentation for commands


Prints debug information about your project and configuration.

$ attribution debug
pyproject.toml: /home/user/project/pyproject.toml
    config={'ignored_authors': [], 'version_file': True, 'signed_tags': True, 'name': 'Project', 'package': 'project'},


All configuration for attribution is done via the pyproject.toml file. This ensures that all maintainers for your project are using a shared configuration when generating the changelog or tagging new releases.

Specifying options requires adding them to the tool.attribution namespace, following this example:

name = "Project"
package = "project"
ignored_authors = ["dependabot"]
signed_tags = true
version_file = true

These options can be added automatically by running attribution init from the root of your project.

Options available are described as follows:

name: str

Specifies the project name that will be used at the top of the changelog, and anywhere else the project name is displayed. Defaults to the name of the current working directory.

package: str

Specifies the package namespace for your project. This is used when creating or updating the package’s version file (if version_file is true), and should match the top-level namespace used when importing your package at runtime.

ignored_authors: str | list[str] = []

Experimental: List of author names (or patterns) that will be ignored and excluded when showing project revisions. For example, when tagging a new release, any configured authors will be excluded from the list of revisions displayed as part of the message template.

This can be helpful for excluding noisy or frequent commits from automated sources that aren’t likely to be relevant when writing release notes.

Note: this feature currently requires your git binary be compiled with USE_LIBPCRE support. You can test this availability by running git log --perl-regexp --author=dependabot.

signed_tags: bool = True

Specifies if attribution will use GPG signed tags for git when creating and tagging new versions.

version_file: bool = True

Specifies if attribution should create or update a file when initializing the project or tagging new versions. This enables the option of importing and setting the common __version__ string value from a generated file at runtime, rather than needing to update the version string in multiple places:

# generated by attribution
__version__ = "1.2.3"
from .__version__ import __version__


For projects using mechanisms like setuptools_scm, or that prefer to not have a managed file, this value should be set to false.