Scriv

Scriv changelog management tool

PyPI Build status Coverage Documentation
Supported Python versions License
Sponsor me on GitHub nedbat on Mastodon

Overview

Scriv is a command-line tool for maintaining changelogs. It manages a directory of changelog fragments committed with the code changes, then aggregates them into a CHANGELOG file when the code is being released.

Getting Started

In your project, create a directory called changelog.d. This is where scriv will create changelog fragments.

Many aspects of scriv’s operation are configurable: you can choose a different directory name if you like: put a setting in pyproject.toml:

[tool.scriv]
fragment_directory = "changes"

Create a fragment using the “scriv create” command. It will create a new file in the fragment directory and open your editor to edit the contents. The file name will include the date and time, your user name, and your branch name to keep it separate from other changelog fragments.

The template for new fragments includes categories of changes. Put your description in the proper category. By default, “scriv create” will add the new fragment to git so that you can commit it along with the other changes on your branch.

When it is time to release your project, use the “scriv collect” command to aggregate all the fragments into a new entry in your changelog file. By default the file is called CHANGELOG.rst but you can specify a different name with the changelog setting:

[tool.scriv]
fragment_directory = "changes"
changelog = "CHANGELOG.md"

You can also choose to publish your changelog entries as GitHub releases with the “scriv github-release” command. It parses the changelog file and creates or updates GitHub releases to match. It can be used even with changelog files that were not created by scriv.

Details