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 executes a single named target defined in a project’s configuration. Nx checks the local cache before executing the task; if a matching cache entry exists the cached output is replayed instead of re-running the command.
Infix notation
You can omit therun subcommand by placing the target first:
- Full form
- Infix (shorthand)
Arguments
The name of the project to run the target for.
The name of the target to run (e.g.,
build, serve, test, lint).The named configuration to activate for the target (e.g.,
production, development). Equivalent to --configuration.Options
The configuration to use when running the target. Alias:
-c.Rerun the task even when a matching result is available in the cache. Alias:
--disable-nx-cache.Disable the remote cache for this run. Alias:
--disable-remote-cache.Controls how task output is displayed. Choices:
tui, dynamic, dynamic-legacy, static, stream, stream-without-prefixes.Show the task graph instead of running it. Pass a file path to save the graph to a file, or
stdout to print to the terminal.Stop command execution after the first failed task.
Ignore cycles in the task graph.
Skip running dependent tasks before the specified target.
Skip running sync generators associated with the task.
Run tasks in batches for executors that support batch execution.
The name of the tasks runner configured in
nx.json.Enable or disable the Nx Terminal UI. Conflicts with
--output-style.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 to show a countdown before exiting.Prints additional information about the command (e.g., stack traces).
Examples
Passing options to the executor
Any flags not recognized by Nx are forwarded directly to the underlying executor. For example:-- are also forwarded verbatim:
