Global build commands let you define a build pipeline command once at the account level and reuse it across any project in your account. Instead of recreating the same "install dependencies" or "build assets" command in every project, you manage it in one place and link it wherever you need it.

You can create and manage global build commands from **Settings > Global Build Commands**. Each command defines what to run and whether the deployment should stop if the command fails. Which projects use the command, and where it sits in each project's build pipeline, is decided separately for every project that links it.

## Adding a command to a project

Open a project's **Build Pipeline** page and choose **Add Global Build Command**. Linked commands appear alongside the project's own build commands, marked with a **Global** label. Within that project you choose where the command runs in the pipeline by dragging it into position, while the command itself stays managed at the account level.

Linked commands and the project's own build commands share one list that you can drag to reorder, so you decide exactly when each one runs during the build.

## Enabling and disabling a command for a project

Each project can turn a linked global build command on or off using the toggle next to it, without unlinking it. A disabled command stays linked to the project but is skipped during the build pipeline. This is useful when you want to keep a command associated with a project but pause it temporarily.

## Editing a command

Because a global build command is shared, editing it from **Settings > Global Build Commands** updates it everywhere it is linked. To stop a command from running on a project, either disable it for that project or unlink it from the project's Build Pipeline page — unlinking leaves the global command and its other links untouched.

## Build files defined in your repository

If a project defines its build pipeline in a build file committed to the repository, that file takes precedence and linked global build commands are not run for that project. Global build commands apply to projects whose build pipeline is managed in DeployHQ.

**Tip**: You can also manage global build commands using the DeployHQ API. You can explore and test these endpoints interactively using our [OpenAPI documentation](https://api.deployhq.com/docs).
