squarecloud app-list --token <YOUR_API_TOKEN>

However, this is not the best way to store your API key. There is a much better alternative.

Environment Variables:

Alternatively, you can set your API key as an environment variable named SQUARECLOUD-TOKEN. The command will automatically read this variable if the --token option is not used.

Setting Your Environment Variable:

To set an environment variable named SQUARECLOUD-TOKEN, use the following command based on your operating system.

setx SQUARECLOUD_KEY "YOUR_API_TOKEN"