Skip to content

Quickstart with Nx

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.

    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.

    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@latest 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

  4. What's next?

    Now that you've experienced the Nx basics, choose how you want to continue: