PHPackages                             qveronq/laravel-infisical-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. qveronq/laravel-infisical-sync

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

qveronq/laravel-infisical-sync
==============================

Sync your Laravel .env secrets with Infisical. Push, pull and diff environment variables between your .env file and your Infisical vault using the official PHP SDK.

v0.2.0(2mo ago)0269[1 PRs](https://github.com/QveronQ/laravel-infisical-sync/pulls)MITPHPPHP ^8.2CI passing

Since Feb 10Pushed 1mo agoCompare

[ Source](https://github.com/QveronQ/laravel-infisical-sync)[ Packagist](https://packagist.org/packages/qveronq/laravel-infisical-sync)[ Docs](https://github.com/qveronq/laravel-infisical-sync)[ GitHub Sponsors](https://github.com/QveronQ)[ RSS](/packages/qveronq-laravel-infisical-sync/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (4)Used By (0)

Laravel Infisical Sync
======================

[](#laravel-infisical-sync)

Sync your Laravel `.env` secrets with [Infisical](https://infisical.com). Push, pull, diff and sync environment variables between your `.env` file and your Infisical vault using the official PHP SDK.

[![Latest Version on Packagist](https://camo.githubusercontent.com/ff2a3e44491805cd496d967cfe7a9e2fcee8ee6e0e232b424f7c7e7e9143dcff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f717665726f6e712f6c61726176656c2d696e6669736963616c2d73796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/qveronq/laravel-infisical-sync)[![GitHub Tests Action Status](https://camo.githubusercontent.com/53e15a01aa5decb76e33f5d8a1fe2a9b079e93bc62efcdb3da26ff42741940e6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f717665726f6e712f6c61726176656c2d696e6669736963616c2d73796e632f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/qveronq/laravel-infisical-sync/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/0bd17f6e5280782e723ea98513a67c227ac2f529e80487e33baf27eea506effb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f717665726f6e712f6c61726176656c2d696e6669736963616c2d73796e632f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/qveronq/laravel-infisical-sync/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b869c1409133dd90384b58ec1ddb9ea0201a7b3497f3826683b24aaeec6bc76a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f717665726f6e712f6c61726176656c2d696e6669736963616c2d73796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/qveronq/laravel-infisical-sync)

Installation
------------

[](#installation)

```
composer require qveronq/laravel-infisical-sync
```

Publish the config file:

```
php artisan vendor:publish --tag="laravel-infisical-sync-config"
```

Then add the following to your `.env`:

```
INFISICAL_URL=https://app.infisical.com          # Optional, for self-hosted instances
INFISICAL_CLIENT_ID=your-machine-identity-client-id
INFISICAL_CLIENT_SECRET=your-machine-identity-client-secret
INFISICAL_PROJECT_ID=your-project-id
INFISICAL_ENVIRONMENT=dev
```

Usage
-----

[](#usage)

### Pull secrets from Infisical into your `.env`

[](#pull-secrets-from-infisical-into-your-env)

```
php artisan infisical:pull
```

Options: `--env=`, `--path=`, `--force`, `--backup`, `--dry-run`, `--show-values`

### Push your `.env` variables to Infisical

[](#push-your-env-variables-to-infisical)

```
php artisan infisical:push
```

Options: `--env=`, `--path=`, `--force`, `--dry-run`, `--show-values`

### Compare local `.env` with Infisical

[](#compare-local-env-with-infisical)

```
php artisan infisical:diff
```

Options: `--env=`, `--path=`, `--show-values`

### Bidirectional sync

[](#bidirectional-sync)

Sync both ways in a single command: pushes local-only variables to Infisical and pulls remote-only variables to your `.env`.

```
php artisan infisical:sync
```

Options: `--env=`, `--path=`, `--conflict=`, `--force`, `--backup`, `--dry-run`, `--show-values`

#### Conflict resolution

[](#conflict-resolution)

When a variable exists on both sides with different values, the `--conflict` option (or config `sync_conflict_strategy`) controls the behavior:

StrategyBehavior`skip` (default)Conflicts are ignored and shown as warnings`remote`Infisical value overwrites local`local`Local value overwrites Infisical```
# Use Infisical as source of truth for conflicts
php artisan infisical:sync --conflict=remote

# Force sync without confirmation (useful for CI/CD)
php artisan infisical:sync --force --conflict=remote
```

Configuration
-------------

[](#configuration)

```
// config/infisical-sync.php
return [
    'url' => env('INFISICAL_URL', 'https://app.infisical.com'),
    'client_id' => env('INFISICAL_CLIENT_ID'),
    'client_secret' => env('INFISICAL_CLIENT_SECRET'),
    'project_id' => env('INFISICAL_PROJECT_ID'),
    'environment' => env('INFISICAL_ENVIRONMENT', 'dev'),
    'secret_path' => env('INFISICAL_SECRET_PATH', '/'),
    'exclude_keys' => [
        'INFISICAL_*', // Supports wildcards
    ],
    'sync_conflict_strategy' => env('INFISICAL_SYNC_CONFLICT_STRATEGY', 'skip'),
    'env_file' => base_path('.env'),
];
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Quentin](https://github.com/QveronQ)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance86

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

84d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/148430465?v=4)[QveronQ](/maintainers/QveronQ)[@QveronQ](https://github.com/QveronQ)

---

Top Contributors

[![QveronQ](https://avatars.githubusercontent.com/u/148430465?v=4)](https://github.com/QveronQ "QveronQ (3 commits)")

---

Tags

laravelQuentinlaravel-infisical-sync

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/qveronq-laravel-infisical-sync/health.svg)

```
[![Health](https://phpackages.com/badges/qveronq-laravel-infisical-sync/health.svg)](https://phpackages.com/packages/qveronq-laravel-infisical-sync)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
