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

Product Decisions This Supports

  • Pre-deployment configuration safety gates. Environment misconfiguration is one of the cheapest classes of production incident to prevent and one of the most expensive to discover late (failed deploys, 500s at boot, leaked defaults). This package turns env-var validation into a first-class, testable step — a candidate for a CI/CD gate or a php artisan pre-flight check before release promotion. Release 2.2.0 materially strengthens this: validate_on_boot (log or exception) plus ready-made rule sets (AppRules, DatabaseRules, MailRules, QueueRules, RedisRules, AwsRules) mean a baseline validation policy is now configuration rather than code we write.
  • Build vs. buy (adopt) for config hygiene. Teams routinely hand-roll env() guard rails, ad-hoc config assertions, or a check-env script. Adopting a small MIT-licensed package with validation rules and a fluent client replaces bespoke glue at near-zero cost — a clear "buy/adopt" over "build." The 2.2.0 rule sets and env:diff/env:sync shift the build-vs-adopt math further toward adopt, since the two most commonly hand-rolled scripts (drift check, .env.example reconciliation) now ship in the box.
  • Environment parity and drift detection. env:diff and env:sync compare and reconcile .env against .env.example, and --file lets a single command operate on a different environment file. That converts "surface missing or divergent keys" from a custom script into a repeatable operation — relevant if the roadmap includes multi-environment, multi-tenant, or white-label deployments where each tenant may carry its own env file.
  • Developer onboarding and documentation. An enumerable, validated set of required variables makes .env.example accuracy a solved problem rather than tribal knowledge — and env:diff/env:sync make it a maintained invariant rather than a one-time cleanup. env:generate listing the (masked) values it writes further reduces first-run guesswork.
  • Compliance and audit readiness. A queryable inventory of configuration keys supports internal controls around secret rotation and configuration change review. New in 2.2.0: EnvironmentFileUpdated and EnvironmentVariablesGenerated events give an audit trail hook for every env mutation, and automatic <file>.backup copies plus env:restore provide a rollback story — both meaningful upgrades for change-review controls, though still a lightweight first step, not a control framework.
  • Roadmap signal for platform reliability. Investing here is a small, defensible line item under "reduce deployment failure rate" and "improve developer experience" — measurable via change-failure rate and time-to-first-successful-deploy.

When to Consider This Package

Reasonable fit when:

  • You run one or more Laravel services with a growing, non-trivial env surface (roughly 15+ variables, or any variable whose absence breaks boot).
  • You deploy frequently or across multiple environments and lack a consistent configuration validation step.
  • You want env inspection inside application code (tests, health checks, admin diagnostics) via a fluent API rather than raw env()/config() calls.
  • You need artisan-level tooling for a small platform team without standing up a full secrets-management platform — and you are comfortable with a tool that now mutates .env files (env:set, env:unset, env:sync, env:restore), not just reads them.
  • You consume Laravel's env:encrypt and want to inspect or update encrypted files without writing decrypted contents to disk (--encrypted, --key, --cipher).
  • Your risk tolerance permits a young, low-adoption dependency (small star count, zero dependents) used in a bounded, non-critical path.

Look elsewhere when:

  • You need secret storage, rotation, and access control — that is a secrets manager's job (Vault, AWS Secrets Manager, Doppler, Infisical, 1Password). This package manages and validates variables; it is not a vault. The 2.2.0 mask-by-default behaviour and encrypted-file support reduce exposure but do not add key custody, rotation, or least-privilege access. Do not let it be positioned as a vault.
  • Your organization already standardizes on a platform that validates config at deploy time (Kubernetes admission policies, Helm schema validation, cloud config services) — you'd be duplicating a control.
  • You require vendor-backed SLAs, long-term maintenance guarantees, or a large contributor base. With zero dependents, there is no ecosystem evidence of production hardening. Note 2.2.0 added PHPStan (Larastan level 8) and Pint in CI plus Dependabot — this is genuine maturity progress and should raise confidence, but static analysis and automated dependency PRs are not the same as independent production adoption. Treat maintainer abandonment as a live risk and pin versions.
  • Env vars are already fully managed and injected by your platform, leaving no meaningful validation surface.
  • Security posture forbids additional third-party code in the boot/configuration path without a formal review — in which case, borrow the pattern (validated env schema) rather than the dependency.

Adoption guardrails (updated for 2.2.0):

  • Treat validate_on_boot as a production-change control, not a checkbox. Validating on every web request puts a third-party package on the hot path with outage potential. Start in log mode to gather signal, and only consider exception after the schema has proven stable in staging for at least a full release cycle. Never enable exception mode on a service where a schema false-positive would take down traffic.
  • Account for the breaking change. In 2.2.0 env:get masks secret values by default; any existing script or CI job reading secrets must add --reveal. Inventory dependents before upgrading, and prefer passing --reveal only inside trusted jobs rather than broadly.
  • Contain the secret-sprawl blast radius of file mutation. Automatic .backup files, --reveal output, and env:set writing values to disk all extend the footprint of plaintext secrets on the filesystem. Mandate gitignore coverage for *.backup and targeted env files, restrict file permissions, and confirm backups are excluded from build artifacts and log shipping before enabling backup in shared environments.
  • Note the new boot-path dependency. illuminate/encryption is now a direct dependency and saving a file updates the runtime environment for the rest of the request or command — verify this behaviour doesn't surprise long-running workers or code that caches config at boot.
  • Pilot in one non-critical service, pin the version, and wrap usage behind your own thin validation layer (schema kept in our repo) so the package remains replaceable. Confirm release cadence and issue responsiveness before broadening — the 2.2.0 cadence is encouraging, but the sample size is one.

How to Pitch It (Stakeholders)

For executives (one paragraph): A meaningful share of production incidents and failed releases trace back to misconfigured environment variables — a missing key, a typo'd value, a variable that exists in staging but not production. This package lets us validate, diff, and reconcile that configuration with standard tooling before a deploy happens, turning a recurring class of outage into a caught-before-release error. The latest release adds prebuilt validation rule sets for the services we actually run, secret masking by default, encrypted-file support, and an event/rollback trail for every change — meaningfully closing the gap between "useful utility" and "controlled operational tool." It is MIT-licensed, integrates natively with our Laravel stack, and costs effectively nothing to trial. The recommendation is a bounded pilot in one service, starting in non-blocking validation mode, to measure impact on failed deployments and onboarding time — not a platform-wide mandate, given the project's small maintainer base.

For engineering leads: You get artisan commands to inspect, validate, diff, sync, and roll back env state; prebuilt rule sets for app, database, mail, queue, Redis, and AWS; --file support for per-environment or per-tenant files; encrypted-file read/write without decrypted copies on disk; and a fluent client for reading configuration safely in tests and health checks. Masked-by-default output and EnvironmentFileUpdated/EnvironmentVariablesGenerated events give you an audit trail for free. Integration is a Composer dependency and a small config file. Caveats to plan around: (1) env:get now masks secrets by default in 2.2.0 — scripts reading secrets need --reveal, so audit dependents before upgrading; (2) validate_on_boot puts validation on every request, so start in log mode and treat exception as a deliberate, staged decision; (3) the package now writes to .env and creates .backup copies, which means plaintext secrets on disk — gitignore and permissions need to be explicit; (4) it remains a small, young package with no downstream dependents, so pin the version, isolate it behind an internal adapter, and keep the validation schema in our own repo so we can migrate to an in-house or platform-native solution if maintenance lapses. It complements, and does not replace, our secrets manager.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console