- Published
- Author
- Ashwani Kumar JhaSenior System Analyst
Nx can set up AI coding agents for our monorepo in one command
Nx has a built-in command that configures AI agents (Claude Code, Cursor, Copilot, Codex, Gemini) to understand our workspace:
npx nx configure-ai-agents
What it sets up
• Nx MCP server: gives the agent our real project graph (which apps and libs exist and what depends on what) plus up-to-date Nx docs
• AGENTS.md / CLAUDE.md: Nx guidelines so agents use correct, current Nx commands instead of guessing
• Agent skills: teach the agent to run tasks properly (nx run, nx run-many, nx affected) and to scaffold with Nx generators instead of creating files by hand
Few more useful commands
npx nx configure-ai-agents --check=all
# Set up specific agents without the interactive prompt
npx nx configure-ai-agents --agents=claude,cursor,copilot
#nx
Nx has a built-in command that configures AI agents (Claude Code, Cursor, Copilot, Codex, Gemini) to understand our workspace:
npx nx configure-ai-agents
What it sets up
• Nx MCP server: gives the agent our real project graph (which apps and libs exist and what depends on what) plus up-to-date Nx docs
• AGENTS.md / CLAUDE.md: Nx guidelines so agents use correct, current Nx commands instead of guessing
• Agent skills: teach the agent to run tasks properly (nx run, nx run-many, nx affected) and to scaffold with Nx generators instead of creating files by hand
Few more useful commands
npx nx configure-ai-agents --check=all
# Set up specific agents without the interactive prompt
npx nx configure-ai-agents --agents=claude,cursor,copilot
``
**It’s not tied to one tool**
• AGENTS.md is the shared instruction file most agents read (Cursor, Copilot, Codex, Gemini, and Claude Code since v2.1.277)
• Tool-specific files (CLAUDE.md, .claude/, .cursor/`, etc.) only affect their own tool and sit side by side without conflict#nx