Skip to main content

Securely manage your secrets and environment variables with Phase.

Project description

Phase-CLI

λ phase
Securely manage application secrets and environment variables with Phase.

                     @@@
              @@@@@@@@@@
          @@@@@@@@@@@@@@@@
       P@@@@@&@@@?&@@&@@@@@P
     P@@@@#        @&@    @P@@@
    &@@@#         *@&      #@@@&
   &@@@5          &@?       5@@@&
  Y@@@#          ^@@         #@@@J
  #@@@7          B@5         7@@@#
  #@@@?         .@@.         ?@@@#
  @@@@&         5@G          &@@@7
   #@@@B        @@^         #@@@B
    B@@@@      .@#        7@@@@B
     @@@@@@    &.@       P@@@@@7
       @@@@@@@@@@@@@@@@@@@@@
          @@@@@@@@@@@@@@@
             @@@@@@@@
             @@@

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
    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 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://get.phase.dev | 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:

Make sure virtualenv is installed

pip3 install virtualenv

Create a virtualenv:

virtualenv phase-cli

Switch to the virtualenv:

source phase-cli/bin/activate

Install dependencies:

pip3 install -r requirements.txt
export PYTHONPATH="$PWD"
python3 phase_cli/main.py

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.18.4.tar.gz (49.3 kB view details)

Uploaded Source

Built Distribution

phase_cli-1.18.4-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file phase-cli-1.18.4.tar.gz.

File metadata

  • Download URL: phase-cli-1.18.4.tar.gz
  • Upload date:
  • Size: 49.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for phase-cli-1.18.4.tar.gz
Algorithm Hash digest
SHA256 36d36e00511a8b69d6bdf2ed6c5419855e5e5628bb7709bf8091849b5f5022f4
MD5 243f7abd13f503e3cfe7f67bedb01646
BLAKE2b-256 ec4d17c0d8abb677c2877a497d0b2d8e01f33feb15655f359b5c68586b14d461

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phase_cli-1.18.4-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for phase_cli-1.18.4-py3-none-any.whl
Algorithm Hash digest
SHA256 94b97e5ba838797a17b5c01474b1586e198fd662a33aaa5d21fb9dce1183e99f
MD5 4bc4a8801dbfa2d83529f7a404d57bb7
BLAKE2b-256 448c10c401ea5b4b79b1e8c820f8c6d3dc23c0785a516b2e454e1d9320785b91

See more details on using hashes here.

Supported by

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