Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Nx CLI

$ nx Official Low Risk
Nx · Code & DevOps · MIT · macos / linux / windows

Extensible build system and task runner for polyglot and TypeScript monorepos with computation caching and affected-graph analysis. Gives coding agents crisp nx show projects --json graph discovery and --dry-run code generation.

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install nx
CLI vs MCP Decision Hybrid (CLI + MCP)

Use nx CLI (nx show, nx run-many, nx affected) directly for task execution; pair with Nx Console MCP when agents need workspace-wide architecture guidance.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

nx show projects --json, nx show project --json, --no-interactive, and --dry-run give agents structured project discovery and safe execution.

  • Supports nx show projects --json and nx show project <name> --json
  • Supports --no-interactive and NX_INTERACTIVE=false
Trust & Safety 23 / 25

Local build/test runner with --dry-run on all generators and zero mandatory remote writes.

  • Generators support --dry-run before writing files
  • Local cache isolation under .nx/cache
Setup & Portability 14 / 15

Available via npm, npx, and Homebrew across macOS, Linux, and Windows with Rust-accelerated core.

  • Cross-platform package with native Rust hashing daemon
Utility & Efficiency 14 / 15

Affected-only test/lint/build selection dramatically reduces agent verification times in large monorepos.

  • nx affected skips unaffected workspace packages
Maintenance & Lineage 9 / 10

Maintained by Nx (Nrwl) under MIT license with frequent releases.

  • Active nrwl/nx repository
Docs & Verifiability 9 / 10

Thorough CLI documentation and self-describing schema validation.

  • Complete command reference at nx.dev

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Local execution requires no auth; optional Nx Cloud remote caching reads NX_CLOUD_ACCESS_TOKEN.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source CLI and local cache are free; optional Nx Cloud remote cache has free and paid tiers.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Nx CLI (nx) Agent Rules
- Always pass `--no-interactive` (or `NX_INTERACTIVE=false`) when invoking generators or runners.
- Query `nx show projects --json` and `nx show project <name> --json` instead of manually scanning `project.json` files.
- Run `nx g ... --dry-run` before writing generated boilerplate.

Agent-Ready Command Recipes

Safe Read-Only Queries

List affected projects as JSON
npx nx show projects --affected --json

Returns only the projects impacted by current Git changes in clean JSON.

Inspect a single project's targets and config
npx nx show project <project-name> --json

Outputs full resolved targets, inputs, and executor options for one project as JSON.

Controlled Writes & Previews

Preview a code generator with dry-run
npx nx g @nx/js:lib my-lib --dry-run --no-interactive

Simulates file creation and edits without touching the workspace.

Strengths for Agents

  • + nx show projects --affected --json lets agents verify only impacted packages in huge monorepos.
  • + Every Nx generator supports --dry-run and --no-interactive.
  • + Fast Rust-backed project graph and local computation caching.

Caveats & Pitfalls

  • ! Background Nx daemon can occasionally hold stale graph state unless NX_DAEMON=false is set in ephemeral sandboxes.
  • ! Task execution logs (nx run) remain streaming text rather than JSON.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI