PHPackages                             leonbarrett/keychain - 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. leonbarrett/keychain

ActiveLibrary[Security](/categories/security)

leonbarrett/keychain
====================

A PHP wrapper for storing and retrieving passwords in OS X Keychain

5191PHP

Since Jan 2Pushed 13y ago1 watchersCompare

[ Source](https://github.com/leonbarrett/PHPKeychain)[ Packagist](https://packagist.org/packages/leonbarrett/keychain)[ RSS](/packages/leonbarrett-keychain/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

What
====

[](#what)

PHPKeychain is a PHP wrapper for storing and retrieving passwords in OS X Keychain.

Why
===

[](#why)

You've written a CLI tool that interacts with a 3rd party service and you need to store a users sensitive details such as passwords. You could store this in a plain text file, but OS X has Keychain, so this will help you to do this.

How
===

[](#how)

Include this class in your CLI script and use the methods to set, get, update and delete passwords, all stored within Keychain.

Methods
=======

[](#methods)

See the demo.php file for details on how to use this class

Thanks
======

[](#thanks)

Thanks to the following articles:

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/87c88780a795c5e345d12a2c8b24da7b1f3b0bb59956133ddca86e7d8994b383?d=identicon)[leonbarrett](/maintainers/leonbarrett)

---

Top Contributors

[![leonbarrett](https://avatars.githubusercontent.com/u/365869?v=4)](https://github.com/leonbarrett "leonbarrett (8 commits)")

### Embed Badge

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

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

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k38](/packages/paragonie-ecc)

PHPackages © 2026

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