Skip to content

CLI Reference

These flags apply to every semrel command.

FlagDefaultDescription
--configauto-detectPath to config file (.semrel.yaml, .semrel.yml, .semrel.toml, .semrel.json)
--dry-runfalseSimulate without making any changes
--env-file.envPath to .env file to load before running
--no-colorfalseDisable coloured terminal output
-o, --outputtextOutput format: text or json
-v, --versionPrint version and exit

Run the full release pipeline.

Terminal window
semrel release [flags]
  1. Load and validate .semrel.yaml
  2. Run condition-phase plugins — abort if any fail
  3. Check that the current branch is configured for release
  4. Find the last git tag and collect commits since then
  5. Parse commits against Conventional Commits rules
  6. Calculate the next SemVer version (major / minor / patch)
  7. Generate changelog and release notes
  8. Run pre-tag plugins (e.g. version file updaters)
  9. Commit CHANGELOG.md (unless commit_changelog: false)
  10. Create and push the git tag
  11. Run release-phase plugins (packagers, publishers, providers, hooks)
FlagDescription
--dry-runPreview the release without making any changes
--editOpen generated release notes in $EDITOR before tagging
--interactivePause for confirmation before tagging (requires a TTY)
--force-bump-patch-versionForce a patch release even when no releasable commits are found
--github-outputWrite release metadata to $GITHUB_OUTPUT (GitHub Actions)
--gitlab-dotenv <file>Write release metadata as a dotenv artifact (GitLab CI)
--output-file <file>Write release metadata to a file (.json or .env)

Note: Plugin failures in --dry-run mode are treated as warnings and do not cause the command to fail. This lets you preview a release version without full credentials configured.

Terminal window
# Preview without making changes
semrel release --dry-run
# Edit release notes before tagging
semrel release --edit
# Force a patch bump
semrel release --force-bump-patch-version
# Export metadata for GitHub Actions
semrel release --github-output
# Use a non-default config file
semrel release --config .github/semrel.yaml

Generate a changelog from unreleased commits without creating a release tag.

Terminal window
semrel changelog [flags]
FlagDescription
--writePrepend the generated entry to CHANGELOG.md
--since <ref>Start from this tag or ref instead of auto-detecting the last tag
Terminal window
# Preview unreleased changes on stdout
semrel changelog
# Prepend to CHANGELOG.md
semrel changelog --write
# Start from a specific tag
semrel changelog --since v1.0.0
# Machine-readable output
semrel changelog --output json
CodeMeaning
0Unreleased releasable commits found
2Nothing to release (no releasable commits)

Validate all commit messages since the last release tag against Conventional Commits.

Terminal window
semrel lint [flags]
Terminal window
semrel lint
semrel lint --output json
CodeMeaning
0All commits are valid
1One or more commits are invalid

Validate commit messages against Conventional Commits.

Without arguments, lints all commits since the last release tag — the same scope as semrel lint but with per-commit detail.

Terminal window
semrel commitlint [message...] [flags]
FlagDescription
--from <ref>Start ref (exclusive) for a commit range
--to <ref>End ref (inclusive) for a commit range (default: HEAD)
--stdinRead a single commit message from stdin
Terminal window
# Lint commits since last release tag (default)
semrel commitlint
# Lint a single message
semrel commitlint "feat(auth): add OAuth2 support"
# Lint a commit range
semrel commitlint --from HEAD~5 --to HEAD
# Lint from stdin (useful as a git commit-msg hook)
echo "fix: typo" | semrel commitlint --stdin
# Machine-readable output
semrel commitlint --output json

Run pre-flight checks before a release.

Checks:

  • .semrel.yaml exists and is valid
  • Each configured plugin binary is discoverable
  • Required environment variables are set (where detectable)
  • The current branch is a configured release branch
  • A git repository is present with at least one tag

For GitLab, semrel doctor accepts SEMREL_PLUGIN_TOKEN, GITLAB_TOKEN, or CI_JOB_TOKEN as valid token sources.

Terminal window
semrel doctor [flags]
FlagDescription
--onlineAlso ping the semrel registry for plugin availability
Terminal window
semrel doctor
semrel doctor --online
semrel doctor --output json
CodeMeaning
0All checks passed (warnings do not affect exit code)
1One or more checks failed

Manage the semrel configuration file.

Terminal window
semrel config <subcommand> [flags]

Create a new .semrel.yaml interactively or with defaults.

Terminal window
semrel config init [flags]
FlagDescription
--no-interactiveSkip prompts and write a minimal default config
--forceOverwrite an existing config file
Terminal window
semrel config init
semrel config init --no-interactive
semrel config init --force

Print the resolved configuration.

Terminal window
semrel config show
semrel config show --output json

Validate the current configuration file.

Terminal window
semrel config validate

Update a single config key in .semrel.yaml.

Terminal window
semrel config set <key> <value>
Terminal window
semrel config set tagPrefix v
semrel config set version_ceiling 2.0.0
semrel config set commit_changelog false
semrel config set tag_exists_strategy skip

Upgrade .semrel.yaml from an older schema version to the current one.

Terminal window
semrel migrate [flags]
FlagDescription
--dry-runShow pending migrations without writing files
--no-backupSkip writing a timestamped backup before migrating
Terminal window
semrel migrate
semrel migrate --dry-run
semrel migrate --no-backup

Manage semrel plugins.

Terminal window
semrel plugin <subcommand>

List all available plugins in the registry.

Terminal window
semrel plugin list [--no-header]

Search plugins by name, description, or tag.

Terminal window
semrel plugin search <query>
Terminal window
semrel plugin search github
semrel plugin search changelog

Download and install a plugin binary into .semrel/plugins/.

Terminal window
semrel plugin install <name[@version]> [--plugin-dir <dir>]
Terminal window
# Install the latest version
semrel plugin install @semrel/github
# Install a specific version
semrel plugin install @semrel/github@1.2.0
# Install into a custom directory
semrel plugin install @semrel/github --plugin-dir ~/.semrel/plugins

Use the full @namespace/name reference when the registry entry belongs to a namespace. Bare names such as github only work for plugins that have no namespace in the registry.

When you install into the default project-local directory, semrel also creates or updates .semrel.lock at the repository root.

Check for newer plugin releases from the registry and optionally install them.

Without arguments, semrel reads .semrel.lock and checks or updates all pinned plugins.

Terminal window
semrel plugin update [name[@version]] [--check]
Terminal window
# Check updates for all plugins pinned in .semrel.lock
semrel plugin update --check
# Install all available updates and refresh .semrel.lock
semrel plugin update
# Update a single plugin
semrel plugin update @semrel/github

Install all plugins listed in .semrel.lock into .semrel/plugins/.

Terminal window
semrel plugin restore

The restore command skips binaries that are already present and verifies the checksum for the current platform before installing a missing plugin.

- name: Restore semrel plugins
run: semrel plugin restore

Check for a newer semrel release and install it in place.

Fetches the latest release from GitHub Releases and replaces the current executable.

Terminal window
semrel update [flags]
FlagDescription
--checkOnly check for a newer version; do not download
Terminal window
# Check and install the latest release
semrel update
# Check only — no download
semrel update --check

Orchestrate releases across all packages in a monorepo workspace with a single command. Configure the workspace in the root .semrel.yaml — see the Monorepo guide for full details.

Terminal window
semrel workspace <subcommand>

List all packages configured in the workspace.

Terminal window
semrel workspace list

Release all workspace packages in dependency order. Packages with no releasable commits since their last tag are skipped automatically.

Terminal window
semrel workspace release [flags]
FlagDescription
--dry-runPreview all package releases without making any changes
--parallelRelease independent packages concurrently (subprocess per package)
--fail-fastStop on the first package failure instead of collecting all errors
Terminal window
# Preview the entire workspace release
semrel workspace release --dry-run
# Release all packages sequentially
semrel workspace release
# Release independent packages in parallel
semrel workspace release --parallel
[packages/api] ✓ released
[packages/ui] – skipped (nothing to release)
[packages/worker] ✗ failed: …