Download the PHP package kukharenko/env-manager without Composer
On this page you can find all versions of the php package kukharenko/env-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package env-manager
Env Replacer
Overview
Env Replacer is a powerful tool for managing environment files across multiple projects. It simplifies the process of switching between different environment configurations, ensuring consistency and reducing the risk of errors.
Installation
To install Env Replacer globally using Composer, run the following command:
Follow after install instructions:
Verify Installation Path
Ensure that vendor/bin
is added to your PATH
environment variable. You can check this by running:
If vendor/bin
is not included, you need to add it manually:
Edit your ~/.zshrc
and ~/.bash_profile
files:
Add the following line:
Apply the Changes
After editing the respective files, apply the changes by sourcing them:
Usage
Env Replacer provides several options to manage your environment files efficiently:
Options
--project
- Specify the environment name to replace. Example:ua
--service
- List the service names to search, separated by commas. Example:case-service,dictionary-service,import-service
. You can also use shorter names for the services, such as:case,dict,imp
--restore
- If set totrue
, projects will revert to their previous.env
files
Example Command
Show current project configuration:
To replace environment files for all projects, run the following command:
To replace environment files for the case-service
, run the following command:
To restore the previous .env
file for case-service
, run the following command:
Env files
By default, project .env
files are stored in the /Users/yourusername/env-replacer/concrete
directory. You can create a new configuration file, such as test.env
, and then use it as follows:
or shorter:
This command will replace the existing .env
file in every service with a merged version of base.env
and test.env
.
Custom services
To override variables for specific service, create service-name.env
file in the /Users/yourusername/env-replacer/projects
directory with variables you want to add.
License
Env Replacer is open-source software licensed under the MIT license.
By following the above steps, you should be able to easily install and use Env Replacer to manage your environment configurations across multiple projects efficiently.