hl

fancy pants syntax highlighting for the CLI

ISC License

Downloads
61
Stars
36
Committers
2

hl

Use Atom's syntax-highlighter from the command line.

npm install hl -g

Provides syntax highlighting for:

  • CPP
  • JavaScript
  • JSON
  • Makefile
  • Markdown
  • ObjectiveC
  • Python
  • Ruby

Open an issue or pull-request if we're missing a language you'd like to see!

Usage

hl index.js
hl main.rb
hl foo.m
hl package.json

You can also use unix pipes:

cat index.rb | hl --extension=rb --pipe

API

var hl = require('hl')
var out = hl('index.js', {
  numeric: 'yellow'
})
console.log(out)

License

ISC

Package Rankings
Top 12.03% on Npmjs.org
Badges
Extracted from project README
Coverage Status NPM version