SIE scripts by language
The recipes are organised by the problem they solve. These pages are organised by the tool you write in. Each one says what the language or framework is good for, how to install it so the web user can run it, how the rConfig command looks, and gives a short script that follows the same rules as every recipe: config to stdout, everything else to stderr, ERROR: and exit 1 on failure, and an SIE-OK: line at the end.
Languages
| Page | Good for | Extra install |
|---|---|---|
| Bash | A few read-only commands over SSH keys, gluing tools together | None |
| Expect | Interactive logins, menus, pagers, serial consoles | expect package |
| Python | APIs, JSON, XML and anything with real logic | None for the standard library |
| Perl | Keeping existing Perl tooling, heavy text handling | Perl modules from your OS packages |
| PowerShell | Teams that already script in PowerShell, Windows and Microsoft APIs | PowerShell 7 for Linux |
| Node.js | Teams that already write JavaScript, JSON APIs | Node.js 18 or later |
| Go | A single compiled program with no runtime to install | Build tools on a build machine only |
Frameworks and protocols
| Page | Good for | Built on |
|---|---|---|
| HTTP APIs: curl and requests | REST APIs from a shell script or Python | curl and jq, or Python requests |
| Netmiko | SSH CLIs across a long list of platforms, with login quirks handled | Python |
| Scrapli | Fast SSH CLI collection that uses the system’s own SSH client | Python |
| NAPALM | One call to get a config from several vendors, with an option to hide secrets | Python |
| NETCONF with ncclient | Structured XML configs from NETCONF devices | Python |
Choosing
- Start with what your team already maintains. A script nobody else can read is a script nobody else can fix.
- Prefer fewer dependencies. A standard-library Python or plain Bash script keeps working when the server is upgraded. Every library is something to reinstall and retest.
- Use a framework when it saves real work. Netmiko, Scrapli and NAPALM already deal with prompts, pagers and privilege levels for hundreds of platforms. Writing that yourself in Expect is slower and more fragile.
Whatever you choose, read get your server ready for scripts first. It covers where scripts and keys live and how to test as the web user.