Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Envclient Laravel Package

lionix/envclient

Laravel package for working with .env files programmatically: read, update, and manage environment variables from your app or an admin panel, so configuration changes can be made without manual file editing or redeploys.

View on GitHub
Deep Wiki
Context7

lionix/envclient gives Laravel and plain PHP applications a clean client layer for environment variables — read, cast, and validate values from .env files instead of scattering raw getenv() calls throughout your codebase.

  • Typed access — retrieve values as strings, booleans, integers, arrays, or JSON
  • Laravel integration — service provider, facade, and publishable config out of the box
  • Defaults & fallbacks — declare sensible values for missing or empty keys
  • Validation — fail fast when required variables are absent or malformed
  • Caching — avoid repeated file parsing in long-running processes
Frequently asked questions about Envclient
How do I install lionix/envclient in a Laravel app?
Install it with composer require lionix/envclient. The package is expected to use Laravel package discovery, so manual service provider registration should not be required. After installation, run the artisan commands to confirm the .env file is readable and the package is wired correctly. Treat the install as a spike until you confirm the declared Laravel and PHP constraints from composer.json.
Which Laravel and PHP versions does lionix/envclient support?
The provided overview does not publish a definitive Laravel or PHP support matrix. The technical evaluation flags Laravel 8 through 12 and PHP 8.1 through 8.4 as ranges to verify, but those are not confirmed by the package metadata shown. Check the composer.json constraints and CI matrix before adopting it. Do not assume support for older Laravel or PHP versions without testing.
How do I read and update .env variables with lionix/envclient?
The package exposes artisan console commands and a facade-backed fluent client for reading and updating environment variables. Use the commands for scripted or manual .env inspection and the facade for application code such as admin settings panels. Because writes mutate the .env file rather than the running configuration, treat updates as file-level changes and plan to rebuild the config cache afterward. Confirm the exact method names and command signatures from the package source or README.
Can I validate .env variables with a Laravel validation rule using this package?
Yes, the package includes a validation rule set alongside the artisan commands and fluent client. That combination is its main differentiator for checking that required .env keys and formats are present. The exact rule names and syntax are not included in the overview, so verify them from the package source or README. Validation is useful for pre-boot checks and onboarding scripts, not for guaranteeing runtime config state.
Does updating .env with lionix/envclient affect config() or cached config?
No. Updating .env through this package does not change Laravel's config() values in the current process or in cached configuration. After a write, you must rebuild the config cache and recycle workers for the new values to take effect. This is the core trap: a command can report success while the application continues using stale config. In production, assume cached config is active and design an explicit cache rebuild step.
Does lionix/envclient preserve comments, ordering, and quoting in .env?
The overview does not guarantee preservation of comments, ordering, or quoting. File mutation tools in this category can rewrite .env and lose comments or reorder keys, and values containing spaces, #, $, or newlines need correct quoting. Verify these behaviors against a copy of your real .env before relying on the package. If comments and ordering matter, require an explicit preservation test.
Are .env writes in lionix/envclient atomic and safe under concurrent requests?
Atomicity and locking are not documented in the provided overview. Programmatic writes to .env risk torn writes under concurrency unless the package uses a temp file plus rename and some lock strategy. Test concurrent writes and interrupted writes in a disposable environment. For production settings changes, prefer a database-backed configuration layer and regenerate .env only in controlled deployment steps.
Does lionix/envclient mask secrets in artisan command output?
Secret masking is not confirmed in the overview. Commands that read or list env values can expose credentials in terminal scrollback, CI logs, and shell history unless masking is explicit. Check whether command output and exception messages redact sensitive keys. If masking is absent, avoid listing production .env values through artisan and restrict command use to trusted local or CI contexts.
How does lionix/envclient behave with Octane, queue workers, and getenv()?
The overview does not state whether values are read by parsing the .env file or from getenv() and $_ENV. That difference matters under Octane, PHP-FPM, and queue workers, where process environment and file state can diverge. Test the client in each runtime you use and confirm whether it reads the file or the process environment. Also verify behavior after config:cache is rebuilt but workers are not recycled.
Is lionix/envclient a good alternative to phpdotenv or laravel-env-editor?
It overlaps with vlucas/phpdotenv for loading, Laravel native env() and config cache for reading, and community packages such as imliam/laravel-env-set-command or georgehanson/laravel-env-editor for writing. The package's thin differentiation is the validation rule plus fluent client combination. With 16 stars and 0 dependents, there is little production evidence, and the listed 2026 release date is a metadata anomaly to resolve before pinning. For many teams, phpdotenv plus a native Rule::in validation is enough; adopt this only if the command and facade ergonomics clearly justify the dependency.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo