# hub app <name> exec

Source: https://docs.myhub.host/cli/app/exec

## Usage

```sh
hub app <name> exec [options] <cmd...>
```

## Arguments

| Argument   | Description                                                                           |
| ---------- | ------------------------------------------------------------------------------------- |
| `<name>`   | The app, or `app/instance` for an instance other than prod, such as `my-app/staging`. |
| `<cmd...>` | Command to run, after --.                                                             |

## Options

| Option             | Description                                       |
| ------------------ | ------------------------------------------------- |
| `--service <name>` | Service to run it in, default the public service. |

## Examples

```sh
# Run ls in the app
hub app my-app exec -- ls -la

# Run psql in the db service
hub app my-app exec --service db -- psql -U app
```