### Verify Porter CLI Installation Source: https://docs.porter.run/cli/installation Checks the installed version of the Porter CLI to confirm successful installation. Run this command after completing the installation steps. ```bash porter version ``` -------------------------------- ### Porter CLI Help Commands Source: https://docs.porter.run/cli/basic-usage Examples of how to access help documentation for Porter CLI commands. This includes general help, help for specific commands, and help for subcommands. ```bash # General help poter -h # Help for a specific command poter app -h # Help for a subcommand poter app run -h ``` -------------------------------- ### Porter CLI Common Workflow: CI/CD Deployment Source: https://docs.porter.run/cli/basic-usage Example of a CI/CD deployment using the Porter CLI with explicit configuration via environment variables. This ensures consistent deployments in automated environments. ```bash # Deploy with explicit configuration PORTER_TOKEN=$DEPLOY_TOKEN \ PORTER_PROJECT=$PROJECT_ID \ PORTER_CLUSTER=$CLUSTER_ID \ porter apply -f porter.yaml ``` -------------------------------- ### Porter CLI Global Flags for Command Override Source: https://docs.porter.run/cli/basic-usage Examples demonstrating the use of global flags to override project and cluster configurations for specific commands. These flags allow for temporary configuration changes on a per-command basis. ```bash porter app logs my-app --project 12345 poter app run my-app --cluster 67890 -- bash ``` -------------------------------- ### Install Porter CLI via Homebrew (macOS) Source: https://docs.porter.run/cli/installation Installs the Porter CLI on macOS using the Homebrew package manager. Ensure Homebrew is installed before running this command. ```bash brew install porter-dev/porter/porter ``` -------------------------------- ### Install Porter CLI Manually (macOS & Linux) Source: https://docs.porter.run/cli/installation Installs the Porter CLI on macOS and Linux using a curl script. This method requires 'curl' and 'unzip' utilities to be installed on your system. ```bash /bin/bash -c "$(curl -fsSL https://install.porter.run)" ``` -------------------------------- ### Porter CLI CI/CD Environment Variable Configuration Source: https://docs.porter.run/cli/basic-usage Example of configuring the Porter CLI for CI/CD pipelines using environment variables. This sets the authentication token, project ID, and cluster ID, which take precedence over configuration files. ```bash export PORTER_TOKEN="your-deploy-token" export PORTER_PROJECT="12345" export PORTER_CLUSTER="67890" porter apply -f porter.yaml ``` -------------------------------- ### Porter CLI Application Deployment Source: https://docs.porter.run/cli/basic-usage Command to deploy an application using a porter.yaml configuration file. This command applies the specified configuration to deploy or update your application on Porter. ```bash porter apply -f porter.yaml ``` -------------------------------- ### Porter CLI Project and Cluster Management Source: https://docs.porter.run/cli/basic-usage Commands for managing projects and clusters within the Porter CLI. This includes listing available projects and clusters, setting the active project or cluster, and viewing the current configuration. ```bash porter projects list porter config set-project [PROJECT_ID] porter clusters list porter config set-cluster [CLUSTER_ID] porter config ``` -------------------------------- ### Porter CLI Authentication and Configuration Source: https://docs.porter.run/cli/basic-usage Commands for logging into Porter and verifying CLI configuration. The login command opens a browser for authentication and automatically sets the default project and cluster. The config command displays the current CLI settings. ```bash porter auth login porter config ``` -------------------------------- ### Porter CLI Common Workflow: Local Development Source: https://docs.porter.run/cli/basic-usage Commands for common local development tasks using the Porter CLI. This includes logging in, viewing application logs, running commands within an app's environment, and checking application configuration. ```bash # Login and configure poter auth login # View your app's logs poter app logs my-app # Run a command in an ephemeral copy of your app poter app run my-app -- bash # View current app configuration poter app yaml my-app ``` -------------------------------- ### Porter CLI Common Workflow: Debugging Source: https://docs.porter.run/cli/basic-usage Commands for debugging applications using the Porter CLI. This includes streaming live logs and viewing historical logs with a specified time range. ```bash # Stream live logs poter app logs my-app # View historical logs poter app logs my-app --since 1h ``` -------------------------------- ### Porter CLI Common Workflow: Managing Environment Variables Source: https://docs.porter.run/cli/basic-usage Commands for managing environment variables and secrets for applications and environment groups. This includes pulling, setting, and managing variables and secrets. ```bash # Pull environment variables from an app poter env pull -a my-app # Pull environment variables from an environment group poter env pull -g my-env-group # Set environment variables on an app poter env set -a my-app -v KEY=value # Set secrets on an environment group poter env set -g my-env-group -s API_KEY=secret123 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.