semvec/pypi-packages huggingface dataset:
envsync-cli 0.1.1
A CLI tool to sync encrypted .env files with GitHub
License: MIT
Requires Python: >=3.9

# envsync

A CLI tool to sync encrypted `.env` files with GitHub securely.

## Features

- **Encryption**: Uses `age` encryption (via `python-age`) to secure your `.env` files.
- **GitHub Integration**: Automatically syncs encrypted files to your repository.
- **Key Management**: Securely stores encryption keys in your system's keychain.
- **Easy Workflow**: Simple `open`, `seal`, and `status` commands to manage your environment.

## Installation

### Python (pip)

The recommended way to install the CLI directly with Python is via the published package [`envsync-cli`](https://pypi.org/project/envsync-cli/):

```bash
pip install envsync-cli

# then use the CLI:
envsync --help
```

### Node.js (npm / pnpm)

If you prefer installing via the JavaScript ecosystem, there is an npm wrapper that sets up the Python CLI for you:

```bash
# npm
npm install -g envsync

# pnpm
pnpm add -g envsync

# then use the same CLI:
envsync --help
```

## Usage

### Initialize

Initialize `envsync` in your project repository. This will detect your git repo, authenticate with GitHub, generate an encryption key, and store it in your keychain.

```bash
envsync init
```

### Decrypt Environment

Decrypt your `.env.enc` file to a usable `.env` file.

```bash
envsync open
```

### Encrypt Environment

Encrypt your `.env` file to `.env.enc` for safe committing.

```bash
envsync seal
```

### Check Status

View the status of your environment files and sync state.

```bash
envsync status
```

## Development

For local development of `envsync` itself, clone the repo and install in editable mode:

```bash
git clone https://github.com/yourusername/envsync.git
cd envsync
pip install -e .
```

Then run tests using `pytest`:

```bash
pytest
```

## License

MIT