PHPackages                             secrecy/secrecy - 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. [Security](/categories/security)
4. /
5. secrecy/secrecy

AbandonedArchivedLibrary[Security](/categories/security)

secrecy/secrecy
===============

A secret manager for php that supports a number of adapters

0.1.0(6y ago)04[2 PRs](https://github.com/webtoolsnz/secrecy/pulls)MITPHPPHP ^7.2.5

Since Feb 13Pushed 4y agoCompare

[ Source](https://github.com/webtoolsnz/secrecy)[ Packagist](https://packagist.org/packages/secrecy/secrecy)[ RSS](/packages/secrecy-secrecy/feed)WikiDiscussions master Synced 1w ago

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

Secrecy
=======

[](#secrecy)

[![CI Action](https://github.com/webtoolsnz/secrecy/workflows/continuous-integration/badge.svg)](https://github.com/webtoolsnz/secrecy/workflows/continuous-integration)[![codecov](https://camo.githubusercontent.com/f99165101f981194667a4cbccd8a6a4e26569134d90d175dbca29340af7d2850/68747470733a2f2f636f6465636f762e696f2f67682f776562746f6f6c736e7a2f736563726563792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/webtoolsnz/secrecy)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3fe0510286e3aa59006a19e182224516f31ad28dd55dabacbeef2337f9e1b2c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f736563726563792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/webtoolsnz/secrecy/?branch=master)

Secrecy is a secret management abstraction that allows you to easily swap out different adapters based on configuration.

Goals
-----

[](#goals)

- Promote explicit separation of configuration data and sensitive credentials
- Provide support for popular secret management services
- Provide seamless integration with popular frameworks
- Make it easy to manage your application secrets

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

[](#installation)

```
 composer require secrecy/secrecy
```

Usage
-----

[](#usage)

Below is an example of using the JsonFileAdapter

create a `secrets.json` file in the root of your project

```
{
    "secrets" : {
        "DB_USER": "root",
        "DB_PASSWORD": "f4x3!33s@",
        "API_KEY": "SOME_SUPER_SECRET_KEY"
    }
}
```

```
require 'vendor/autoload.php';

use Secrecy\SecretManager;
use Secrecy\Adapter\JsonFileAdapter;

$secretManager = new SecretManager(
    new JsonFileAdapter(__DIR__.'/secrets.json')
);

// Get a list of all secrets
print_r($secretManager->list());

// Retrieve a single by name
print_r($secretManager->get('API_KEY'));

// Update an existing secret
print_r($secretManager->update('DB_USER', 'app_user'));

// Create a new secret
print_r($secretManager->create('APP_SECRET', 'SHH'));
```

Caching
-------

[](#caching)

The `SecretManager` and its adapters does not cache any data, this must be done at the framework integration layer.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2286d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fe4edc8748b6ac4922ab8d16f64de61ad0b552027d8c1630646f6a0d6f09b9d?d=identicon)[badams](/maintainers/badams)

---

Top Contributors

[![badams](https://avatars.githubusercontent.com/u/340715?v=4)](https://github.com/badams "badams (10 commits)")

---

Tags

phpsecretssecrets-managersecurityawssecretsecretssecrets.json

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/secrecy-secrecy/health.svg)

```
[![Health](https://phpackages.com/badges/secrecy-secrecy/health.svg)](https://phpackages.com/packages/secrecy-secrecy)
```

###  Alternatives

[captainhook/secrets

Utility classes to detect secrets

103.6M1](/packages/captainhook-secrets)[firehed/security

Security tools for PHP

2374.9k2](/packages/firehed-security)[dasundev/filament-access-secret

Secures access to Filament by requiring a secret key in the URL.

382.4k](/packages/dasundev-filament-access-secret)[rezzza/vaultage

Keep secrets secret

214.4k](/packages/rezzza-vaultage)

PHPackages © 2026

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