PHPackages                             sterlingdesign/css-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. sterlingdesign/css-cli

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

sterlingdesign/css-cli
======================

Command line wrapper for CSS Development Tools: Dart SASS, autoprefixer, and clean-css

v1.2.1(9mo ago)05MITPHPPHP &gt;=8.3

Since Jan 10Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/sterlingdesign/css-cli)[ Packagist](https://packagist.org/packages/sterlingdesign/css-cli)[ RSS](/packages/sterlingdesign-css-cli/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (2)Versions (5)Used By (0)

sterlingdesign/css-cli
======================

[](#sterlingdesigncss-cli)

This is a Command line interface (CLI) for automating the process of creating CSS from Sass (SCSS) source files. It is specifically meant for use with a Sterling Full Stack Framework directory structure, however it could be used to accommodate any directory structure using additional command line arguments. The command line arguments specify the SCSS source directory to monitor and the output directory where generated css and map files are generated (just like arguments to sass - sourceDir:targetDir).

This CLI combines the capabilities of sass (), the "autoprefixer" library (), and the "clean-css" library (). It furthermore provides a command shell-like interface that can be used to monitor activity and control output in real time.

### Background

[](#background)

The typical development cycle when developing custom CSS with SASS is:

1. Edit the \*.scss files located in one directory
2. Run a Sass processor to produce the CSS output files (usually output to another directory)
3. Run a tool against the generated CSS to add or remove vendor prefixes to support the target browsers
4. Run a tool to clean whitespace and formatting, and either generate expanded CSS (for development) or compressed CSS (for production)

This utility automates these tasks.

At the time of this development, many of the best tools for accomplishing these tasks are written using JavaScript and are often implemented as plug-ins for tool chain utilities such as gulp. This utility takes advantage of some of those tools by leveraging the multithreaded capabilities of PHP and shelling out to the various JavaScript tools which run under a separate node process. Also, in order to take advantage of the most up-to-date and most complete implementation of SASS, this interface makes use of the compiled Dart SASS processor which also runs in a separate process. Finally, the css-cli implements a shell-like interpreter which can accept commands that change the output characteristics of the CSS generated.

### What is the advantage of this utility over a tool chain like Gulp?

[](#what-is-the-advantage-of-this-utility-over-a-tool-chain-like-gulp)

This utility implements a multithreaded command line interface that can change the output characteristics on the fly. For example, during normal development you most likely will want expanded CSS and map generation. Before moving to a production server, you most likely want to turn off maps and compress the CSS generated.

[![](images/screenA.png)](images/screenA.png)

Typically you would have this utility running in a terminal shell while you perform edits to the SCSS.

[![](images/screenB.png)](images/screenB.png)

Once you get things working the way you want, you can simply go to the terminal where css-cli is running, type a command, and the new production format of all of the files being watched will be generated at once for final testing before release.

[![](images/screenC.png)](images/screenC.png)

### Installation

[](#installation)

This package requires several prerequisites:

- A thread safe version of PHP &gt;= 8.3.
- The parallel php extension (which requires the thread safe version of PHP)
- Node.js, plus npm and npx

See INSTALL.md for more details.

### Future

[](#future)

Although CSS standards are heading towards not needing prefixes to support older browsers, there is still a need for them. Plus, having the capability to change between pretty-printed sass output with map files and compressed output for production is nice to have. Perhaps someday the sass processor itself will allow command input while running and this tool will become obsolete.

Maintaining this CLI wrapper to keep up with changes in the underlying components is the first priority. If there is any interest, some options for future development for this package could include generating minified JavaScript and more command options.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance58

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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 ~332 days

Total

4

Last Release

273d ago

PHP version history (2 changes)1.0.1PHP &gt;=7.1

1.2.0PHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16853763?v=4)[samofvt](/maintainers/sterlingdesign)[@sterlingdesign](https://github.com/sterlingdesign)

---

Top Contributors

[![sterlingdesign](https://avatars.githubusercontent.com/u/16853763?v=4)](https://github.com/sterlingdesign "sterlingdesign (16 commits)")

### Embed Badge

![Health badge](/badges/sterlingdesign-css-cli/health.svg)

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

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[misterion/ko-worker

Ko-worker project is a base to develop amqp based message dispatchers

2713.4k](/packages/misterion-ko-worker)

PHPackages © 2026

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