nx-monorepo-commands
Guide for using NX commands in the Hey Jarvis monorepo. Use this when working with any project in the repository that requires building, testing, linting, or serving.
When & Why to Use This Skill
This Claude skill provides a comprehensive guide and command set for managing the Hey Jarvis monorepo using NX. It streamlines development workflows by offering standardized commands for building, testing, linting, and serving various projects within the repository, ensuring consistency and preventing common errors like using incorrect package managers.
Use Cases
- Automating build and test cycles: Use the standardized NX command patterns to trigger builds or run test suites for specific projects like the MCP server or ElevenLabs integration.
- Maintaining code quality: Execute linting tasks across the entire monorepo or for affected projects to ensure adherence to coding standards before deployment.
- Local development setup: Quickly serve individual projects such as the Home Assistant addon or voice firmware using the optimized development server commands.
- Safe command execution: Implement recommended timeouts and avoid forbidden patterns (like direct npm scripts) to prevent environment corruption and ensure stable CI/CD processes.
| name | nx-monorepo-commands |
|---|---|
| description | Guide for using NX commands in the Hey Jarvis monorepo. Use this when working with any project in the repository that requires building, testing, linting, or serving. |
NX Monorepo Commands
CRITICAL: ALWAYS use NX commands for this monorepo. Never run commands directly or use npm.
Required Command Pattern
For any project operation, use the NX command format:
bunx nx <target> <project>
Common Commands
Development:
bunx nx serve <project> # Start development server
Build:
bunx nx build <project> # Build for production
Testing:
bunx nx test <project> # Run tests
Linting:
bunx nx lint <project> # Run linter
Affected Commands:
bunx nx affected --target=lint
bunx nx affected --target=test
bunx nx affected --target=build
Projects in Monorepo
mcp- Mastra AI-powered Model Context Protocol serverelevenlabs- ElevenLabs voice interface integrationhome-assistant-addon- Home Assistant addonhome-assistant-voice-firmware- ESPHome firmware
What NOT to Do
❌ NEVER use these patterns:
npm run <script>- Wrong package manager- Running commands directly without NX
- Using
nodeor other direct execution
Timeouts
Always use appropriate timeouts for commands:
- Quick operations (linting): 30-60 seconds
- Builds and tests: 120-300 seconds
- Docker builds: 600-900 seconds
timeout 30 bunx nx lint mcp
timeout 180 bunx nx build mcp
timeout 180 bunx nx test mcp