heraut

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

héraut

Every release deserves a héraut.


Every team that tags releases ends up with a script. It bumps a version, writes a changelog entry, creates the tag, pushes a release to GitHub. It works — until someone adds a second environment, or the changelog format needs a tweak, or a new teammate has to figure out what it does. That script is now yours to maintain.

Héraut replaces it. One command — heraut release — resolves the next version, generates the changelog and release notes, tags, and publishes to GitHub and/or GitLab. It drives git and the GitHub and GitLab APIs and handles what a hand-rolled script usually gets wrong: version resolution for prefixed-tag strategies, multi-forge publishing, and config that's validated before it runs, not discovered broken in CI. Config-driven, not script-driven — change behavior by editing .heraut.yml, not by reading bash.

The name's a French pun — héraut (herald) sounds like héros (hero), which is the idea.

Install

brew install --cask adaouat/tap/heraut       # Homebrew, with shell completions and a man page
mise use packslip:github.com/adaouat/heraut  # mise, checks the release signature first (mise 2026.9.2+)

heraut needs git on your PATH, nothing else. A prebuilt binary, Docker, go install, checking a download and upgrading: see Install.

A first look

heraut init                # answer a few questions, get a .heraut.yml
heraut check config        # check the config, offline
heraut release --dry-run   # see what would happen, change nothing
heraut release             # version, changelog, commit, tag, publish

Step by step, with what each command prints: Your first release.

A small .heraut.yml for a project released on GitHub:

# yaml-language-server: $schema=https://raw.githubusercontent.com/adaouat/heraut/main/schema.json
version: "1"

versioning:
  strategy: semver
  tag_prefix: "v"

changelog:
  output: CHANGELOG.md

release:
  notes: {}

heraut finds the GitHub or GitLab project from your CI or your git remote. The schema line gives autocomplete and validation in editors that support the YAML language server.

What it handles

  • Versions from your commit messages (Conventional Commits): SemVer or CalVer, and one version line per environment (dev, staging, prod) when you need it.
  • Changelog and release notes, built in, with links to commits and pull requests, and templates you can override.
  • Publishing to GitHub and GitLab, one or both, with files attached. Azure DevOps works for pull request data in the changelog; it has no releases to publish to.
  • Your own steps before and after the tag or the release, from a single config file, checked before anything runs.

Documentation

Read the docs.

Working on heraut itself? See CONTRIBUTING.md.

License

MIT

Documentation

Overview

Package heraut holds build-time assets embedded into the heraut binary.

Index

Constants

This section is empty.

Variables

View Source
var Changelog string

Changelog is the project changelog, embedded so `whatsnew` can fall back to it offline.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
heraut command
Command heraut is the CLI entry point: it builds the command tree (internal/cmd) and runs it through forge/cli, which owns flag parsing, the error panel and the exit code.
Command heraut is the CLI entry point: it builds the command tree (internal/cmd) and runs it through forge/cli, which owns flag parsing, the error panel and the exit code.
e2e
Package e2e holds the built-binary tests (ADR-0066): Lane A runs the binary against local repositories in every go test run; Lane B (build tag e2e_forge) runs it against the GitHub and GitLab sandboxes, on demand only.
Package e2e holds the built-binary tests (ADR-0066): Lane A runs the binary against local repositories in every go test run; Lane B (build tag e2e_forge) runs it against the GitHub and GitLab sandboxes, on demand only.
harness
Package harness builds and drives the real heraut binary for the e2e suite (ADR-0066).
Package harness builds and drives the real heraut binary for the e2e suite (ADR-0066).
internal
app
Package app is the wiring layer: it reads the config and builds the resolvers, generators, platforms and pipelines the commands run.
Package app is the wiring layer: it reads the config and builds the resolvers, generators, platforms and pipelines the commands run.
cmd
Package cmd defines heraut's cobra commands: each parses its flags, loads the config, calls internal/app and renders the result (text or --json).
Package cmd defines heraut's cobra commands: each parses its flags, loads the config, calls internal/app and renders the result (text or --json).
commitwizard
Package commitwizard implements `heraut commit create` — an interactive wizard that builds a Conventional Commits message and runs git commit.
Package commitwizard implements `heraut commit create` — an interactive wizard that builds a Conventional Commits message and runs git commit.
config
Package config loads, validates and describes .heraut.yml: the structs, the strict loader, the semantic validator, and the effective values (environment overrides, defaults) the rest of heraut reads.
Package config loads, validates and describes .heraut.yml: the structs, the strict loader, the semantic validator, and the effective values (environment overrides, defaults) the rest of heraut reads.
conventionalcommit
Package conventionalcommit parses and inspects commit messages against the Conventional Commits 1.0.0 grammar.
Package conventionalcommit parses and inspects commit messages against the Conventional Commits 1.0.0 grammar.
exitcode
Package exitcode maps errors to the process exit codes documented in Spec 01 — Exit codes.
Package exitcode maps errors to the process exit codes documented in Spec 01 — Exit codes.
forge
Package forge resolves a heraut config into one or more port.ForgeIdentity values, filling gaps from the ambient CI environment or the git origin remote when the config leaves fields unset.
Package forge resolves a heraut config into one or more port.ForgeIdentity values, filling gaps from the ambient CI environment or the git origin remote when the config leaves fields unset.
forge/azure
Package azure implements port.Forge for Azure DevOps over stdlib net/http.
Package azure implements port.Forge for Azure DevOps over stdlib net/http.
forge/github
Package github implements port.Forge for GitHub over stdlib net/http, so changelog enrichment needs no `gh` CLI on PATH.
Package github implements port.Forge for GitHub over stdlib net/http, so changelog enrichment needs no `gh` CLI on PATH.
forge/gitlab
Package gitlab implements port.Forge for GitLab over stdlib net/http.
Package gitlab implements port.Forge for GitLab over stdlib net/http.
generators/native
Package native is heraut's built-in, zero-external-dependency content generator (ADR-0032).
Package native is heraut's built-in, zero-external-dependency content generator (ADR-0032).
pipeline
Package pipeline runs the release and changelog flows step by step: resolve, changelog, commit, tag, push, notes and publish, with hooks and dry runs.
Package pipeline runs the release and changelog flows step by step: resolve, changelog, commit, tag, push, notes and publish, with hooks and dry runs.
platforms
Package platforms holds what the publish drivers share: release asset globs and opening asset files safely inside the repository.
Package platforms holds what the publish drivers share: release asset globs and opening asset files safely inside the repository.
platforms/github
Package github publishes releases and their assets to GitHub and GitHub Enterprise Server through the REST API (go-github, ADR-0077).
Package github publishes releases and their assets to GitHub and GitHub Enterprise Server through the REST API (go-github, ADR-0077).
port
Package port defines the interfaces heraut's layers talk through (Runner, Generator, Platform, Forge) and the small types they share.
Package port defines the interfaces heraut's layers talk through (Runner, Generator, Platform, Forge) and the small types they share.
scaffold
Package scaffold is heraut init: the interactive wizard, its defaults, and writing .heraut.yml, keeping the keys the wizard does not ask about on an update.
Package scaffold is heraut init: the interactive wizard, its defaults, and writing .heraut.yml, keeping the keys the wizard does not ask about on an update.
skill
Package skill embeds the agent skill (SKILL.md) that teaches an AI coding agent how to drive the heraut binary.
Package skill embeds the agent skill (SKILL.md) that teaches an AI coding agent how to drive the heraut binary.
testutil
Package testutil holds heraut's test doubles and fixtures: MockGenerator, MockPlatform, RealGitRepo, and helpers that keep the CI and git environment out of tests.
Package testutil holds heraut's test doubles and fixtures: MockGenerator, MockPlatform, RealGitRepo, and helpers that keep the CI and git environment out of tests.
ui
Package ui is heraut's terminal styling on top of forge/ui: the gold accent, the huh theme, the version banner and the step spinner.
Package ui is heraut's terminal styling on top of forge/ui: the gold accent, the huh theme, the version banner and the step spinner.
versioning
Package versioning holds what every strategy shares: the Result of a resolution, the Resolver interface, bump levels, and the "nothing to release" sentinel.
Package versioning holds what every strategy shares: the Result of a resolution, the Resolver interface, bump levels, and the "nothing to release" sentinel.
versioning/branch
Package branch matches the current branch against versioning.branches and enforces the branch guards: the per-environment branch and the unlisted-branch refusal (ADR-0065).
Package branch matches the current branch against versioning.branches and enforces the branch guards: the per-environment branch and the unlisted-branch refusal (ADR-0065).
versioning/calver
Package calver resolves calendar versions: it parses a format (YYYY, MM, DD, WW, QQ, SS, SPRINT, PATCH) and computes the next version from today's date and the tags.
Package calver resolves calendar versions: it parses a format (YYYY, MM, DD, WW, QQ, SS, SPRINT, PATCH) and computes the next version from today's date and the tags.
versioning/perenv
Package perenv wraps a version calculator for the per-environment strategies: auto environments bump within their own tags, promote environments copy a source version, guarded by E001 to E003.
Package perenv wraps a version calculator for the per-environment strategies: auto environments bump within their own tags, promote environments copy a source version, guarded by E001 to E003.
versioning/semver
Package semver resolves SemVer versions from conventional commits: the bump level, SemVer 2.0.0 ordering, pre-releases, maintenance lines and the stay_at_v0 and confirm_major gates.
Package semver resolves SemVer versions from conventional commits: the bump level, SemVer 2.0.0 ordering, pre-releases, maintenance lines and the stay_at_v0 and confirm_major gates.
versioning/tagfmt
Package tagfmt renders and parses tag formats ({version}, {env}, {build}) and derives the globs and patterns that list an environment's tags.
Package tagfmt renders and parses tag formats ({version}, {env}, {build}) and derives the globs and patterns that list an environment's tags.
tools
docgen command
Command docgen writes the generated user reference under docs/reference.
Command docgen writes the generated user reference under docs/reference.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL