run_command
Run pre-approved shell commands for installing dependencies, testing, linting, type-checking, and builds within your project or a specified subdirectory.
Instructions
Run an allowlisted shell command in the project root directory (or a subdirectory via cwd, useful for monorepos like frontend/ + backend/). Useful for installing dependencies, running tests, linting, type-checking, and builds. Only commands explicitly listed in ALLOWED_COMMANDS may be executed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Directory to run the command in, relative to the project root (e.g. 'frontend' or 'backend'). Must resolve inside the project root. Defaults to the project root. Prefer this over `npm run x --prefix <dir>`, which does not reliably resolve local binaries (e.g. next, vite) on Windows. | |
| command | Yes | The command to run. Must exactly match or start with one of the allowed commands. | |
| timeout_ms | No | Maximum execution time in milliseconds before the process is killed (default: 30000) |