# Commands

How to run a one-off console command in an environment.


You can run one console command in an environment and see what it prints:

```bash
brewless command production "migrate:status"
```

Give the command as you would give it to your framework's console, on one line. For a Laravel application that is everything after `php artisan`.

The command runs in your own container, on the release that is live, and has 50 seconds. When it takes longer, Brewless stops waiting and says so; the command may still be running in its container. Work that takes longer belongs in a queued job.

Brewless sends the command to your application with the environment's ops secret and does not follow a redirect: when your application answers with one, the command is not started.

> [!WARNING]
> On production the client asks for confirmation first. `--force` skips the question.

The **Commands** tab of the environment in the console does the same.

## What Brewless keeps

The audit trail records who ran a command and the name of that command, such as `migrate:status`. Brewless keeps neither its arguments nor what it prints.
