PHPackages                             fidum/padlock - 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. [Framework](/categories/framework)
4. /
5. fidum/padlock

ActiveProject[Framework](/categories/framework)

fidum/padlock
=============

A Laravel Zero Command for encrypting and decrypting environment files.

4.0.0(11mo ago)1965[4 PRs](https://github.com/fidum/padlock/pulls)MITPHPPHP ^8.2CI passing

Since Feb 8Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fidum/padlock)[ Packagist](https://packagist.org/packages/fidum/padlock)[ Docs](https://fidum.uk)[ GitHub Sponsors](https://github.com/dmason30)[ RSS](/packages/fidum-padlock/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (8)Versions (14)Used By (0)

A Laravel Zero Command for encrypting and decrypting environment files.
=======================================================================

[](#a-laravel-zero-command-for-encrypting-and-decrypting-environment-files)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1a3d5236db120d50ffc72baf2fce1c0e1dbe2609011408182e87a9378dda83f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666964756d2f7061646c6f636b2e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/fidum/padlock)[![GitHub Workflow Status (with branch)](https://camo.githubusercontent.com/de25345f9f86560e348e38eb8d55bf3eddfcb4a90b598fc3aa1c3b4876145ff7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f666964756d2f7061646c6f636b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666f722d7468652d6261646765)](https://github.com/fidum/padlock/actions?query=workflow%3Arun-tests+branch%3Amain)[![Twitter Follow](https://camo.githubusercontent.com/3ecd70148f9f16e2e0d66fcde3428926f1df4d6797ea463473ccf60dcdf7758a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666f6c6c6f772d25343064616e6d61736f6e6d702d3144413146323f6c6f676f3d74776974746572267374796c653d666f722d7468652d6261646765)](https://twitter.com/danmasonmp)

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

[](#installation)

You can install the package via composer:

```
composer global require fidum/padlock
```

### Using Composer Package Executor (cpx)

[](#using-composer-package-executor-cpx)

```
# Install cpx
composer global require cpx/cpx

# Decrypt
cpx fidum/padlock env:decrypt --env=$ENVIRONMENT --force --key=$ADD_ENCRYPTION_KEY_HERE

# Encrypt
cpx fidum/padlock env:encrypt --env=$ENVIRONMENT --force --key=$ADD_ENCRYPTION_KEY_HERE
```

Usage
-----

[](#usage)

```
$ padlock

  USAGE: padlock  [options] [arguments]

  self-update Allows to self-update a build application

  env:decrypt Decrypt an environment file
      --key[=KEY]            The encryption key
      --cipher[=CIPHER]      The encryption cipher
      --env[=ENV]            The environment the command should run under
      --force                Overwrite the existing environment file
      --path[=PATH]          Path to write the decrypted file
      --filename[=FILENAME]  Filename of the decrypted file

  env:encrypt Encrypt an environment file
      --key[=KEY]            The encryption key
      --cipher[=CIPHER]      The encryption cipher
      --env[=ENV]            The environment the command should run under
      --prune                Delete the original environment file
      --force                Overwrite the existing encrypted environment file
```

Run the below commands to encrypt and decrypt environment files in the current directory.

[Please see the Laravel documentation for environment encryption.](https://laravel.com/docs/9.x/configuration#encrypting-environment-files)

```
$ padlock env:encrypt --env=testing

   INFO  Environment successfully encrypted.

  Key ................ base64:RR480kEd+Yen6cCMkXmmGUz38cJYwlP/qNctQ7MA6zo=
  Cipher ............. AES-256-CBC
  Encrypted file ..... .env.testing.encrypted
```

```
$ padlock env:decrypt --env=testing --key=base64:RR480kEd+Yen6cCMkXmmGUz38cJYwlP/qNctQ7MA6zo=

   INFO  Environment successfully decrypted.

  Decrypted file ..... .env.testing
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/dmason30/.github/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Dan Mason](https://github.com/dmason30)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance74

Regular maintenance activity

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~107 days

Recently: every ~60 days

Total

9

Last Release

339d ago

Major Versions

1.x-dev → 2.0.02024-10-17

2.x-dev → 3.0.02024-10-17

3.x-dev → 4.0.02025-06-13

PHP version history (2 changes)1.0.0PHP ^8.1

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce00db7f776e4eedafb4c929c8996ce27544888a84fbe2a210f32f0eb38aa794?d=identicon)[dmason30](/maintainers/dmason30)

---

Top Contributors

[![dmason30](https://avatars.githubusercontent.com/u/20278756?v=4)](https://github.com/dmason30 "dmason30 (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (22 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (14 commits)")

---

Tags

encryptionenvironment-variableslaravellaravel-zerolaravel-zero-frameworkcliconsoleframeworklaravellaravel-zero

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/fidum-padlock/health.svg)

```
[![Health](https://phpackages.com/badges/fidum-padlock/health.svg)](https://phpackages.com/packages/fidum-padlock)
```

###  Alternatives

[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)

PHPackages © 2026

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