> ## 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.

# squarecloud app env

> Square Cloud 上のアプリケーションの環境変数を管理します。

アプリケーションの環境変数を一覧表示、設定、削除、または置換します。`list` の場合、アプリケーション ID は省略可能で、引数、次に `squarecloud.app` 設定ファイル、最後にインタラクティブな選択メニューの順で解決されます。`set`、`remove`、`replace` では位置引数が変数名に使われるため、代わりに `--app` でアプリケーション ID を指定してください。

```bash theme={null}
squarecloud app env list
# Lists the environment variables of the app from squarecloud.app or an interactive picker.
```

```bash theme={null}
squarecloud app env list <appID> --json
# Lists a specific app's variables as JSON.
```

```bash theme={null}
squarecloud app env set KEY=VALUE ANOTHER=VALUE --app <appID>
# Sets one or more variables without touching the rest.
```

```bash theme={null}
squarecloud app env set --from-file .env --app <appID>
# Sets variables read from a .env style file.
```

```bash theme={null}
squarecloud app env remove KEY ANOTHER --app <appID>
# Removes one or more variables. Aliases: "delete", "unset".
```

```bash theme={null}
squarecloud app env replace KEY=VALUE --app <appID>
# Replaces the ENTIRE set of variables with the ones provided; existing ones not listed are removed.
```

`replace` サブコマンドは破壊的な操作です。既存の変数をすべて消去する前に `y/N` の確認を求めます。確認をスキップするには `-y`/`--yes` を指定してください。

```bash theme={null}
squarecloud app env replace --from-file .env --app <appID> -y
# Replaces all variables from a file without a confirmation prompt.
```

このコマンドの詳細については `squarecloud app env --help` を使用してください。
