Command reference

Usage: shipnotes COMMAND [options]  (shipnotes COMMAND --help for its options)

Commands:
  init      Write .shipnotes.yml and the entry folders
  new       Add an unreleased entry
  status    Show unreleased entries and the next version
  lint      Validate every entry and release file
  check     Check a branch against its base (for CI)
  release   Move unreleased entries into a release and bump versions
  render    Write the changelog file from the releases
  notes     Print one release as Markdown (for a GitHub release)
  current   Print the current version
  next      Print the version the unreleased entries lead to

shipnotes, shipnotes help, -h and --help print this list. shipnotes version, -v and --version print the installed version. Every command accepts --root DIR and -h/--help.

Project root

Without --root, a command looks for the project root in this order:

  1. The nearest folder that holds .shipnotes.yml, starting from the current folder and going up.
  2. The top folder of the current git repository.
  3. The current folder.

init uses the current folder, or --root DIR. A relative --root is relative to the current folder. Both --root DIR and --root=DIR work with every command.

Exit status

Status Meaning
0 The command succeeded. release with no unreleased entries also exits with 0.
1 The command failed. lint found a problem, check found an error, or a command stopped with shipnotes: MESSAGE. Configuration errors and git errors use this status.
2 A usage error: an unknown command, an unknown option, a missing argument or an extra argument. The command prints shipnotes: MESSAGE and Run `shipnotes help` for usage.
$ shipnotes check
shipnotes: missing argument: BASE_REF
Run `shipnotes help` for usage.

init

Usage: shipnotes init [--rails] [--version-file PATH]
        --root DIR                   Project root (default: the nearest folder with .shipnotes.yml)
        --rails                      Add an app surface for Rails views and routes
        --version-file PATH          A Ruby file with VERSION = "x.y.z" to bump on release
    -h, --help                       Show this help

Writes .shipnotes.yml, changelog/unreleased/.keep and changelog/releases/.keep. Stops with exit status 1 if .shipnotes.yml exists. See Getting started.

new

Usage: shipnotes new [--FIELD VALUE ...] [--slug SLUG]
        --root DIR                   Project root (default: the nearest folder with .shipnotes.yml)
        --title VALUE                One line that names the change
        --kind VALUE                 Set kind
        --body VALUE                 Details for the reader
        --bump VALUE                 Override the version bump
        --field NAME=VALUE           Set any field
        --slug SLUG                  File name for the entry (default: from the title)
    -h, --help                       Show this help

The field flags come from your schema. This help shows the default schema. Prints created PATH. See Writing entries.

status

Usage: shipnotes status

Prints the current version, each unreleased entry with its bump level, and the next version. With scheme: none, it prints the entries without levels or versions. When lint problems exist, it prints N problem(s); run `shipnotes lint` and still exits with 0.

lint

Usage: shipnotes lint

Validates every file under the changelog directory. Prints each problem on standard error and exits with 1. Prints ✓ changelog entries are valid and exits with 0 when there is no problem. See Validation.

check

Usage: shipnotes check BASE_REF [--skip-entry] [--skip-label NAME] [--oasdiff PATH]
        --root DIR                   Project root (default: the nearest folder with .shipnotes.yml)
        --skip-entry, --no-entry-required
                                     Do not require an entry (other checks still run)
        --skip-label NAME            Skip the entry rule when the PR has this label (reads labels with gh)
        --oasdiff PATH               oasdiff binary for OpenAPI contracts
    -h, --help                       Show this help

Compares HEAD with its merge base with BASE_REF. Prints notes on standard output and errors on standard error. Prints ✓ shipnotes check passed against BASE_REF and exits with 0, or exits with 1. See Pull request check.

release

Usage: shipnotes release [--version X.Y.Z] [--date YYYY-MM-DD] [--dry-run]
        --root DIR                   Project root (default: the nearest folder with .shipnotes.yml)
        --version VERSION            Use this version instead of the computed one (pre-releases too)
        --date DATE                  Release date (default: today)
        --dry-run                    Show what would change without writing
    -h, --help                       Show this help

Moves every unreleased entry into one release file, writes the version files and renders the changelog. See Releasing.

render

Usage: shipnotes render [--output PATH|-] [--unreleased]
        --root DIR                   Project root (default: the nearest folder with .shipnotes.yml)
        --output PATH                Write here instead of render.output; - prints it
        --unreleased                 Include an Unreleased section
    -h, --help                       Show this help

Writes the changelog to render.output and prints wrote PATH. --output - prints it to standard output. With render.output: null and no --output, it prints to standard output. See Render the changelog.

notes

Usage: shipnotes notes [RELEASE_ID|VERSION]

Prints one release as Markdown, for a GitHub release. The argument is a release id or a version, with or without a leading v. Without an argument, it prints the newest release. Stops with no release ID or no releases yet and exit status 1. See Release notes.

current

Usage: shipnotes current

Prints the current version. Stops with this project does not version releases when scheme is none. See The current version.

next

Usage: shipnotes next

Prints the version that the unreleased entries lead to. Without unreleased entries, it prints the current version. Stops with this project does not version releases when scheme is none.