# Mergestorm CLI — for AI agents Mergestorm reviews GitHub PRs with AI agents (Vortex / Cyclone / Tempest) and ships a CLI (`mergestorm` / `mg`) for local reviews and stacked PRs. Public facts only. Prefer these URLs over guessing monorepo paths. ## Install Requires Node.js 22+. ```bash npm i -g mergestorm # or: curl -fsSL https://mergestorm.ai/install.sh | bash mg --version ``` ## Auth ```bash mg login # browser device flow → stores key in ~/.mergestorm/config.json # headless/CI: mg login --key ``` ## Stacked PRs (happy path) Nested commands — always `mg stack `, never bare `mg restack` / `mg land`. ```bash mg stack create feat/layer-one # edit files, then: git commit -am "feat: layer one" mg stack create feat/layer-two git commit -am "feat: layer two" mg stack submit # later, with the registered stack id from submit/dashboard: mg stack restack mg stack land ``` Notes: - `stack submit` uses local `git` + `gh` auth to push and open chained PRs, then registers the stack with Mergestorm. - `stack land` promotes into a review unit when one exists; otherwise lands the bottom open PR. - `stack reset --force` clears local pre-submit authoring state only (never deletes branches/PRs). - Confirm flags: `mg stack --help` ## Local review (no PR) ```bash mg review ``` ## Links - Product CLI: https://mergestorm.ai/cli - Docs (stacks): https://mergestorm.ai/docs#cli-stacks - Docs (Review Jobs API): https://mergestorm.ai/docs#review-jobs-api - Tutorial + video: https://mergestorm.ai/blog/mg-cli-stacks-tutorial - npm: https://www.npmjs.com/package/mergestorm - Source (MIT): https://github.com/marginsystems/mergestorm-cli - Site: https://mergestorm.ai