Nx CLI
Nx CLI adopts npm, pnpm or yarn scripts, so teams introduce shared monorepo checks gradually while retaining their commands.
- 29,450 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The CLI changes project configuration and runs project build and test commands.
Install
Manual install
npx nx initRun in the existing project workspace. This is the README’s first adoption method.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The CLI changes project configuration and runs project build and test commands.
This is third-party code. Review the repository files before installing.
What it does
Nx CLI runs tasks for affected projects and retrieves cached results when task inputs have not changed. Tasks declare their inputs and outputs to retain. Plugins discover tasks for supported build tools and configure their caching. CI can separately add remote caching and distribute tasks across machines. Local execution remains available through the same CLI. An agent with terminal access can inspect project context and invoke builds or tests within the configured environment.
Who it is for. Monorepo technical leads coordinating package builds and team checks across local development and CI.
Good fit when
- One package change repeatedly triggers checks for the whole repository.
- Several projects share tooling and need coordinated tasks.
- Existing package.json scripts should be adopted incrementally.
- CI needs shared caching or distributed independent tasks.
Not a fit when
- A one-off command has no reusable output worth caching.
- Builds depend on hidden external inputs the team cannot describe.
- You need an application server or running-process supervision.
Example request
Inspect this monorepo’s scripts and propose Nx adoption for builds and tests. Show cache inputs before changing files.Limitations
Nx runs project tasks, whose build and test dependencies must be installed separately. Cache correctness depends on declared inputs and outputs; verify that configuration changes trigger fresh execution. Remote caching and distributed CI require separate provider integration and configuration. Language support comes through plugins, so confirm capabilities against the installed plugin and its version before planning a migration.
How to disable. Restore direct project scripts after reviewing dependencies, then remove Nx configuration. Disconnect remote CI integration separately.
FAQ
How do I start in an existing project?
Run `npx nx init` in the workspace. Nx connects existing scripts to task execution; after setup, start with one build or check.
Must I migrate everything at once?
No. Start with existing npm, pnpm or yarn scripts and add plugins after validating the first workflow.
Does Nx support multiple languages?
Yes. Plugins cover Gradle, Maven, .NET and Go. Add the plugin for your project’s tools, then compare the discovered tasks with your scripts.
What do plugins provide?
A plugin discovers tasks for a supported tool and identifies inputs and outputs for caching. Those settings describe when a task must run again.
Is cloud CI enabled automatically?
No. Remote caching and distributed execution are separate integrations. After configuring local tasks, choose the integration for your CI provider and set up its credentials.
Discussion
No questions or reviews yet.
Related
CLI toolsThe CLI takes an npm package through checks, versioning and publication for a user-reviewed release prepared with an agent.
GitHub Actions workflows run on your machine, and a failing step pauses so the agent can fix the file and retry it.
PM2 is a process manager that saves background app lists for restart after reboot and displays their status in the terminal.
A local gate in front of git push: the branch goes through review, tests, docs and lint in a separate worktree before it reaches the remote with a PR
Nehemiah gives agents Firecracker Linux microVMs over MCP: launch, run commands, preview URLs, fork and templates.
clawk is a virtual-environment CLI that snapshots a Linux machine’s memory and disk so running processes can be resumed later.
README in short
A separate [Self-healing CI guide](https://nx.dev/ci/features/self-healing) describes the agent workflow for diagnosing a failure, preparing a fix and verifying it.