danielmacuare / netcli-highlight

Syntax Highlighter for Juniper/Cisco/Arista CLI (Via SSH)
GNU General Public License v3.0
90 stars 19 forks source link

netcli-highlight

TLDR: This repo will help you to make use of syntax highlighting on Live Network devices. (Juniper/Cisco/Arista)

TOC

What's this about?

If you have ever used the CLI on network devices, you probably have ended up frustrated trying to make sense of the long lines of configuration. Although nowadays the use of editors like vim/Sublime/Vscode/Atom can provide some really useful syntax highlighting, you still can find yourself struggling to read the config files or outputs while you are on live devices.

Here we have a Juniper SRX firewall policy. This rule is comprised by source/destination/application/actions, if you need to read one of them it's alright but if your output has you reading over 10 rules you can see how difficult is to differentiate each component.

Junos FW Rule

Wouldn't be nice to have some live syntax highlight to differentiate each component and quickly find what you are looking for? Something like...

Junos Colored FW Rule

If you are like me, fascinated by the concept of marginal gains, this guide will help you to work more efficiently in the CLI.

The purpose of this repo is to give you an idea of the power of having syntax highlighting while working on live devices. This is not by any means a full-blown syntax highlighting solution but a way to show you how you can take advantage of it and adapt it to your needs.

Note: The default color code has been tested using a Dark terminal Background as you can see in the images above

Use-cases

Benefits

Pre-requisites

Usage

Limitations

Special Thanks

Thanks to hSaria for creating Chromaterm which is used as a based for this tool.