PHPackages                             shivammathur/spc - 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. shivammathur/spc

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

shivammathur/spc
================

0.0.5(3y ago)7132MITShell

Since Nov 15Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/shivammathur/spc)[ Packagist](https://packagist.org/packages/shivammathur/spc)[ RSS](/packages/shivammathur-spc/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)DependenciesVersions (6)Used By (0)

SPC
===

[](#spc)

setup-php-cli (SPC) is a command line utility to run [setup-php](https://github.com/shivammathur/setup-php).

OS Support
----------

[](#os-support)

Host OS/Virtual environmentPHP SupportedUbuntu 24.04`PHP 5.6` to `PHP 8.5`Ubuntu 22.04`PHP 5.6` to `PHP 8.5`Windows with cygwin`PHP 5.6` to `PHP 8.5`macOS Sequoia 15.x`PHP 5.6` to `PHP 8.5`macOS Sonoma 14.x`PHP 5.6` to `PHP 8.5`macOS Ventura 13.x`PHP 5.6` to `PHP 8.5`Install
-------

[](#install)

- Using composer

```
composer global require shivammathur/spc
sudo cp $(composer global config home)/vendor/bin/spc /usr/local/bin/spc
sudo chmod a+x /usr/local/bin/spc
```

- Download from Releases

```
# Download
curl -o /tmp/spc -sL https://github.com/shivammathur/spc/releases/latest/download/spc

# Verify
curl -o /tmp/spc.asc -sL https://github.com/shivammathur/spc/releases/latest/download/spc.asc
curl -o /tmp/key.asc -sL https://github.com/shivammathur.gpg
gpg --import /tmp/key.asc
gpg --verify /tmp/spc.asc /tmp/spc

# Install
sudo mv /tmp/spc /usr/local/bin/spc
sudo chmod a+x /usr/local/bin/spc
```

Options
-------

[](#options)

```
-p "[PHP Version]", --php-version "[PHP Version]"    Specify PHP version (Required if PHP is not installed)
-e "[Extensions]", --extensions "[Extensions]"       Specify extensions
-b "[INI File]", --ini-file "[INI Values]"           Specify base ini file
-i "[INI Values]", --ini-values "[INI Values]"       Specify ini values
-c "[Coverage]", --coverage "[Coverage]"             Specify Coverage driver
-t "[Tools]", --tools "[Tools]"                      Specify tools
-f "[Debug]", --debug "[Debug]"                      Specify debug flag
-f "[Fail Fast]", --fail-fast "[Fail Fast]"          Specify fail-fast flag
-z "[PHP TS/NTS]", --phpts "[PHPTS/NTS]"             Specify phpts flag
-u "[Update]", --update "[Update]"                   Specify update flag
-r "[TAG]", --release "[TAG]"                        Specify release
-v, --verbose                                        Specify verbose mode
-V, --version                                        Show version of script
-h, --help                                           Show help
```

Examples
--------

[](#examples)

- Install or switch to a particular PHP version. For example to install `PHP 8.4`.

```
spc -p "8.4"
```

- Install PHP extension, say `intl` and `xml` on `PHP 8.4`.

```
spc -e "intl, xml"
```

- Set the base php.ini file, say set it to `development`.

```
spc -b "development"
```

- Add any configuration to your php.ini, say set timezone to `UTC`.

```
spc -i "date.timezone=UTC"
```

- Set a coverage driver, say `PCOV`.

```
spc -c "pcov"
```

- Install a tool supported by `setup-php` globally.

```
spc -t "phpunit"
```

- Setup a debug build of PHP.

```
spc -p 8.1 -d "true"
```

- Fail if an extension, or a tool does not install.

```
spc -t "random_tool" -f "true"
```

- Update PHP to the latest patch version.

```
spc -u "true"
```

- Setup TS/NTS PHP on `Windows`. (Not supported currently)

```
spc -p "8.4" -z "ts"
```

- Use a particular tag/release of `setup-php`, say to use `v1`.

```
spc -r "v1"
```

- To run `spc` in the verbose mode, this will use `verbose` branch of `setup-php`.

```
spc -v
```

- To check options spc supports in command line.

```
spc -h
```

- To upgrade `spc` to latest version.

```
spc -U
```

- To check `spc` version.

```
spc -V
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance40

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Every ~170 days

Total

5

Last Release

1324d ago

### Community

Maintainers

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

---

Top Contributors

[![shivammathur](https://avatars.githubusercontent.com/u/1571086?v=4)](https://github.com/shivammathur "shivammathur (22 commits)")

---

Tags

cligithub-actionsphpsetup-php

### Embed Badge

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

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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