Metadata-Version: 2.1
Name: phase-cli
Version: 1.13.0
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.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: keyring ==24.2.0
Requires-Dist: questionary ==2.0.0
Requires-Dist: cffi ==1.15.1
Requires-Dist: requests ==2.31.0
Requires-Dist: PyNaCl ==1.5.0
Requires-Dist: rich ==13.5.2
Requires-Dist: pyyaml ==6.0.1
Requires-Dist: toml ==0.10.2
Requires-Dist: python-hcl2 ==4.3.2

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

## Installation

You can install Phase-CLI using curl:

```bash
curl -fsSL https://get.phase.dev | 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:

### Make sure virtualenv is installed

```bash
pip3 install virtualenv

```

### Create a virtualenv:

```bash
virtualenv phase-cli
```

### Switch to the virtualenv:

```bash
source phase-cli/bin/activate
```

### Install dependencies:

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

```
export PYTHONPATH="$PWD"
```

```bash
./phase_cli/main.py
```
