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

Presets

PresetBest For
ScrumTeams using Agile/Scrum with user stories and acceptance criteria
KanbanFlow-based workflows with simpler issue types
SimplePersonal projects or small teams (no ticket numbers required)
CustomFull control over all configuration options

Visual Walkthrough

See devflow in action with these demos of the core workflow:

Creating a Branch

devflow branch demo

Making a Commit

devflow commit demo

Creating a PR

devflow pr demo

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

Interactive Navigation

All multi-step interactive commands support back navigation:

  • Press Escape at any prompt to return to the previous step

This lets you review and change earlier choices without restarting the entire command.

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.