Skip to main content

phase cli

λ phase --help
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
    dynamic-secrets                  ⚡️ Manage dynamic secrets
    dynamic-secrets list             📇 List dynamic secrets & metadata
    dynamic-secrets lease            📜 Manage dynamic secret leases
    dynamic-secrets lease get        🔍 Get leases for a dynamic secret
    dynamic-secrets lease renew      🔁 Renew a lease
    dynamic-secrets lease revoke     🗑️ Revoke a lease
    dynamic-secrets lease generate   ✨ Generate a lease (create fresh dynamic secrets)
    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

Features

  • Inject secrets to your application during runtime without any code changes
  • Import your existing .env files and encrypt them
  • Sync encrypted secrets with Phase cloud
  • Multiple environments eg. dev, testing, staging, production

See it in action

asciicast

Installation

You can install Phase-CLI using curl:

curl -fsSL https://pkg.phase.dev/install.sh | bash

Usage

Login

Create an app in the Phase Console and copy appID and pss

phase auth

Initialize

Link the phase cli to your project

phase init

Import .env

Import and encrypt existing secrets and environment variables

phase secrets import .env

List / view secrets

phase secrets list --show

Run and inject secrets

phase run // your run command

Example:

phase run yarn dev
phase run go run
phase run npm start

Development:

Create a virtualenv:

python -m venv venv

Switch to the virtualenv:

source venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Install the CLI in editable mode:

pip install -e .
phase --version

Release files for phase-cli 1.21.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phase-cli 1.21.3
File Size Uploaded
phase_cli-1.21.3.tar.gz 67.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for phase-cli 1.21.3
File Interpreter ABI Platform
phase_cli-1.21.3-py3-none-any.whl Python 3 none any Details

Total release size: 145.1 kB

Release files / phase_cli-1.21.3.tar.gz

Download URL phase_cli-1.21.3.tar.gz
Size 67.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b3fec6e23441857afbf1e058fef6ad517ce4e7563e25a3c3988794d76ce4091c
BLAKE2b-256 checksum
How to use checksums
e1593d13141f71a38a3d775cf0145cdbc2580dfe19bd364759b756d547bf728d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / phase_cli-1.21.3-py3-none-any.whl

Download URL phase_cli-1.21.3-py3-none-any.whl
Size 77.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f117fb16d20bd1ea213569b625e269fa89d06de834bd2473b01a628f6f826d69
BLAKE2b-256 checksum
How to use checksums
31f56a70b5efbfcf42506d0b162d75743add04b4b7e50987c0423238f8917585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page