> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/nrwl/nx/llms.txt
> Use this file to discover all available pages before exploring further.

# nx run-many

> Run one or more targets across multiple listed projects in the workspace.

```bash theme={null}
nx run-many -t <targets> [options]
```

`nx run-many` executes one or more targets across a specified set of projects (or all projects when no project filter is provided). Unlike `nx affected`, it does not filter by git changes—it runs against every project you specify.

## Options

### Target selection

<ParamField query="--targets" type="string" required>
  One or more targets to run. Alias: `--target`, `-t`. Accepts comma or space-separated values.

  ```bash theme={null}
  nx run-many -t build
  nx run-many -t build test lint
  ```
</ParamField>

<ParamField query="--configuration" type="string">
  The named configuration to use when running the targets. Alias: `-c`.
</ParamField>

### Project selection

<ParamField query="--projects" type="string">
  Comma or space-separated list of project names or patterns to include. Alias: `-p`. When omitted, the command runs against all projects in the workspace.

  ```bash theme={null}
  nx run-many -t build --projects=myapp,mylib
  nx run-many -t test --projects="tag:scope:frontend"
  ```
</ParamField>

<ParamField query="--exclude" type="string">
  Comma-separated list of projects to exclude from the run.
</ParamField>

### Execution

<ParamField query="--parallel" type="string">
  Maximum number of parallel task processes. Defaults to `3`. Set to `false` to run serially. Can also be set via `NX_PARALLEL`.
</ParamField>

<ParamField query="--output-style" type="string">
  Controls how task output is displayed. Choices: `tui`, `dynamic`, `dynamic-legacy`, `static`, `stream`, `stream-without-prefixes`.
</ParamField>

<ParamField query="--nx-bail" type="boolean" default="false">
  Stop after the first failed task.
</ParamField>

<ParamField query="--nx-ignore-cycles" type="boolean" default="false">
  Ignore cycles in the task graph.
</ParamField>

<ParamField query="--skip-nx-cache" type="boolean" default="false">
  Rerun tasks even when results are available in the cache. Alias: `--disable-nx-cache`.
</ParamField>

<ParamField query="--skip-remote-cache" type="boolean" default="false">
  Disable the remote cache for this run. Alias: `--disable-remote-cache`.
</ParamField>

<ParamField query="--exclude-task-dependencies" type="boolean" default="false">
  Skip running dependent tasks first.
</ParamField>

<ParamField query="--skip-sync" type="boolean" default="false">
  Skip running sync generators associated with the tasks.
</ParamField>

<ParamField query="--batch" type="boolean">
  Run tasks in batches for executors that support batch execution.
</ParamField>

<ParamField query="--graph" type="string">
  Show the task graph instead of running it. Pass a file path to save to a file, or `stdout` to print to the terminal.
</ParamField>

<ParamField query="--runner" type="string">
  The tasks runner to use, as configured in `nx.json`.
</ParamField>

<ParamField query="--tui" type="boolean">
  Enable or disable the Nx Terminal UI. Conflicts with `--output-style`.
</ParamField>

<ParamField query="--tui-auto-exit" type="string">
  Whether to exit the TUI automatically after all tasks finish. Pass `true` to exit immediately, `false` to never auto-exit, or a number of seconds for a countdown.
</ParamField>

<ParamField query="--verbose" type="boolean">
  Print additional information about the command.
</ParamField>

## Examples

<CodeGroup>
  ```bash Build all projects in the workspace theme={null}
  nx run-many -t build
  ```

  ```bash Run multiple targets for all projects theme={null}
  nx run-many -t build test lint
  ```

  ```bash Build specific projects theme={null}
  nx run-many -t build --projects=myapp,mylib
  ```

  ```bash Build projects matching a tag theme={null}
  nx run-many -t build --projects="tag:type:app"
  ```

  ```bash Exclude certain projects theme={null}
  nx run-many -t test --exclude=e2e-app
  ```

  ```bash Build with production configuration theme={null}
  nx run-many -t build --configuration=production
  ```

  ```bash Run with increased parallelism theme={null}
  nx run-many -t build test --parallel=8
  ```

  ```bash Run serially (no parallelism) theme={null}
  nx run-many -t build --parallel=false
  ```

  ```bash Stream output in real time theme={null}
  nx run-many -t build --output-style=stream
  ```
</CodeGroup>

<Note>
  The `--all` flag is deprecated. Omitting `--projects` already runs against all projects in the workspace.
</Note>

## Running multiple targets

You can pass multiple targets at once. Nx resolves the full task graph and runs each target in the correct dependency order:

```bash theme={null}
nx run-many -t build test lint --parallel=4
```

This runs all three targets for every project, respecting both `dependsOn` configuration and cross-project dependencies.
