ng_run
Execute custom Angular CLI architect targets like app:build:production to automate build, test, and deployment workflows directly from your development environment.
Instructions
Run 'ng run' to execute a custom architect target
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | The target to run (e.g., app:build:production) | |
| appRoot | Yes | The absolute path to the first folder in the 'path' property. For example, if 'path' is 'webui/src/app/modules/alerts', then 'appRoot' should be the absolute path to 'webui'. | |
| options | No | Additional options for ng run |
Implementation Reference
- src/toolHandler.ts:51-60 (handler)The switch case in handleToolCall that sets up the command for 'ng_run': runs 'npx ng run <target>' with options from the cwd set to appRoot.case "ng_run": { command = "npx"; commandArgs = ["ng", "run", args.target]; if (args.options) { for (const [key, value] of Object.entries(args.options)) { commandArgs.push(`--${key}`, String(value)); } } break; }
- src/tools.ts:122-145 (schema)The tool definition object for 'ng_run' including name, description, and input schema validation.{ name: "ng_run", description: "Run 'ng run' to execute a custom architect target", inputSchema: { type: "object", properties: { target: { type: "string", description: "The target to run (e.g., app:build:production)", }, appRoot: { type: "string", description: "The absolute path to the first folder in the 'path' property. For example, if 'path' is 'webui/src/app/modules/alerts', then 'appRoot' should be the absolute path to 'webui'.", }, options: { type: "object", description: "Additional options for ng run", additionalProperties: { type: "string" }, }, }, required: ["target", "appRoot"], }, },