{"id":9933,"library":"mergify-cli","title":"Mergify CLI","description":"Mergify CLI is a command-line interface tool designed to automate the creation and management of stacked pull requests on GitHub. It also handles CI results upload and integrates with various GitHub workflows. The library maintains a rapid release cadence, often daily or weekly, with frequent updates and new features, currently at version 2026.4.14.1.","status":"active","version":"2026.4.14.1","language":"en","source_language":"en","source_url":"https://github.com/Mergifyio/mergify-cli","tags":["cli","github","automation","pull-requests","stacking","developer-tools"],"install":[{"cmd":"pip install mergify-cli","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[],"quickstart":{"code":"# 1. Install mergify-cli\npip install mergify-cli\n\n# 2. Set up your GitHub token (replaces MERGIFY_TOKEN with your actual token)\n#    or run `mergify setup` for interactive configuration.\nexport MERGIFY_TOKEN=\"ghp_YOUR_GITHUB_TOKEN\"\n\n# 3. Initialize Mergify CLI in your Git repository\n#    This will guide you through connecting to GitHub.\nmergify setup\n\n# 4. Create and push a stacked pull request\n#    (Assuming you have local commits on a feature branch)\nmergify stack push\n\n# 5. Check the status of your current stack\nmergify stack status\n\n# 6. Checkout a specific stack by name\n# mergify stack checkout my-feature-stack","lang":"bash","description":"The Mergify CLI is primarily used as a command-line tool. The quickstart guides you through installation, initial setup (including GitHub token configuration), and common `stack` commands like `push` and `status`. Run `mergify setup` interactively for the easiest initial configuration."},"warnings":[{"fix":"Review your CI/CD pipelines and scripts that relied on this specific command. If you were using it for rebasing stacks in GitHub Actions, you might need to adapt your workflow to use other `mergify stack` commands or native Git operations.","message":"The `mergify stack github_action_auto_rebase` command has been removed.","severity":"breaking","affected_versions":">=2026.4.14.1"},{"fix":"Any automation or scripts that used `mergify reviews` will no longer function. Check release notes for alternative functionality or implement review management through other means.","message":"The `mergify reviews` command has been reverted and removed.","severity":"breaking","affected_versions":">=2026.3.11.1"},{"fix":"Update scripts or muscle memory to use `mergify stack checkout <stack-name>` instead of previous invocation patterns. For example, `mergify stack checkout feature-branch`.","message":"The `mergify stack checkout` command now takes a positional `NAME` argument.","severity":"breaking","affected_versions":">=2026.4.14.1"},{"fix":"This issue was fixed in version `2026.3.13.1`. Ensure you are on the latest version of `mergify-cli` to prevent this behavior. If on an older version, carefully review your stack names before pushing.","message":"Previous versions of `mergify stack push` could unintentionally delete similarly named branches.","severity":"gotcha","affected_versions":"<2026.3.13.1"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `pip install mergify-cli`. If it's already installed, ensure your PATH environment variable includes the directory where pip installs executables (e.g., `~/.local/bin` on Linux/macOS or `Scripts` folder in Python install on Windows).","cause":"The `mergify-cli` package is not installed, or its installation directory is not in your system's PATH.","error":"mergify: command not found"},{"fix":"Run `mergify setup` interactively to configure your GitHub token, or set the `MERGIFY_TOKEN` environment variable manually (e.g., `export MERGIFY_TOKEN='ghp_YOUR_TOKEN'`). Ensure the token has sufficient scopes (e.g., `repo`, `workflow`).","cause":"The Mergify CLI requires a GitHub Personal Access Token (PAT) for authentication, which was not found or is invalid.","error":"Error: GitHub token not found. Please run 'mergify setup'."},{"fix":"The `reviews` command was removed in version `2026.3.11.1`. Consult the latest documentation or release notes for available commands. Do not use this command in new scripts or try to remove it from existing ones.","cause":"You are attempting to use a command (`reviews`) that has been removed from the Mergify CLI.","error":"Error: Unknown command 'reviews'"},{"fix":"Verify the correct name of the stack. Use `mergify stack status` to list active stacks or `git branch` to see local branches. Ensure you are in the correct repository.","cause":"The stack name provided to `mergify stack checkout` does not exist in your current repository context, or you mistyped the name. This can also happen if the stack was recently deleted or merged.","error":"Error: failed to checkout stack 'my-feature': no stack named 'my-feature' found"}]}