PHPackages                             dniccum/secret-stash-cli - 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. [CLI &amp; Console](/categories/cli)
4. /
5. dniccum/secret-stash-cli

ActiveLibrary[CLI &amp; Console](/categories/cli)

dniccum/secret-stash-cli
========================

A PHP-based Composer package to interact with the SecretStash environment variable service.

v1.0.2(1mo ago)1323[2 issues](https://github.com/dniccum/secret-stash-cli/issues)MITPHPPHP ^8.2CI passing

Since Jan 22Pushed 1mo agoCompare

[ Source](https://github.com/dniccum/secret-stash-cli)[ Packagist](https://packagist.org/packages/dniccum/secret-stash-cli)[ Docs](https://github.com/dniccum/secret-stash-cli)[ GitHub Sponsors](https://github.com/dniccum)[ RSS](/packages/dniccum-secret-stash-cli/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (63)Versions (24)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4cb361d9a5511eb51a382c8ef1794fd47ac87f4395df5440b894bf6ba23b6ffa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646e696363756d2f7365637265742d73746173682d636c692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dniccum/secret-stash-cli)[![GitHub Tests Action Status](https://camo.githubusercontent.com/efb4f3389c19a29fc003fb36b44f5e6cae84f3abf24676f4858be3af09799f49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646e696363756d2f7365637265742d73746173682d636c692f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/dniccum/secret-stash-cli/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/d7c8ec576ff8168a33916b4f5bbc1e09c60b19ae7cc55608895012d8b93be04c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646e696363756d2f7365637265742d73746173682d636c692f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/dniccum/secret-stash-cli/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b38c6be6f8b7cb109cf6fc6c1431246861639f492f925b4139646ffdbd7724e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646e696363756d2f7365637265742d73746173682d636c692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dniccum/secret-stash-cli)

[![SecretStash](og-image.png)](og-image.png)

SecretStash CLI (PHP / Laravel)
===============================

[](#secretstash-cli-php--laravel)

> Stop sharing `.env` files in Slack.

The SecretStash CLI lets you securely sync environment variables across your team, applications, and environments—directly from your Laravel or PHP project.

Built for developers who want a simple, secure way to manage secrets without breaking their workflow.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11 or higher
- A SecretStash API Key

---

🚀 Why SecretStash?
------------------

[](#-why-secretstash)

If you’ve ever:

- Shared `.env` files over Slack, email, or Notion
- Accidentally committed secrets to Git
- Struggled keeping dev/staging/prod configs in sync
- Spent too long onboarding teammates with environment setup

👉 SecretStash fixes this in minutes.

---

⚡ Quick Start (2 Minutes)
-------------------------

[](#-quick-start-2-minutes)

### 1. Install

[](#1-install)

```
composer require dniccum/secret-stash-cli
```

---

### 2. Authenticate

[](#2-authenticate)

```
php artisan secret-stash:login
```

---

### 3. Pull your environment variables

[](#3-pull-your-environment-variables)

```
php artisan secret-stash:pull
```

✅ Your `.env` file is now synced and secure.

---

🌐 Use with SecretStash Cloud
----------------------------

[](#-use-with-secretstash-cloud)

The CLI is designed to work with SecretStash Cloud:

👉

With the cloud platform, you can:

- Manage applications and environments in one place
- Share secrets securely across your team
- Sync configs across multiple machines instantly
- Avoid ever exposing sensitive values

Start free — no credit card required.

---

🔐 Secure by Design
------------------

[](#-secure-by-design)

SecretStash uses **zero-knowledge encryption**:

- Secrets are encrypted locally before being sent
- Your encryption keys never leave your machine
- SecretStash servers never see your raw values

> Only you and your team can decrypt your secrets.

---

⚙️ How It Works
---------------

[](#️-how-it-works)

1. Store your environment variables in SecretStash Cloud
2. Encrypt values locally before transmission
3. Use the CLI to sync `.env` files across environments

This ensures a secure, consistent workflow from local development to production.

---

💡 Common Use Cases
------------------

[](#-common-use-cases)

### 👥 Team Collaboration

[](#-team-collaboration)

Keep your entire team in sync without sharing sensitive files manually.

### 🌍 Environment Management

[](#-environment-management)

Manage separate configs for local, staging, and production.

### 🚀 Laravel Development

[](#-laravel-development)

Plug directly into your Laravel workflow via Artisan commands.

### 🔁 CI/CD Pipelines

[](#-cicd-pipelines)

Securely pull environment variables during deployment.

---

📦 Available Commands
--------------------

[](#-available-commands)

```
php artisan secret-stash:login   # Authenticate with SecretStash
php artisan secret-stash:pull    # Pull environment variables
php artisan secret-stash:push    # Push local changes
```

---

🧪 Import Existing Projects
--------------------------

[](#-import-existing-projects)

Already have a `.env` file?

You can import your existing variables into SecretStash and start syncing immediately.

---

🆚 Why Not Just Use `.env` Files?
--------------------------------

[](#-why-not-just-use-env-files)

`.env` files alone:

- ❌ Hard to share securely
- ❌ Easy to leak
- ❌ Not synced across teams
- ❌ No access control

SecretStash:

- ✅ Secure sharing
- ✅ Encrypted end-to-end
- ✅ Built for teams
- ✅ CLI-native workflow

---

📚 Documentation
---------------

[](#-documentation)

Full documentation available at:

👉

---

❤️ Ready to stop leaking secrets?
---------------------------------

[](#️-ready-to-stop-leaking-secrets)

Start using SecretStash today:

👉

---

Testing
-------

[](#testing)

```
composer test
```

or:

```
./vendor/bin/pest
```

---

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Doug Niccum](https://github.com/dniccum)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance70

Regular maintenance activity

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.4% 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 ~9 days

Recently: every ~20 days

Total

16

Last Release

53d ago

Major Versions

v0.8.1 → v1.0.02026-03-28

PHP version history (2 changes)v0.1.0PHP ^8.4

v0.3.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fe997126bcc6a6026a2f6c335ce125055af46178c82faa24d3087b7d5dc0b44?d=identicon)[dniccum](/maintainers/dniccum)

---

Top Contributors

[![dniccum](https://avatars.githubusercontent.com/u/2816415?v=4)](https://github.com/dniccum "dniccum (186 commits)")[![devin-ai-integration[bot]](https://avatars.githubusercontent.com/in/811515?v=4)](https://github.com/devin-ai-integration[bot] "devin-ai-integration[bot] (57 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

composerenvironmentlaravelphpphp8secretstashsymfonyvariableyiiphpsymfonylaravelenvironmentvariablesdniccumsecret-stashsecret-stash-cli

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/dniccum-secret-stash-cli/health.svg)

```
[![Health](https://phpackages.com/badges/dniccum-secret-stash-cli/health.svg)](https://phpackages.com/packages/dniccum-secret-stash-cli)
```

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

1.1k102.1k124](/packages/nativephp-mobile)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M286](/packages/laravel-ai)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.6k26.0M754](/packages/laravel-boost)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M156](/packages/laravel-cashier)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M183](/packages/spatie-laravel-health)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M206](/packages/laravel-mcp)

PHPackages © 2026

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