PHPackages                             datahihi1/tiny-env-encryptor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. datahihi1/tiny-env-encryptor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

datahihi1/tiny-env-encryptor
============================

Encrytor helper for TinyEnv: A simple PHP library to manage environment variables in a secure way.

1.0.0(4mo ago)08MITPHPPHP &gt;=7.1

Since Dec 16Pushed 4mo agoCompare

[ Source](https://github.com/datahihi1/tiny-env-encryptor)[ Packagist](https://packagist.org/packages/datahihi1/tiny-env-encryptor)[ RSS](/packages/datahihi1-tiny-env-encryptor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Tiny Env Encryptor
==================

[](#tiny-env-encryptor)

Tiny Env Encryptor is a simple PHP command-line tool that helps you securely manage your environment variables by encrypting and decrypting them using [TinyEnv](https://github.com/datahihi1/tiny-env).

Requirements
------------

[](#requirements)

- PHP 7.1 or higher
- Composer
- [TinyEnv](https://github.com/datahihi1/tiny-env)

Installation
------------

[](#installation)

```
composer require datahihi1/tiny-env-encryptor:^1
```

Usage
-----

[](#usage)

After installation, you can use the `tiny-env-encrypt` command-line tool.

### Generate Encryption Key

[](#generate-encryption-key)

To generate a new encryption key, run:

```
vendor/bin/tiny-env-encrypt generate
```

This will create a key and display it. Store this key securely, as you'll need it for encryption and decryption.

### Encrypt .env File

[](#encrypt-env-file)

To encrypt your `.env` file, use the following command:

```
vendor/bin/tiny-env-encrypt encrypt  .env [.env.encrypted] [key1 key2 ...]
- ``: The encryption key generated earlier.
- `.env`: The input file containing environment variables.
- `[.env.encrypted]`: (Optional) The output file to save the encrypted variables. If not provided, it will overwrite the input file.
- `[key1 key2 ...]`: (Optional) Specific keys to encrypt. If not provided, all variables will be encrypted.
```

Or helper:

```
$value = encrypt_env($value, $secretKey);
```

### Decrypt .env File

[](#decrypt-env-file)

To decrypt your encrypted `.env` file, use the following command:

```
vendor/bin/tiny-env-encrypt decrypt  .env.encrypted [.env.decrypted]
- ``: The encryption key used for encryption.
- `.env.encrypted`: The input file containing encrypted environment variables.
- `[.env.decrypted]`: (Optional) The output file to save the decrypted variables. If not provided, it will overwrite the input file.
```

Or helper:

```
$value = decrypt_env($value, $secretKey);
```

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](https://github.com/datahihi1/tiny-env/blob/main/LICENSE) file for details.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance78

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

143d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d4e04716bebfe938a06dfd6da1d7c0c51927d8549a2dbcdbd72d23a8c8c5f79?d=identicon)[datahihi1](/maintainers/datahihi1)

---

Top Contributors

[![datahihi1](https://avatars.githubusercontent.com/u/148314027?v=4)](https://github.com/datahihi1 "datahihi1 (2 commits)")

### Embed Badge

![Health badge](/badges/datahihi1-tiny-env-encryptor/health.svg)

```
[![Health](https://phpackages.com/badges/datahihi1-tiny-env-encryptor/health.svg)](https://phpackages.com/packages/datahihi1-tiny-env-encryptor)
```

###  Alternatives

[yavin/symfony-form-tree

create select field with indentation for tree structure

1591.1k1](/packages/yavin-symfony-form-tree)[spatie/laravel-help-space

Integrate Helpspace in your Laravel app

2333.7k](/packages/spatie-laravel-help-space)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
