Skip to content

Getting Started

Prerequisites

  • Node.js >= 20.12
  • Git
  • GitHub CLI (gh) — required for PR and release commands

Installation

bash
npm install -D @alejandrochaves/devflow-cli

Init Wizard

Run the interactive setup wizard to configure your project:

bash
npx devflow init

The wizard walks you through:

  1. Ticket base URL — for linking tickets in PRs
  2. Scopes — add project-specific scopes (or use defaults)
  3. PR checklist — customize or use defaults
  4. package.json scripts — auto-adds commit, branch, pr scripts
  5. Commitlint — creates config with the devflow parser preset
  6. Husky — installs and creates commit-msg hook + optional pre-push hook
  7. CI workflow — optionally generates .github/workflows/ci.yml

Quick Start

Add scripts to your package.json:

json
{
  "scripts": {
    "branch": "devflow branch",
    "commit": "devflow commit",
    "pr": "devflow pr"
  }
}

Then use the core workflow:

bash
# Create a branch
npx devflow branch

# Stage files and commit
npx devflow commit

# Create or update a PR
npx devflow pr

Global Options

Commands that modify git state support --dry-run to preview without executing:

bash
devflow commit --dry-run
devflow branch --dry-run
devflow pr --dry-run

Command Aliases

Most commands have short aliases for quick access:

CommandAlias
devflow branchdevflow b
devflow commitdevflow c
devflow prdevflow p
devflow amenddevflow a
devflow undodevflow u
devflow fixupdevflow f
devflow mergedevflow m
devflow releasedevflow rel
devflow reviewdevflow rv
devflow commentsdevflow cm
devflow stashdevflow st
devflow worktreedevflow wt
devflow logdevflow l
devflow statusdevflow s
devflow test-plandevflow tp
devflow lint-configdevflow lint

Released under the MIT License.