Nx Quickstart

Get up and running with Nx in just a few minutes by following these simple steps.

1

Install the Nx CLI

Installing Nx globally is optional - you can use npx to run Nx commands without installing it globally, especially if you're working with Node.js projects.

However, if you prefer a global installation, here are some options:

npm add --global nx

Note: You can also use Yarn, pnpm, or Bun

2

Start fresh or add to existing project

For JavaScript-based projects you can start with a new workspace using the following command:

npx create-nx-workspace@latest

Add to an existing project: (recommended also for non-JS projects)

npx nx init

Get the complete experience: For a fully integrated development workflow with AI-powered CI features, start directly from Nx Cloud.

Learn more: Start New ProjectAdd to ExistingComplete Nx Experience

3

Run Your First Commands

Nx provides powerful task execution with built-in caching. Here are some essential commands:

Run a task for a single project:

nx build my-app

nx test my-lib

Run tasks for multiple projects:

nx run-many -t build test lint

Learn more: Run TasksCache Task Results