### Installing Phase CLI via Curl Source: https://github.com/phasehq/cli/blob/main/README.md This command installs the Phase CLI by downloading and executing an installation script from `get.phase.dev` using `curl`. It's the recommended method for initial setup. ```Bash curl -fsSL https://get.phase.dev | bash ``` -------------------------------- ### Installing Python Dependencies from requirements.txt Source: https://github.com/phasehq/cli/blob/main/README.md This command installs all Python packages listed in the `requirements.txt` file into the active virtual environment. These packages are necessary for the Phase CLI to function during development. ```Bash pip3 install -r requirements.txt ``` -------------------------------- ### Installing Virtualenv for Python Development Source: https://github.com/phasehq/cli/blob/main/README.md This command installs the `virtualenv` package using `pip3`, which is essential for creating isolated Python environments. It's a prerequisite for setting up the Phase CLI development environment. ```Bash pip3 install virtualenv ``` -------------------------------- ### Running Phase CLI from Source Source: https://github.com/phasehq/cli/blob/main/README.md This command executes the main script of the Phase CLI directly using `python3`. It's used for running the CLI in a development setup after all dependencies and environment variables are configured. ```Bash python3 phase_cli/main.py ``` -------------------------------- ### Running Application with Injected Secrets (NPM) Source: https://github.com/phasehq/cli/blob/main/README.md This command runs an `npm start` script, injecting secrets managed by Phase into the Node.js application's environment variables. It's a common way to provide secrets to Node.js applications securely. ```Bash phase run npm start ``` -------------------------------- ### Activating Python Virtual Environment Source: https://github.com/phasehq/cli/blob/main/README.md This command activates the previously created `phase-cli` virtual environment. Once activated, subsequent Python commands will use the packages installed within this isolated environment. ```Bash source phase-cli/bin/activate ``` -------------------------------- ### Listing Python Project Dependencies Source: https://github.com/phasehq/cli/blob/main/requirements.txt This snippet defines the exact versions of Python packages required for the project. These dependencies are typically installed using 'pip install -r requirements.txt' to ensure a consistent development and deployment environment. ```Python keyring==25.6.0 questionary==2.1.0 cffi==1.17.1 requests==2.32.0 PyNaCl==1.5.0 rich==13.9.1 pyyaml==6.0.1 ``` -------------------------------- ### Displaying Phase CLI Help and Commands Source: https://github.com/phasehq/cli/blob/main/README.md This snippet shows the output of running the `phase` command without arguments, displaying the CLI's help message, version options, and a list of available commands with their descriptions. It provides an overview of the CLI's capabilities. ```Shell λ phase Securely manage application secrets and environment variables with Phase. /$$ | $$ /$$$$$$ | $$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$__ $$| $$__ $$ |____ $$ /$$_____/ /$$__ $$ | $$ \ $$| $$ \ $$ /$$$$$$$| $$$$$$ | $$$$$$$$ | $$ | $$| $$ | $$ /$$__ $$ \____ $$| $$_____/ | $$$$$$$/| $$ | $$| $$$$$$$ /$$$$$$$/| $$$$$$$ | $$____/ |__/ |__/ \_______/|_______/ \_______/ | $$ |__/ options: -h, --help show this help message and exit --version, -v show program's version number and exit Commands: auth 💻 Authenticate with Phase init 🔗 Link your project with your Phase app run 🚀 Run and inject secrets to your app shell 🐚 Launch a sub-shell with secrets as environment variables (BETA) secrets 🗝️ Manage your secrets secrets list 📇 List all the secrets secrets get 🔍 Get a specific secret by key secrets create 💳 Create a new secret secrets update 📝 Update an existing secret secrets delete 🗑️ Delete a secret secrets import 📩 Import secrets from a .env file secrets export 🥡 Export secrets in a dotenv format users 👥 Manage users and accounts users whoami 🙋 See details of the current user users switch 🪄 Switch between Phase users, orgs and hosts users logout 🏃 Logout from phase-cli users keyring 🔐 Display information about the Phase keyring docs 📖 Open the Phase CLI Docs in your browser console 🖥️ Open the Phase Console in your browser update 🆙 Update the Phase CLI to the latest version ``` -------------------------------- ### Initializing Phase Project Link Source: https://github.com/phasehq/cli/blob/main/README.md This command links the current project directory with a Phase application, allowing the CLI to manage secrets specific to that project. It's typically run after authentication. ```Bash phase init ``` -------------------------------- ### Authenticating with Phase CLI Source: https://github.com/phasehq/cli/blob/main/README.md This command initiates the authentication process with Phase, prompting the user to provide their application ID and project secret string (PSS) obtained from the Phase Console. It's a prerequisite for linking projects and managing secrets. ```Bash phase auth ``` -------------------------------- ### Listing All Phase Secrets Source: https://github.com/phasehq/cli/blob/main/README.md This command lists all secrets managed by Phase for the current project. The `--show` flag ensures that the actual secret values are displayed, not just their keys. ```Bash phase secrets list --show ``` -------------------------------- ### Creating a Python Virtual Environment Source: https://github.com/phasehq/cli/blob/main/README.md This command creates a new Python virtual environment named `phase-cli`. This environment isolates project dependencies, preventing conflicts with system-wide Python packages. ```Bash virtualenv phase-cli ``` -------------------------------- ### Running Application with Injected Secrets (Go) Source: https://github.com/phasehq/cli/blob/main/README.md This command executes a `go run` command, injecting secrets managed by Phase into the Go application's environment. It's used to securely provide sensitive data to Go applications during execution. ```Bash phase run go run ``` -------------------------------- ### Importing Secrets from .env File Source: https://github.com/phasehq/cli/blob/main/README.md This command imports existing secrets and environment variables from a specified `.env` file into Phase, encrypting them for secure storage. The `.env` file path is provided as an argument. ```Bash phase secrets import .env ``` -------------------------------- ### Running Application with Injected Secrets (Yarn) Source: https://github.com/phasehq/cli/blob/main/README.md This command runs a `yarn dev` script while injecting secrets managed by Phase into the application's environment variables. It ensures that the application has access to necessary secrets at runtime without code changes. ```Bash phase run yarn dev ``` -------------------------------- ### Declaring Python Project Dependencies Source: https://github.com/phasehq/cli/blob/main/dev-requirements.txt This snippet lists the Python packages and their precise version constraints required for the project. These dependencies are essential for the application to run correctly and are typically managed using tools like pip and stored in a requirements.txt file. ```Python keyring==25.6.0 questionary==2.1.0 cffi==1.17.1 requests==2.32.0 PyNaCl==1.5.0 pytest==8.2.1 pytest-mock==3.14.0 rich==13.9.1 pyyaml==6.0.1 toml==0.10.2 python-hcl2==4.3.2 setuptools==75.1.0 ``` -------------------------------- ### Setting Python Path for Development Source: https://github.com/phasehq/cli/blob/main/README.md This command adds the current working directory (`$PWD`) to the `PYTHONPATH` environment variable. This allows Python to find modules within the project directory during development. ```Bash export PYTHONPATH="$PWD" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.