PHPackages                             hphio/api-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. hphio/api-cli

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

hphio/api-cli
=============

Implements a CLI back-end for managing web apps and APIs

v1.1.1(2y ago)02.9k↓16.7%PHP

Since Oct 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mjmunger/api-cli)[ Packagist](https://packagist.org/packages/hphio/api-cli)[ RSS](/packages/hphio-api-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (20)Used By (0)

api-cli
=======

[](#api-cli)

Command line interface for APIs and WebApps.

Usage
-----

[](#usage)

### Execution from the command line

[](#execution-from-the-command-line)

If you want to execute CLI commands from the command line, use the '-x' argument followed by the command youw ant to execute.

Example: Suppose you want to create a cron job that executes `database cleanup tokens`, which will run once per minute and remove access tokens that have expired. You sould setup a cron job like this:

```
# m h  dom mon dow   command
  * *   *   *   *    /home/user/php/app/cli.php -x "database cleanup tokens"

```

*Note on paths*: the command above will **not** work out of the box. You must add the following to your cli.php file in order to change the working directory to that directory:

```
chdir(__DIR__);

```

This command will tell the system executing the scripts to change the working directory to the same directory where the cli.php directory is location. Otherwise, the cronjob will attempt to execute from the user's home directory, and it will not be able to run properly.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity70

Established project with proven stability

 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

Every ~114 days

Recently: every ~39 days

Total

18

Last Release

842d ago

Major Versions

v0.1.5 → v2.0.0.x-dev2023-08-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/cb09c625c46f0c8bbc7691aaa7efe99f1f567ed534d6f2b3ea7529bf708a72ea?d=identicon)[hphinc](/maintainers/hphinc)

---

Top Contributors

[![mjmunger](https://avatars.githubusercontent.com/u/6370814?v=4)](https://github.com/mjmunger "mjmunger (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hphio-api-cli/health.svg)

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

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[nunomaduro/phpinsights

Instant PHP quality checks from your console.

5.6k10.8M426](/packages/nunomaduro-phpinsights)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M13](/packages/pantheon-systems-terminus)[getkirby/cli

Kirby command line interface

6268.7k27](/packages/getkirby-cli)[soy-php/soy

PHP task runner focused on clean syntax and allowing flexible implementation

6612.1k10](/packages/soy-php-soy)

PHPackages © 2026

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