Skip to main content

Securely manage your secrets and environment variables with Phase.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phase_cli-1.21.3.tar.gz (67.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phase_cli-1.21.3-py3-none-any.whl (77.7 kB view details)

Uploaded Python 3

File details

Details for the file phase_cli-1.21.3.tar.gz.

File metadata

  • Download URL: phase_cli-1.21.3.tar.gz
  • Upload date:
  • Size: 67.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for phase_cli-1.21.3.tar.gz
Algorithm Hash digest
SHA256 b3fec6e23441857afbf1e058fef6ad517ce4e7563e25a3c3988794d76ce4091c
MD5 143eff84476e67954d3266f197db30c3
BLAKE2b-256 e1593d13141f71a38a3d775cf0145cdbc2580dfe19bd364759b756d547bf728d

See more details on using hashes here.

File details

Details for the file phase_cli-1.21.3-py3-none-any.whl.

File metadata

  • Download URL: phase_cli-1.21.3-py3-none-any.whl
  • Upload date:
  • Size: 77.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for phase_cli-1.21.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f117fb16d20bd1ea213569b625e269fa89d06de834bd2473b01a628f6f826d69
MD5 84bad94435b914f9112b621634ca70f4
BLAKE2b-256 31f56a70b5efbfcf42506d0b162d75743add04b4b7e50987c0423238f8917585

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page