PHPackages                             adhocore/cli-syntax - 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. adhocore/cli-syntax

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

adhocore/cli-syntax
===================

PHP Code Syntax Highlighter for CLI

v1.0.0(10mo ago)111281[1 issues](https://github.com/adhocore/php-cli-syntax/issues)MITPHPPHP &gt;=7.0.0

Since Dec 21Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/adhocore/php-cli-syntax)[ Packagist](https://packagist.org/packages/adhocore/cli-syntax)[ Fund](https://paypal.me/ji10)[ GitHub Sponsors](https://github.com/adhocore)[ RSS](/packages/adhocore-cli-syntax/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (7)Dependencies (2)Versions (9)Used By (0)

adhocore/cli-syntax
-------------------

[](#adhocorecli-syntax)

[![Latest Version](https://camo.githubusercontent.com/c839e62f741ad4e67ebee18cb7df483421f3f8a5fbcb11bf463f4697c06ed6c4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6164686f636f72652f7068702d636c692d73796e7461782e7376673f7374796c653d666c61742d737175617265)](https://github.com/adhocore/php-cli-syntax/releases)[![Travis Build](https://camo.githubusercontent.com/9dcac11e5a9341794cfead54561068ae8425688357a5c23897f7633ce5f6ed2a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f6164686f636f72652f7068702d636c692d73796e7461782e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.com/adhocore/php-cli-syntax?branch=master)[![Scrutinizer CI](https://camo.githubusercontent.com/d27de7df3d5ad161475ca6ea27475a51cca1be7d5792083af6e6de42a638841b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6164686f636f72652f7068702d636c692d73796e7461782e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/adhocore/php-cli-syntax/?branch=master)[![Codecov branch](https://camo.githubusercontent.com/dc7fdc2d715d2e49e8984084007cc9bcd039449f0afdb452e06ef9af4e625848/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6164686f636f72652f7068702d636c692d73796e7461782f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/adhocore/php-cli-syntax)[![StyleCI](https://camo.githubusercontent.com/11bb6792f98e259eff633f58fb2e056991a3d7cd8232756bc3f777d3a78f9700/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232393334383530342f736869656c64)](https://styleci.io/repos/229348504)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](./LICENSE)

```
        _   _          _
  ___  | | (_)  ___   | |__
 / __| | | | | / __|  '  _  \
| (__  | | | | \___ \ | | | |
 \___| |_| |_| |____/ |_| |_|

PHP CLI Syntax Highlight Tool
=============================

```

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

[](#installation)

### As phar binary

[](#as-phar-binary)

```
curl -SsLo ~/clish.phar https://github.com/adhocore/php-cli-syntax/releases/latest/download/clish.phar

chmod +x ~/clish.phar && sudo ln -s ~/clish.phar /usr/local/bin/clish
```

> Follow same steps to upgrade.

### As standalone binary

[](#as-standalone-binary)

```
composer global require adhocore/cli-syntax
```

> Follow same steps to upgrade.

### As project dependency

[](#as-project-dependency)

```
composer require adhocore/cli-syntax
```

Usage
-----

[](#usage)

### Shell command

[](#shell-command)

If you installed as binary following any of the above methods, then:

```
# you will be able to run it as
clish -h
clish -f file.php
echo '
