Metadata-Version: 2.4
Name: phase_cli
Version: 1.21.1
Summary: Securely manage your secrets and environment variables with Phase.
Home-page: https://github.com/phasehq/cli
Author: Phase
Author-email: info@phase.dev
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: keyring==25.6.0
Requires-Dist: questionary==2.1.1
Requires-Dist: cffi==1.17.1
Requires-Dist: requests==2.32.5
Requires-Dist: PyNaCl==1.6.0
Requires-Dist: rich==14.1.0
Requires-Dist: botocore>=1.40.17
Requires-Dist: pyyaml==6.0.3
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# phase cli

```fish
λ 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](media/phase-cli-demo.gif)](asciinema-cli-demo)

## Installation

You can install Phase-CLI using curl:

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

## Usage

### Login

Create an app in the [Phase Console](https://console.phase.dev) and copy appID and pss

```bash
phase auth
```

### Initialize

Link the phase cli to your project

```bash
phase init
```

### Import .env

Import and encrypt existing secrets and environment variables

```bash
phase secrets import .env
```

## List / view secrets

```bash
phase secrets list --show
```

## Run and inject secrets

`phase run // your run command`

Example:

```bash
phase run yarn dev
```

```bash
phase run go run
```

```bash
phase run npm start
```

## Development:

### Create a virtualenv:

```bash
python -m venv venv
```

### Switch to the virtualenv:

```bash
source venv/bin/activate
```

### Install dependencies:

```bash
pip install -r requirements.txt
```

### Install the CLI in editable mode:

```bash
pip install -e .
```

```bash
phase --version
```
