dniccum / secret-stash-cli
A PHP-based Composer package to interact with the SecretStash environment variable service.
Fund package maintenance!
Requires
- php: ^8.2
- endroid/qr-code: ^5.0.9
- guzzlehttp/guzzle: ^7.10
- illuminate/collections: ^11.0|^12.0|^13.0
- illuminate/console: ^11.0|^12.0|^13.0
- illuminate/contracts: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- laravel/prompts: ^0.3.0
- nesbot/carbon: ^3.11
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/boost: ^2.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^9.0.0|^10.0.0|^11.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
- dev-main
- v1.0.1
- v1.0.0
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.1
- v0.1.0
- dev-bugfix/share-command-removal
- dev-devin/SEC2-6-1774721229
- dev-devin/SEC-16-1774712754
- dev-devin/SEC-12-1774478770
- dev-devin/1774461610-fix-empty-variable-push
- dev-devin/SEC2-7-1774458168
- dev-devin/1774408941-fix-phpstan-strict-comparison
- dev-devin/1774320057-fix-environment-existence-check
- dev-devin/SEC2-4-1774301272
- dev-devin/SEC-6-1774271410
- dev-devin/1773753315-readme-update
This package is auto-updated.
Last update: 2026-03-28 21:54:24 UTC
README
SecretStash CLI
A Laravel Composer package that provides Artisan commands for interacting with the SecretStash REST API. Manage your environment variables directly from the command line with an intuitive, interactive interface.
Requirements
- PHP 8.2 or higher
- Laravel 11 or higher
- A SecretStash API Key
Installation
Install the package via Composer:
composer require dniccum/secret-stash-cli
Run the installer to publish the configuration file and generate the encryption keys used to secure your variables:
php artisan secret-stash:install
Important
This package creates a ~/.secret-stash directory on your machine (or the path specified by the SECRET_STASH_KEY_DIR environment variable). Ensure this folder is secure as it contains the keys required to decrypt your environment variables.
Configuration
Add the following environment variables to your application's .env file:
SECRET_STASH_API_TOKEN=your_token_here SECRET_STASH_APPLICATION_ID=your_application_id_here
- API Key: Create a token in SecretStash by navigating to your profile settings and accessing the "Tokens" tab.
- Application ID: Create or select an application in SecretStash and copy its ID from the dashboard.
Note
Both the API key and Application ID are required. The CLI will throw an error if either is missing.
Quick Example
Pull your environment's variables from SecretStash into your local .env file:
php artisan secret-stash:variables pull
Push your local .env variables to SecretStash:
php artisan secret-stash:variables push
For the full list of available commands and options, visit the SecretStash CLI documentation.
Testing
composer test
or:
./vendor/bin/pest
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
