Download the PHP package stechstudio/laravel-infisical without Composer
On this page you can find all versions of the php package stechstudio/laravel-infisical. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stechstudio/laravel-infisical
More information about stechstudio/laravel-infisical
Files in stechstudio/laravel-infisical
Package laravel-infisical
Short Description Import your Infisical applications secrets as Laravel environment variables.
License MIT
Informations about the package laravel-infisical
Infisical is an all-in-one platform to securely manage application secrets and share them with your team. This package integrates Infisical with Laravel, exporting secrets as environment variables.
- Leverages the Infisical CLI to fetch and export secrets.
- Merges secrets onto your base
.env
file (optional). - Provides an Artisan command to update secrets via CI/CD pipelines or composer
post-install-cmd
scripts.
Instructions
1. Set up Infisical
- Set up an Infisical account if you haven't already. Create a project with secrets.
- Install the Infisical CLI tool on your device by following the instructions at Infisical CLI Installation.
2. Authenticate and configure your project
You can authenticate and configure your project in one of two ways:
-
Login with identity:
Run
infisical login
to authenticate with a user identity or a machine identity.Then run
infisical init
to select the project and generate the.infisical.json
file. We recommend committing this file to your repository. -
Use a service token:
Create a Service Token scoped for your designed environment.
Copy your specific Project ID from your Infisical settings page.
Set the following environment variables in your base
.env
file:
3. Install this package
You know the drill:
4. Specify your environment
Infisical needs to know which environment to pull secrets from. You can do this one of three ways:
-
Environment Variable: Set the
INFISICAL_ENVIRONMENT
environment variable in a base.env
file to the desired environment slug. -
CLI Argument: Pass the
--env
option when running the Artisan command. - Custom Resolver: If you want to dynamically resolve the environment slug, provide a callback in your application service provider.
[!IMPORTANT]
You must provide the slug of an existing environment. See your project Settings > Secrets Management page to view all your environments and slugs.
5. Run the command (manually or automatically)
You can run the command manually to merge secrets into your .env
file, or add it to your deployment scripts.
You can also add this to the scripts
section of your composer.json
file. This will automatically merge secrets from Infisical into your .env
file after every composer install or update.
6. Profit!
You should see "Environment [prod] variables merged successfully". If you look at your .env
file you should see that all the secrets from Infisical have been added to it.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-infisical with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0