Skip to content

CLI commands ​

The commands of the relizy CLI, their global options, their output and their exit codes.

Commands ​

CommandDescription
initCreate the config of the project: detect the packages, ask the rest, set up commitlint
releaseRun the whole release: bump, changelog, publish, commit, tag, push, provider release and more
bumpCompute and write the new versions
changelogWrite the CHANGELOG.md files
publishPublish the packages to the registry
provider-releaseCreate the GitHub or GitLab releases
socialPost the release on X (Twitter) and Slack
syncMerge the released branch into other branches (main into develop), or open pull requests
pr-commentPost the release on its pull request or merge request
merge-previewIn a pull request, preview what its merge releases, and fail when its release would fail
commitlintLint commit messages with the relizy config
mcpStart the MCP server for the AI coding agents, and set them up (relizy mcp init)

relizy --help lists them, relizy <command> --help lists the options of a command, relizy --version prints the version.

Global Options ​

These options go before or after the command name.

FlagDescriptionConfig
--config <name>Load <name>.config.<ext> instead of relizy.config.<ext> (e.g. relizy.standalone), or the config file at this path (absolute, or relative to the project, with its extension). Fails when the file does not existMultiple configs
--profile <name>Apply the profile <name> of the config: its options come over the config file and under the flags. Fails with the list of the profiles when it does not exist. Used by release, bump, changelog, publish, provider-release, social, sync, pr-comment and merge-previewprofiles
--log-level <level>silent, error, warning, normal, default, debug, trace or verbose, instead of the logLevel of the config (default by default). verbose, debug and trace show the details of each steplogLevel
--dry-runPreview the run: no file written but the report, no commit, tag, push, publication nor post. Shows what would be generated (changelogs, release notes, posts, PR comment). The AI is not called, its rewrites are simulated-
--no-previewWith --dry-run, do not show what would be generated (still shown with --log-level verbose)-
--ai-previewWith --dry-run, call the AI to preview its rewrites of the release notes and the posts. Each call costs, as in a real releaseAI
--group <names>Only process these version groups, comma-separated names. Used by release, bump, changelog, publish, provider-release and socialmonorepo.groups
--pr-number <number>Number of the pull request or merge request to comment, instead of the detected one. Used by release, pr-comment and merge-previewPR comment
--no-safety-checkSkip the checks run before writing anything (tokens, registry access, branch up to date, push access). The branch is still checked right before publishing, the release tags before the commit, and the push access by the push. Used by release, publish, provider-release, social and syncsafetyCheck

With --group, only the targeted groups are bumped, published and tagged, in a single release commit. Without it, every group is processed:

bash
relizy release --group header
relizy bump --group main,header --dry-run

--yes is not a global option: only release, bump and init have it.

Output ​

Each command shows one line per step, with its duration, and ends with what it did (relizy release with a summary of the release). The details of the steps are only shown with --log-level verbose, and always written to node_modules/.cache/relizy/release.log (not with RELIZY_REPORTER=classic, which prints them).

  • In a terminal: an interactive output, with a spinner telling what the running step does (the AI rewrites included).
  • In CI, or when the output is not a terminal: lines only, the logs of each step in a collapsible group of GitHub Actions or GitLab CI, the warnings and errors as annotations on GitHub. Colored, unless NO_COLOR is set.

RELIZY_REPORTER forces the output: pretty (terminal), ci, classic (the plain logs of the logger) or json (one JSON event per line on stdout, for a program following the run: see Progress events). The programmatic API uses classic unless RELIZY_REPORTER is set.

bash
RELIZY_REPORTER=ci relizy release --dry-run --yes

Exit Codes ​

CodeWhen
0Success, or nothing to release (release and bump without a commit triggering a bump)
0A prompt refused or cancelled (bump confirmation, uncommitted changes, rewritten tag): nothing was written, the error:* hooks do not run
1An error, an unknown option or an invalid value, commit messages with errors (commitlint), a failed provider release (provider-release), a failed post (social) or a branch not synced (sync)

release and bump ask to confirm the new versions. Without an interactive terminal (CI), they fail right away with code 1 unless --yes is given:

bash
relizy release --yes

To run something only when a release happens, read its report rather than the exit code, see CI/CD.

Examples ​

bash
# Preview the next release, then run it
relizy release --dry-run
relizy release

# Force the bump type, without the confirmation (CI)
relizy release --minor --yes

# Canary version of a pull request, commented on it
relizy release --canary --yes --pr-number 42

# Another config file: relizy.standalone.config.ts
relizy release --config relizy.standalone

# Every detail of the run
relizy release --dry-run --log-level verbose

relizy release runs the steps in order (see Steps). To run them one by one:

bash
relizy bump --yes
relizy changelog
relizy publish
# Commit, tag and push yourself, then
relizy provider-release
relizy social
relizy sync
relizy pr-comment

See Also ​