# hub app <name> instance

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

## Usage

```sh
hub app <name> instance [options] [command]
```

## Arguments

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

## `hub app <name> instance list`

List every instance of the app.

### Usage

```sh
hub app <name> instance list [options]
```

### Options

| Option   | Description                                        |
| -------- | -------------------------------------------------- |
| `--json` | Return a structured result for scripts and agents. |

## `hub app <name> instance remove`

Delete one instance; ask separately before deleting its data.

### Usage

```sh
hub app <name> instance remove [options] <instance>
```

### Arguments

| Argument     | Description                    |
| ------------ | ------------------------------ |
| `<instance>` | Instance name, including prod. |

### Options

| Option          | Description                                |
| --------------- | ------------------------------------------ |
| `--yes`         | Skip confirmation and keep data.           |
| `--delete-data` | Also delete volumes and skip confirmation. |

## `hub app <name> instance create`

Create another instance of the app.

### Usage

```sh
hub app <name> instance create [options] <instance>
```

### Arguments

| Argument     | Description                     |
| ------------ | ------------------------------- |
| `<instance>` | Instance name, such as staging. |

### Options

| Option   | Description                                        |
| -------- | -------------------------------------------------- |
| `--json` | Return a structured result for scripts and agents. |

### Examples

```sh
# Create my-app/staging
hub app my-app instance create staging

# Deploy to it
hub deploy --name my-app --instance staging

# Any app command works on an instance
hub app my-app/staging logs
```