RRT CLI
RRT CLI
The installed command is rrt.
Install
pip install repo-release-tools
Or run it without installing:
uvx repo-release-tools branch new feat "add parser"
Core commands
rrt init
rrt branch new feat "add parser"
rrt branch rescue fix "recover release work"
rrt git commit "add parser"
rrt git sync
rrt bump patch
rrt bump minor --dry-run
rrt bump 1.2.3 --no-changelog
Git workflows
rrt git is intentionally not a full alias layer over raw Git. It focuses on
repeatable workflows that match repo-release-tools policy:
rrt git statusshows a compact branch summary and typed worktree entriesrrt git logshows recent history in a compactrrt-styled viewrrt git doctorchecks branch policy, upstream state, dirty tree, latest commit subject, and changelog risk in one reportrrt git commit "message"builds a conventional commit and infers the type from the current branch when possiblerrt git commit-all "message"stages all files first, then creates the conventional commitrrt git syncfetches, auto-stashes when needed, then pulls with rebase by default, showing a compact branch/worktree summary in the preview panelrrt git move <branch>switches branches without dropping local changesrrt git squash-local "message"squashes local commits since upstream into one conventional commitrrt git undo-saferewinds a commit while keeping work staged or unstagedrrt git check-dirty-treeexits non-zero when the working tree is dirty, for use in hooks and CI, with typed entries for dirty pathsrrt git rebootstrapdestroys history and creates a fresh initial history, guarded by an explicit confirmation flag
See Git magic for the design rationale and the full workflow catalog.
Zero-config mode
For basic versioning, rrt can work without [tool.rrt].
bumpandci-versionauto-detect root-levelpyproject.toml,package.json, andCargo.toml- If multiple version files are found, they are updated together
- Auto-detected files must already agree on the current version before
bump - Go does not have a standard in-file project version, so Go repos still need explicit config for file updates
Add [tool.rrt] later only when you want fine-tuning such as grouped releases,
custom release branches, changelog paths, lock commands, generated files, or
pattern-based targets. Run rrt init when you want rrt to write a
recommended .rrt.toml for the current repo shape.
Init
rrt init
rrt init --dry-run
rrt init --force
rrt init writes a recommended .rrt.toml in the repo root. It keeps branch
creation config-free, preserves zero-config bumping, and gives you an explicit
file when you want to tune release branches, changelog paths, generated files,
or custom version targets.
Configuration files
rrt discovers configuration in this order:
pyproject.tomlpackage.jsonCargo.toml.rrt.toml.config/rrt.toml
All use the same [tool.rrt] table.
Use .rrt.toml or .config/rrt.toml for local repo config if you do not want
to keep release-tool settings in pyproject.toml.
pyproject.toml,.rrt.toml,.config/rrt.toml:[tool.rrt]package.json: top-level"rrt": { ... }Cargo.toml:[package.metadata.rrt]or[workspace.metadata.rrt]
Go does not have a standard extensible manifest section like package.json or
Cargo.toml, so Go repos should use .rrt.toml or .config/rrt.toml.
Minimal config
[tool.rrt]
release_branch = "release/v{version}"
changelog_file = "CHANGELOG.md"
[[tool.rrt.version_targets]]
path = "pyproject.toml"
kind = "pep621"
Equivalent native examples:
{
"name": "example",
"version": "1.2.3",
"rrt": {
"version_targets": [
{
"path": "package.json",
"kind": "package_json"
}
]
}
}
[package]
name = "example"
version = "1.2.3"
[package.metadata.rrt]
[[package.metadata.rrt.version_targets]]
path = "Cargo.toml"
section = "package"
field = "version"
Version target modes
kind = "pep621"for[project].versionkind = "package_json"for the top-levelversioninpackage.jsonpatternfor regex-driven replacementssection+fieldfor TOML field updates
Generated files
Use generated_files for lockfiles or other generated artifacts that should be
staged with a bump:
[tool.rrt]
lock_command = ["pnpm", "install", "--lockfile-only"]
generated_files = ["pnpm-lock.yaml"]
Default lock refresh is auto-detected when possible:
package.json:pnpm install,yarn install, ornpm install- Poetry:
poetry lock - Rust:
cargo update --workspacewhenCargo.lockis present - Go-targeted repos:
go mod tidy, staginggo.modandgo.sum
Hybrid repositories
For repos with multiple release surfaces, use version_groups and select the
group explicitly with --group when needed.
[tool.rrt]
default_group = "python"
[[tool.rrt.version_groups]]
name = "python"
release_branch = "release/python/v{version}"
generated_files = ["uv.lock"]
version_source = "pyproject.toml"
[[tool.rrt.version_groups.version_targets]]
path = "pyproject.toml"
kind = "pep621"
[[tool.rrt.version_groups]]
name = "web"
release_branch = "release/web/v{version}"
generated_files = ["pnpm-lock.yaml"]
version_source = "package.json"
[[tool.rrt.version_groups.version_targets]]
path = "package.json"
kind = "package_json"
ci_format = "pep440"
Examples:
rrt bump patch --group web
rrt ci-version compute --group python
rrt ci-version apply 1.4.0.dev1201 --group web