Repository navigation
v0.1.0 — first release
First release: Pygments lexers for seven network operating system command
line interfaces, registered through the pygments.lexers entry point group
so MkDocs, Sphinx and pygmentize pick them up on install.
pip install pygments-switch-cliPlatforms
| Platform | Aliases |
|---|---|
| Arista EOS | eos, arista, arista-eos, aristaeos |
| Cisco NX-OS | nxos, nx-os, cisco-nxos, nexus |
| Dell SmartFabric OS10 | os10, dell-os10, dellos10, smartfabric |
| Cumulus Linux NCLU | nclu, cumulus, cumulus-nclu, net-commands |
| Cumulus Linux NVUE | nvue, nv, cumulus-nvue |
| SONiC | sonic, sonic-cli |
| FRRouting | frr, frr-conf, vtysh, frrouting |
Added
- A shared token scheme across all seven lexers, so one stylesheet themes
every platform and a reader learns one set of colors. - Line-oriented lexing, so the same word reads as a context keyword in
vlan 100and an option keyword inswitchport access vlan 100. - Recognition of pasted device prompts in both network
(leaf1(config-if-Et1)#) and Linux (cumulus@leaf01:~$) styles. analyse_textimplementations, soguess_lexercan identify a config from
platform markers such asfrr version,vlt-domainorswitchname.- Documentation with a live example per platform:
https://jeburks2.github.io/pygments-switch-cli/
Disclaimer: this project is 100% AI-generated. Every line of code, test
and documentation was written by Claude Opus 5 (Anthropic). It has an
automated test suite and CI across Python 3.9–3.14 and PyPy, but it has not
been reviewed line by line by a human. Please report anything it gets wrong.
🤖 Generated with Claude Code