fidum/padlock

A Laravel Zero Command for encrypting and decrypting environment files.

Fund package maintenance!
dmason30

Installs: 41

Dependents: 0

Suggesters: 0

Security: 0

Stars: 20

Watchers: 1

Forks: 1

Open Issues: 0

Type:project

1.0.2 2023-02-08 18:34 UTC

This package is auto-updated.

Last update: 2024-04-29 23:58:01 UTC


README

Latest Version on Packagist GitHub Workflow Status (with branch) Twitter Follow

Installation

You can install the package via composer:

composer global require fidum/padlock

Usage

$ padlock

  USAGE: padlock <command> [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 encrypted environment 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
      --force                Overwrite the existing environment file
      --path[=PATH]          Path to write the decrypted file
      --filename[=FILENAME]  Filename of the decrypted file

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

Please see the Laravel documentation for environment encryption.

$ 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

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.