Syntax Highlighting for Cisco/Arista/Juniper CLI

netcli-highlight Repo

Syntax Highlighting for Cisco/Arista/Juniper CLI

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.

In this post, I would like to share a config that has helped me to work more efficiently in the CLI by providing some very useful syntax highlighting.


Next, you can see examples of the syntax highlighting:

Reading JunOS Firewall Rules

JunOS Security Policies Figure 1 - JunOS Firewall Rules

Reading Show ip bgp summary (Arista/Cisco)

EOS Show ip bgp summary Figure 2 - (EOS/IOS) show ip bgp summary

Show interfaces (Arista/Cisco/Juniper)

show interfaces Figure 3 - (EOS/IOS) show interfaces

Reading route-maps (EOS/IOS)

show route-maps Figure 4 - (EOS/IOS) show route-maps

Reading Prefix Lists

show prefix list Figure 5 - (EOS/IOS) Prefix Lists

How can I try this?

This setup uses a tool called chromaterm that basically matches some Regular Expressions and allows you to apply a style (Foreground/Background color) to the matched expression. It is super easy to use and read.

If you are interested in getting this config and information on how to use it, visit the following repository:

Repo: danielmacuare/netcli-highlight

Hope you find it as useful as I do.

Have a great day and stay safe during this COVID-19 madness.

This post is licensed under CC BY 4.0 by the author.