DevFlow

DevFlow vs Nx

Nx owns the monorepo build graph, caching and generators. DevFlow writes the linting, testing, CI and Git configuration an Nx repository needs.

The short version

DevFlow does not replace Nx. Nx owns the build system; DevFlow owns the workflow files around it.

NxDevFlow CLI
Task graph and dependency detectionYesNo
Build cachingYesNo
Code generatorsYesNo
Project boundary enforcementYesNo
ESLint, Prettier configurationOnly if you add the Nx ESLint pluginYes
Git hooks, lint-staged, CommitlintNoYes
Vitest or Jest configurationOnly through the Nx executorYes
CI workflow fileNo — Nx runs inside your pipelineYes
Dockerfile and compose fileNoYes
Security scanning workflowsNoYes
Dockerfile, Docker ComposeNoYes

Where they overlap

Both tools write an nx.json-adjacent configuration and both can add lint and test scripts. The overlap is small and it is not a conflict.

The one place it matters is the lint and test scripts at the root of an Nx repository. Nx projects usually define them per project, and the root runs them through the Nx executor. DevFlow's Turborepo module would overwrite the root lint script with turbo lint — and the wizard blocks the Nx and Turborepo modules together for exactly this reason.

In an Nx repository, apply the workflow modules individually and leave the root scripts alone:

npx create-devflow --only eslint --only prettier --only vitest --only github-actions

The add-script action never replaces an existing script, so a root lint script that already runs nx run-many --target=lint is left untouched.

# 1. Nx owns the monorepo
npx create-nx-workspace@latest my-org --preset=ts

# 2. DevFlow owns the workflow files
cd my-org
npx create-devflow --only eslint --only prettier --only vitest --only github-actions --only gitleaks

What you end up with:

FileOwner
nx.jsonNx
project.json per projectNx
eslint.config.mjs at the rootDevFlow
vitest.config.ts per projectDevFlow, or Nx's Vitest executor
.github/workflows/ci.ymlDevFlow
.husky/pre-commit, commitlint.config.mjsDevFlow
Dockerfile per serviceDevFlow

Running the Nx executor from the DevFlow CI workflow

The generated workflow runs npm run lint and npm run test at the root. In an Nx repository those scripts usually delegate to Nx, so the workflow works without changes:

{
  "scripts": {
    "lint": "nx run-many --target=lint --all",
    "test": "nx run-many --target=test --all",
    "build": "nx run-many --target=build --all"
  }
}

To use Nx's caching in CI, add the Nx cloud token as a secret and the Nx setup step to the workflow. DevFlow does not generate that, because it is specific to your Nx Cloud account.

What DevFlow does not do for Nx

  • It does not generate project.json files or wire an ESLint executor into the Nx graph.
  • It does not generate the Nx Cloud setup.
  • It does not create the Nx generators.
  • It does not enforce module boundaries. Nx's @nx/enforce-module-boundaries rule is a separate step, and it is worth adding to the root eslint.config.mjs that DevFlow generates.

When to use only Nx

  • You need generators, the Nx graph or project boundary enforcement.
  • Your organisation already standardises on Nx and has an internal plugin package.
  • You have one repository and a small team.

DevFlow earns its place in the second repository onwards, and in the repositories that are not Nx projects at all.

On this page