xtreme-git-flow-cli
v1.0.2
Published
CLI for automating xtreme-git-flow model workflows
Maintainers
Readme
xtreme-git-flow CLI (xgf)
CLI for automating xtreme-git-flow workflows, with automatic actions for each stage of the sprint lifecycle.
Published package name:
xtreme-git-flow-cli
Installed command:xgf
This CLI is the operational companion for the xtreme-git-flow branching model: package-based releases, QA sign-off before official release entry, explicit promotion branches, merge-back, hotfix propagation, and recurring delta reading between develop and qa.
Use xtreme-git-flow when release composition, QA validation, and return flow across environments need to be traceable. If your team already integrates continuously on main, relies on strong CI, and does not need package-based QA governance, a lighter flow is usually a better fit.
Why Teams Use It
- Explicit promotion branches for development, QA, and official release entry.
- Local repository configuration persisted in
.git/xgf.config.json. - Short aliases for common commands such as
xgf fs,xgf fd,xgf fq, andxgf mb. - Built-in locale support for
pt-BRanden. - Operational commands for checkpointing, delta reading, merge-back, and branch recreation.
At a Glance
| Item | Value |
| ------------------- | ---------------------------------------------------------------------- |
| Package | xtreme-git-flow-cli |
| Command | xgf |
| Local configuration | .git/xgf.config.json |
| Supported locales | pt-BR, en |
| Best fit | Teams with explicit QA validation and package-based release governance |
Quick Navigation
Installation
From npm
npm install -g xtreme-git-flow-cli
xgf --helpFrom source
cd cli
npm install
npm link # makes the 'xgf' command available globallyQuick Start
# 1. Install the CLI
npm install -g xtreme-git-flow-cli
# 2. Configure the repository branches and preferred locale/output
xgf config
# 3. Start a sprint release branch
xgf sprint start -s 2026.05-sprint-10
# 4. Create and publish a feature
xgf feature start -i 1234 -d cadastro-cliente -s 2026.05-sprint-10
xgf feature push -m "feat: cadastro-cliente ready for review"
# 5. Promote, validate, and approve into the release package
xgf feature promote-dev -i 1234 -d cadastro-cliente
xgf feature promote-qa -i 1234 -d cadastro-cliente
xgf feature approve -i 1234 -d cadastro-cliente -s 2026.05-sprint-10If the configuration does not exist yet, commands that depend on the main branches will prompt for the names automatically. The configuration is stored locally in .git/xgf.config.json.
Workflow at a Glance
xtreme-git-flow separates decisions that teams often collapse into a single merge: implementation, promotion to development, promotion to QA, functional approval into the official release package, merge-back to long-lived branches, and hotfix propagation.
flowchart LR
MAIN["main"] --> REL["release/<sprint>"]
REL --> FEAT["feature/<id>-<desc>"]
FEAT --> DEV["release-dev/<id>-<desc>"]
FEAT --> QA["release-qa/<id>-<desc>"]
FEAT --> APP["approve into release/<sprint>"]
APP --> MB["merge-back/release/*"]
MAIN --> HF["hotfix/<id>-<desc>"]
DEV -. delta .- QAIn practice, the model gives each decision an explicit branch path and review point:
| xtreme-git-flow concept | Branch path | CLI command |
| ------------------------------------------- | ---------------------------------------- | --------------------------------------- |
| Sprint baseline and official package | release/<sprint> | xgf sprint start, xgf sprint close |
| Functional source of truth | feature/<id>-<desc> | xgf feature start, xgf feature push |
| Promotion to development | release-dev/<id>-<desc> | xgf feature promote-dev, xgf fd |
| Promotion to QA | release-qa/<id>-<desc> | xgf feature promote-qa, xgf fq |
| Official release entry after QA sign-off | merge of feature into release/<sprint> | xgf feature approve, xgf fa |
| Environment equalization after acceptance | merge-back/release/* | xgf merge-back, xgf mb |
| Production emergency fix | hotfix/<id>-<desc> | xgf hotfix, xgf hf |
| Divergence reading between long-lived lines | develop vs qa | xgf delta, xgf dt |
Official xtreme-git-flow References
The full model, policy rationale, and adoption guidance live in the official documentation site:
- Overview
- Compare xtreme-git-flow with other flows
- Complete flow and transitions
- Branch roles and responsibilities
- Operating guide and routines
- Delta reading between develop and qa
- FAQ
Available Commands
Configuration
| Command | Description |
| ----------------------------- | ------------------------------------------------------------------------------------ |
| xgf config | Prompts for and saves the main, development, QA branch names and the CLI output mode |
| xgf config --show | Displays the current configuration saved for the repository |
| xgf config --output compact | Sets the output mode to compact, reducing visual noise in the terminal |
| xgf config --locale en | Persists the CLI locale for the current repository |
The CLI supports two output modes persisted in .git/xgf.config.json:
full: shows titles, steps, and detailed messages.compact: reduces visual noise by hiding titles and steps for a leaner output style.
The CLI also supports localized help text and runtime output:
pt-BR: default locale for repository configuration and interactive prompts.en: English help text, prompts, and command output.
Locale selection precedence:
- Repository config in
.git/xgf.config.json, configured withxgf configorxgf config --locale <locale>. - Explicit environment override with
XGF_LOCALEorXTREME_FLOW_CLI_LOCALE.
Productivity
| Command | Description |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| xgf checkpoint / xgf ck | Runs git add -A and creates an automatic commit with a message based on the current branch and the number of changes |
| xgf feature push / xgf fp | If there are local changes, or only trailing local checkpoint(...) commits, opens a tree TUI to select files, folders, or everything, creates a single commit with the final message, rewrites earlier local checkpoint(...) commits when present, and pushes to origin; with -m, it skips the message prompt |
Quick Shortcuts
| Shortcut | Equivalent |
| ----------------------------- | --------------------------------------------------------------------------------- |
| xgf cfg [--show] | xgf config [--show] |
| xgf cfg --output compact | xgf config --output compact |
| xgf cfg --locale en | xgf config --locale en |
| xgf ck | xgf checkpoint |
| xgf ss <sprint> | xgf sprint start -s <sprint> |
| xgf sc <sprint> [tag] | xgf sprint close -s <sprint> [-t <tag>] |
| xgf fs <id>/<desc> <sprint> | xgf feature start -i <id> -d <desc> -s <sprint> |
| xgf fp [id/<desc>] | xgf feature push [-i <id> -d <desc> -m <message>] |
| xgf fd [id/<desc>] | xgf feature promote-dev [-i <id> -d <desc>] |
| xgf fq [id/<desc>] | xgf feature promote-qa [-i <id> -d <desc>] |
| xgf fa <id>/<desc> <sprint> | xgf feature approve -i <id> -d <desc> -s <sprint> |
| xgf mb <id>/<desc> <sprint> | xgf merge-back -i <id> -d <desc> -s <sprint> |
| xgf hf <id>/<desc> [sprint] | xgf hotfix -i <id> -d <desc> [-s <sprint>] |
| xgf dt | xgf delta |
| xgf rc <target> | xgf recreate --develop / --qa / --all (target: develop, dev, qa, all) |
Sprint
| Command | Description |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| xgf sprint start -s <sprint> | Prepares the start of the sprint: aligns the configured QA and development branches with the main branch, then creates release/<sprint> |
| xgf sprint close -s <sprint> [-t <tag>] | Closes the sprint: merges release into the main branch and creates a tag |
Feature
| Command | Description |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| xgf feature start -i <id> -d <desc> -s <sprint> | Creates feature/<id>-<desc> from the clean sprint release; requires a worktree with no pending changes |
| xgf feature push [-i <id> -d <desc> -m <message>] | If there are worktree changes, or only trailing local checkpoint(...) commits, opens a tree TUI to select files or folders, creates a single commit with the final message, rewrites any earlier still-local checkpoint(...) commits on the feature branch, and only then pushes to origin |
| xgf fs <id>/<desc> <sprint> | Simple shortcut to start a feature; also accepts the legacy format xgf fs <id> <desc> <sprint> |
| xgf fp [id/<desc>] | Simple shortcut to push the current feature; also accepts xgf fp <id> <desc>, interactive file selection, and -m for non-interactive usage |
| xgf fd [id/<desc>] | Simple shortcut to promote a feature to development; without arguments, uses the current feature |
| xgf fq [id/<desc>] | Simple shortcut to promote a feature to QA; without arguments, uses the current feature |
| xgf fa <id>/<desc> <sprint> | Simple shortcut to approve a feature into the release; also accepts xgf fa <id> <desc> <sprint> |
| xgf feature promote-dev [-i <id> -d <desc>] | Creates release-dev/<id>-<desc>; without -i/-d, uses the current feature |
| xgf feature promote-qa [-i <id> -d <desc>] | Creates release-qa/<id>-<desc>; without -i/-d, uses the current feature |
| xgf feature approve -i <id> -d <desc> -s <sprint> | Merges the feature into the release (functional approval) |
Merge Back
| Command | Description |
| ---------------------------------------------- | ------------------------------------------------------------------------ |
| xgf merge-back -i <id> -d <desc> -s <sprint> | Propagates the release to development and QA through merge-back branches |
Hotfix
| Command | Description |
| -------------------------------------------- | ------------------------------------------------------- |
| xgf hotfix -i <id> -d <desc> [-s <sprint>] | Creates a hotfix branch from the configured main branch |
Delta
| Command | Description |
| ----------- | --------------------------------------------------------------------------------------- |
| xgf delta | Calculates the divergence between the configured development and QA branches (3 layers) |
Branch Recreation
| Command | Description |
| ------------------------ | ---------------------------------------------------------------- |
| xgf recreate --develop | Recreates the configured development branch from the main branch |
| xgf recreate --qa | Recreates the configured QA branch from the main branch |
| xgf recreate --all | Recreates both |
| xgf rc dev | Shortcut for xgf recreate --develop |
| xgf rc qa | Shortcut for xgf recreate --qa |
| xgf rc all | Shortcut for xgf recreate --all |
Complete Usage Example
# Install globally from npm
npm install -g xtreme-git-flow-cli
# Optional: switch the CLI language for this repository
xgf config --locale en
# Optional: override the configured locale for a single shell session
$env:XGF_LOCALE = "en"
# 1. Team Lead starts the sprint
xgf sprint start -s 2026.05-sprint-10
xgf ss 2026.05-sprint-10
# 2. Developer creates a feature
xgf feature start -i 1234 -d cadastro-cliente -s 2026.05-sprint-10
xgf fs 1234/cadastro-cliente 2026.05-sprint-10
xgf feature push -m "feat: cadastro-cliente ready for review"
xgf fp -m "feat: cadastro-cliente ready for review"
# 3. Developer promotes to development
xgf feature promote-dev -i 1234 -d cadastro-cliente
xgf feature promote-dev
xgf fd
# 4. Developer promotes to QA
xgf feature promote-qa -i 1234 -d cadastro-cliente
xgf feature promote-qa
xgf fq
# 5. After QA approval, approve the feature into the release
xgf feature approve -i 1234 -d cadastro-cliente -s 2026.05-sprint-10
xgf fa 1234/cadastro-cliente 2026.05-sprint-10
# 6. Merge back to keep environments aligned
xgf merge-back -i 1234 -d cadastro-cliente -s 2026.05-sprint-10
xgf mb 1234/cadastro-cliente 2026.05-sprint-10
# 7. At the end, close the sprint
xgf sprint close -s 2026.05-sprint-10 -t v1.0.0
xgf sc 2026.05-sprint-10 v1.0.0
# Delta (at any time)
xgf delta
xgf dt
# Quick checkpoint during development
xgf checkpoint
xgf ck
# Final feature publication rewriting local checkpoints
xgf feature push -m "feat: cadastro-cliente ready for review"
xgf fp -m "feat: cadastro-cliente ready for review"
# Emergency hotfix
xgf hotfix -i 5678 -d correcao-login -s 2026.05-sprint-10
xgf hf 5678/correcao-login 2026.05-sprint-10
# Branch recreation
xgf recreate --develop
xgf rc developReference
The branching model is documented in the official xtreme-git-flow site: xtreme-git-flow.vercel.app.
If your repository also keeps an internal policy file, the local reference remains politica-de-branch.md.
