# Manage apps

An **app** is the unit of deployment on Dina. Each app has:

- A **name** (like `my-app`), which you choose when you create it.
- A **public URL**, assigned automatically.
- A history of **deployments** — every time you push new code.
- Its own **environment variables** and **custom domains**.

This page covers managing the apps themselves. For pushing code, see [Deploy an app](/docs/deploying).

## Create an app

```sh
dina apps create my-app
```

The name can contain letters, numbers, and hyphens. The CLI prints the app's URL once it's created. That URL is live immediately, but shows a placeholder until you deploy code to it.

## List your apps

```sh
dina apps list
```

You'll see a table with each app's name, URL, and creation date. For a machine-readable version:

```sh
dina apps list --output json
```

## Inspect a single app

```sh
dina apps info --app my-app
```

You'll see:

- Identifying info (name, ID, URL, owner, namespace).
- Creation and last-update timestamps.
- Any custom domains attached to the app.
- The most recent deployment — its status, port, replicas, and image.

Add `--output json` for scripts.

## Rename an app

```sh
dina apps update --app old-name --name new-name
```

The `--app` flag says which app to change; `--name` is the new name. The app's URL is derived from its name, so renaming also moves the default URL.

Pointing your visitors at a custom domain (see [Custom domains](/docs/custom-domains)) insulates them from rename-induced URL changes.

## Delete an app

Deleting an app is **permanent**. It removes the app, its deployments, environment variables, and custom domain bindings. This cannot be undone.

```sh
dina apps delete --app my-app
```

The CLI prompts you to type the app's name to confirm. This is intentional: typing the name on purpose is much harder to do by accident than pressing "y".

For scripts or one-liners where you've already confirmed, skip the prompt with `--force`:

```sh
dina apps delete --app my-app --force
```

<div class="callout"><strong>Care:</strong> <code>--force</code> deletes immediately with no prompt. Use it only in scripts where you're certain, or when you've just listed the app and want to skip the second confirmation.</div>

## Appendix: what counts as a command being "app-scoped"

Most `apps` subcommands take a `--app` flag (or `-a` for short). You'll see this pattern across the CLI:

```sh
dina apps logs --app my-app
dina apps env set --app my-app DATABASE_URL=...
dina apps hostnames add --app my-app api.example.com
```

You can always type `dina apps --help` to see the full list.
