Installation as library

First off, you need to have at least PHP 7.3, and composer installed, and then you can install KeyLighter into your project by simply executing:

$ composer require kadet/keylighter

And include composers autoloader somewhere in your code:

require 'vendor/autoload.php'

And that's it. Technically it is possible to use KeyLighter without composer, but then you'd have to setup your own auto loading that is compatible with PSR-4 which I don't recommend.

Using KeyLighter as CLI tool

It's also possible to use KeyLighter as CLI tool for displaying highlighted code right in your console window. The easiest way of doing so is to download keylighter.phar file from this site, and then you can use it like so:

$ php keylighter.phar [highlight] [-l|--language [LANGUAGE]] [-f|--format [FORMAT]] [--] <file> <file2>...