PHPackages                             secondtruth/sapi - 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. secondtruth/sapi

ActiveLibrary

secondtruth/sapi
================

SAPI Library written in PHP

24PHP

Since Feb 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/secondtruth/php-sapi)[ Packagist](https://packagist.org/packages/secondtruth/sapi)[ RSS](/packages/secondtruth-sapi/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP SAPI Library
================

[](#php-sapi-library)

[![Latest Stable](https://camo.githubusercontent.com/a7d7a8aafbbc8d7e7569df37d6a7cc450533967c4b03b02c53d428cf8f44b720/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365636f6e6474727574682f736170692e737667)](https://packagist.org/p/secondtruth/sapi)[![Build Status](https://camo.githubusercontent.com/3fa65a892a05726b2e37380bc926ab7e74ba5681090b1f8183156e4c44ce6e9d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f7365636f6e6474727574682f7068702d736170692e737667)](https://travis-ci.com/github/secondtruth/php-sapi)[![Scrutinizer](https://camo.githubusercontent.com/4c78f5ca1d1ff8755649b10e091d62194a462e242e734fe5fef51e9563a25c74/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7365636f6e6474727574682f7068702d736170692e737667)](https://scrutinizer-ci.com/g/secondtruth/php-sapi)[![Coverage](https://camo.githubusercontent.com/ca9a4e05383d85266c33f885db883152c23a11d8696c6396b78765b418fd6893/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7365636f6e6474727574682f7068702d736170692e737667)](https://scrutinizer-ci.com/g/secondtruth/php-sapi)[![License](https://camo.githubusercontent.com/9c4bc037325310877a12f4727553802b24ca64dbbdb1234e6d30c8b2e60c31aa/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7365636f6e6474727574682f736170692e737667)](https://packagist.org/p/secondtruth/sapi)

A SAPI Library written in PHP.

How to use?
-----------

[](#how-to-use)

```
$argv = ['foo', 'bar', '--baz'];
$sapi = new CLI($argv);

$input = $sapi->getInput();
$input->getArgs(); // ['foo', 'bar', '--baz']
$input->getArgsCount(); // 3
$input->read();
$input->readLine();
$input->readAll();

$output = $sapi->getOutput();
$output->write('My message...');
```

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

[](#installation)

### Install via Composer

[](#install-via-composer)

[Install Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) if you don't already have it present on your system.

To install the library, run the following command and you will get the latest version:

```
$ composer require secondtruth/sapi

```

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

[](#requirements)

- You must have at least PHP version 7.4 installed on your system.

###  Health Score

17

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/82268b2432ab90f14c62445938bc3cd1340dc66e0463035df57891826b418016?d=identicon)[secondtruth](/maintainers/secondtruth)

---

Top Contributors

[![secondtruth](https://avatars.githubusercontent.com/u/416441?v=4)](https://github.com/secondtruth "secondtruth (2 commits)")

---

Tags

composer-packageinputiooutputphp-librarysapi

### Embed Badge

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

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

PHPackages © 2026

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