Download the PHP package andriichuk/keepenv without Composer

On this page you can find all versions of the php package andriichuk/keepenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package keepenv

🗒 KeepEnv

SWUbanner

Track Your Environment Variable Changes Using Specification

Logo

License: MIT Tests Code coverage Psalm type coverage Psalm level Stars Quality Gate Status

### Table Of Contents * [About](#about) * [Installation](#installation) * [Initialization](#initialization) * [Validation](#validation) * [Filling](#filling) * [Adding](#adding) * [Dumping](#dumping) * [Syntax](#syntax) * [Tips](#tips) * [Contributing](#contributing) ### About KeepEnv is a CLI tool for checking and managing environment variables based on a specification file. Motivations: - I want to have a way to describe all environment variables in one specification file. - I want to make sure that all required variables are filled in correctly before deploying the application. - I don't want to check variables in runtime. - I want to keep track of new environment variables when they are added by one of my colleagues. - I want to have a convenient and safe way to fill in new variables. - I want to check variables from different state providers (system $_ENV, from .env file + system or only from .env file). - I don't want to manually describe all 100+ existing environment variables. - I want to use a tool that will not be tied to a specific framework, because I work with several frameworks. Features: * Environment specification generation based on current `.env` files. * Environment variables validation. * Split variable definition between environments. * Extend variables from particular environment e.g. `local` from `common`. * Split system (`$_ENV`) and regular variables from `.env` files. * Ability to fill missing variables through console command. Supported dotenv file state loaders: * [vlucas/phpdotenv](https://packagist.org/packages/vlucas/phpdotenv) * [symfony/dotenv](https://packagist.org/packages/symfony/dotenv) * [josegonzalez/dotenv](https://packagist.org/packages/josegonzalez/dotenv) ### Installation Install composer package: ### Initialization This command allows you to generate a new environment specification file based on your current `.env` structure. Basic usage: This will create a specification file (`keepenv.yaml`) in your root directory with `common` environment. Using preset (available presets: `laravel`, `symfony`): For Laravel Sail: Using custom `.env` files for `vlucas/dotenv` (paths to the folders with `.env` file): Using custom `.env` files for `symfony/dotenv` (direct file paths): Environment file reader will be detected automatically, but you can customize it: ### Validation Using this command you can check your environment variables according to the specification file `keepenv.yaml`. Basic usage: Check only system variables (`$_ENV`) without looking at the `.env` file: Use `--help` option to check other parameters. ### Filling This command allows you to fill in and validate missing variable values from your `.env` file (use `--help` for list of all options). Command: For specific environment: ### Adding The following command can help you to add a new variable definition to specification and dotenv files: ### Dumping Using this command you can export all your variables defined in `keepenv.yaml` file into the custom `.env` file. Create a new `.env` file according to variables defined in the `keepenv.yaml` (same as `cp .env.example .env`). Variables will be filled in only with default values. Perhaps now you can delete the `.env.example` file: Dump system variables into the file: Create a new `.env.stage` file based on `production` environment specification and current `.env` file: ### Syntax Currently, only the YAML syntax format is supported. Environments definition: Variables definition: * Describe the purpose of variables: * Mark that variable should be followed by `export` keyword in `.env` file (`export APP_LOCALE=en`): * Mark that variable should be set on the server-side (`$_ENV` or `$_SERVER`) not from `.env` file: * Specify default value (please use this only for non-sensitive data): * Describe validation rules: * Mark variable as required: * Check that variable value is a string (can usually be omitted because all values in the `.env` file are read as strings by default): * String with length range * Numeric * Boolean (true/false, on/off, yes/no, 1/0) * Boolean with custom options * Email address * Enumeration: * Means that the value of the variable must be equal (`==`) to a specific value. * IP address Full example: ### Tips Use `equals` rule to check for a specific value for the environment, e.g., a useful example for `APP_ENV`: You can add a composer script for the new environment variables filling and validation: Then use: You can also define `keepenv` common on `post-update-cmd` composer event, so environment filling and validation will be running after each `composer update`: ### Contributing Contributions, issues and feature requests are welcome.
Feel free to check [issues page](https://github.com/andriichuk/keepenv/issues) if you want to contribute. [Check the contributing guide](https://github.com/andriichuk/keepenv/blob/main/CONTRIBUTING.md). ### Credits - [Serhii Andriichuk](https://github.com/andriichuk) - [All Contributors](https://github.com/andriichuk/keepenv/graphs/contributors) ### License Copyright © 2022 [Serhii Andriichuk](https://github.com/andriichuk).
This project is [MIT](https://github.com/andriichuk/keepenv/blob/main/LICENSE) licensed.


All versions of keepenv with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-mbstring Version *
ext-json Version *
symfony/yaml Version ^5.4
symfony/console Version ^5.0 || ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andriichuk/keepenv contains the following files

Loading the files please wait ...