> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI でアプリケーションを管理する

> squarecloud app で Square Cloud のアプリケーションを一覧表示し、詳細の確認、起動、停止、再起動、不要になったアプリの削除を行います。

このページのコマンドでは、`list` を除き `[appID]` は省略できます。[CLI がアプリを特定する仕組み](/ja/cli-reference/quickstart#cli-がアプリを特定する仕組み)を参照してください。

## `squarecloud app list`

```bash 使い方 theme={"system"}
squarecloud app list [--json]
```

アカウント内のすべてのアプリケーションを表形式で表示します。表示されるのは、名前、アプリ ID、メモリ、クラスター、言語、ドメイン（カスタムドメインがある場合はそのドメイン）です。

```bash theme={"system"}
squarecloud app list --json
# Prints the raw application list as JSON.
```

## `squarecloud app info`

```bash 使い方 theme={"system"}
squarecloud app info [appID] [--json]
```

アプリケーションの ID、名前、説明、言語、メモリ、クラスター、所有者、ドメイン、カスタムドメイン、作成日を表示します。

```bash theme={"system"}
squarecloud app info <appID> --json
# Prints the raw application object as JSON.
```

## `squarecloud app start`

```bash 使い方 theme={"system"}
squarecloud app start [appID]
```

停止しているアプリケーションを起動します。

```bash 出力 theme={"system"}
✓ Signal START has been successfully sent to your application.
```

アプリケーションがすでに実行中の場合、CLI はその旨（`It is already running.`）を表示し、終了コード 0 で終了します。プラットフォームがそれ以外の理由で拒否した場合は、エラーとして報告されます。

## `squarecloud app stop`

```bash 使い方 theme={"system"}
squarecloud app stop [appID]
```

実行中のアプリケーションを停止します。すでに停止している場合、CLI はその旨（`It is already stopped.`）を表示し、終了コード 0 で終了します。

## `squarecloud app restart`

```bash 使い方 theme={"system"}
squarecloud app restart [appID]
```

アプリケーションのプロセスを再起動します。新しいコードの送信と再起動を一度に行うには、[`squarecloud commit --restart`](/ja/cli-reference/deploy#squarecloud-commit) を使います。

## `squarecloud app delete`

```bash 使い方 theme={"system"}
squarecloud app delete [appID] [-y]
```

| フラグ | 説明 |
| - | - |
| `-y`、`--yes` | 確認プロンプトをスキップします。 |

<Warning>
  アプリケーションの削除は取り消せません。また、CLI は削除前にスナップショットを作成しません。コピーを残すには、削除する前に [`squarecloud app snapshot create --download`](/ja/cli-reference/snapshots#squarecloud-app-snapshot-create) を実行してください。
</Warning>

削除する前に `Delete the application <appID>? This action is irreversible [y/N]` と確認します。ID を指定しない場合、コマンドは現在のフォルダの `ID=` 行にあるアプリケーションを対象にするため、確認メッセージの ID をよく確かめてください。

```bash theme={"system"}
squarecloud app delete <appID> -y
# Deletes without asking, for scripts.
```

```bash 出力 theme={"system"}
✓ Your application has been deleted.
```

## 関連項目

| コマンド | API | JavaScript SDK | VS Code |
| - | - | - | - |
| `list` | [`GET /v2/users/me`](/ja/api-reference/endpoint/users/me) | [`api.account.me()`](/ja/sdks/js/client) | [サイドバー](/ja/vscode-extension/features#アプリケーション) |
| `info` | [`GET /v2/apps/{app_id}`](/ja/api-reference/endpoint/apps/info) | [`api.apps.get()`](/ja/sdks/js/managing_application) | アプリケーションのカードをクリック |
| `start` | [`POST .../start`](/ja/api-reference/endpoint/apps/start) | [`api.apps.start()`](/ja/sdks/js/managing_application) | [起動](/ja/vscode-extension/features#アプリケーション) |
| `stop` | [`POST .../stop`](/ja/api-reference/endpoint/apps/stop) | [`api.apps.stop()`](/ja/sdks/js/managing_application) | [停止](/ja/vscode-extension/features#アプリケーション) |
| `restart` | [`POST .../restart`](/ja/api-reference/endpoint/apps/restart) | [`api.apps.restart()`](/ja/sdks/js/managing_application) | [再起動](/ja/vscode-extension/features#アプリケーション) |
| `delete` | [`DELETE /v2/apps/{app_id}`](/ja/api-reference/endpoint/apps/delete) | [`api.apps.delete()`](/ja/sdks/js/managing_application) | [削除](/ja/vscode-extension/features#アプリケーション) |
