Skip to content

Script Library

Script Library

Production-Ready Automation for Cisco Infrastructure

This is the Nautomation Prime Script Library: the production-grade, hardened Python tools I have built for enterprise Cisco estates. Each one has a free deep dive that explains exactly how it works.

Free and open source

Every tool here is released under the Apache License 2.0. Get them on GitHub and use, change and share them however you like. If you want a tool tailored, deployed or extended for your estate, I do that as paid work, on contract or as a fixed-scope project.

Python Prerequisite

This site focuses on applying Python to network automation. I assume familiarity with core Python concepts (variables, functions, loops, exceptions, and file I/O). If you're new to Python, complete a fundamentals course first, then return here.


πŸ“š Available Scripts

CDP Network Audit Tool

Status: βœ… Free and open source (Apache 2.0) Description: A threaded discovery utility that starts from seed Cisco devices and crawls the network using Cisco Discovery Protocol (CDP), producing structured Excel reports with professional formatting.

Features:

  • Parallel discovery with configurable worker pool (via config.py or environment variable overrides)
  • Centralised configuration with comprehensive config.py (200+ documented settings)
  • Two-tier authentication (primary user with customisable fallback username)
  • Jump server / bastion support (Paramiko channel + Netmiko sock)
  • DNS enrichment for discovered hostnames
  • Excel reporting from pre-formatted templates with multiple sheets
  • Hybrid logging with optional logging.conf
  • Up to 3 automatic retries for transient connectivity issues
  • Comprehensive error tracking (authentication failures, connection errors)
  • Extensive customisation options (credentials, paths, Excel formatting, DNS, logging, and more)

πŸ“– View Deep Dive Documentation | πŸ’» Get it on GitHub


Access Switch Port Audit Tool

Status: βœ… Free and open source (Apache 2.0) Description: A production-hardened collector designed to map interface health and utilisation across your access layer.

Features:

  • Parallel device SSH connections for high-speed audits
  • Conservative "Stale Port" detection logic using PoE, neighbours, and input timers
  • Multi-source port classification (Access vs. Trunk vs. Routed)
  • Professional Excel workbooks with automated conditional formatting
  • Full Jump-Host (Bastion) integration for restricted environments

πŸ“– View Deep Dive Documentation | πŸ’» Get it on GitHub


Cisco IOS-XE Compliance Audit

Status: βœ… Free and open source (Apache 2.0) Description: A policy-driven compliance auditor with 90+ role-aware checks, automated remediation generation, and multi-format reporting for enterprise Cisco switches.

Features:

  • Split YAML config directories plus separate inventory for reusable policy
  • Role-aware port classification (uplink, downlink, access, routed, unused)
  • 90+ toggleable checks across management, control, and data planes
  • Multi-format reporting (HTML dashboards, JSON, CSV, remediation scripts)
  • Severity/tag filtering with a governed remediation lifecycle
  • Interactive operator modes with approval-governed change execution
  • Jump host / bastion support for restricted environments
  • Concurrent device auditing for large-scale operations

πŸ“– View Deep Dive Documentation | πŸ’» Get it on GitHub


Cisco Config Generator

Status: βœ… Free and open source (Apache 2.0)
Description: Turns structured Excel intent into per-device Cisco IOS-XE configuration files using a reusable Python core and Jinja2 templates, with a validation-first workflow and a pack architecture that keeps customer rules in data and templates rather than hardcoded logic.

Features:

  • Intent modelling via a structured Excel workbook
  • Validation-first processing before any rendering
  • Template-driven Jinja2 rendering with a reusable core engine
  • Pack architecture that separates policy-as-data from logic
  • Dual execution modes (interactive TUI and headless CLI)
  • Deterministic per-device Cisco IOS-XE configuration output

πŸ“– View Deep Dive Documentation | πŸ’» Get it on GitHub


Cisco IOS-XE Software Upgrade Orchestrator

Status: βœ… Free and open source (Apache 2.0) Description: A production-grade Python CLI that coordinates multi-device IOS-XE software upgrades with persistent checkpoints, strict safety gates, and deterministic recovery for high-consequence maintenance windows.

Features:

  • Durable state engine with resumable, checkpointed runs
  • Canary and topology-aware batching
  • Install-mode-only upgrade policy
  • pyATS/Genie pre- and post-change comparison gates
  • Explicit handling of partial success and restart recovery

πŸ“– View Deep Dive Documentation | πŸ’» Get it on GitHub


🧭 Learning Paths

Unsure where to start? These learning paths connect scripts to tutorials and deep dives based on your experience level:

πŸ“– Beginner Path

Start here if you're new to network automation:

  1. Learn Python fundamentals (external resources)
  2. Read Multi-Device Show Command Collection β€” learn Netmiko basics
  3. Try Configuration Backup Tutorial β€” understand backup patterns
  4. Explore the CDP Network Audit Deep Dive β€” see how threading and configuration work at scale

πŸ› οΈ Intermediate Path

Ready to understand production patterns:

  1. Read Nornir Fundamentals β€” multi-device automation framework
  2. Read Enterprise Config Backup with Nornir β€” scalable patterns
  3. Study Access Switch Audit Deep Dive β€” parallel collection and intelligent parsing
  4. Study CDP Network Audit Deep Dive β€” threading, configuration, and jump hosts

πŸš€ Advanced Path

Ready to build custom solutions:

  1. Review all Deep Dives for architectural patterns
  2. Study Cisco Compliance Audit Deep Dive β€” policy-driven compliance with remediation generation
  3. Read the PRIME Framework for how I take automation from idea to team ownership
  4. Want a tool deployed in your estate? See Work With Me

πŸ”„ Coming Soon

Zero Touch Provisioning (ZTP) Tool

Status: 🚧 In Development
Description: Automated deployment solution for Cisco devices that streamlines initial configuration and reduces deployment time from hours to minutes.

Planned Features:

  • Automated device configuration from templates
  • DHCP option integration for network-based provisioning
  • Email notifications for deployment status and errors
  • HTTP server integration for configuration and log file management
  • Pre-flight validation and rollback capabilities
  • Multi-device orchestration with dependency management
  • Comprehensive logging with remote log collection

Current Status: Core functionality tested and validated. Additional features (email notifications, HTTP log server integration) under active development.


πŸ› οΈ Getting Started with Scripts

Prerequisites

  • Python 3.10+
  • Netmiko or equivalent SSH library
  • Network access to target devices
  • Appropriate credentials/permissions

Installation & Setup

Each tool lives in its own GitHub repository with a README and setup instructions. The typical workflow:

# Clone the tool's repository
git clone https://github.com/Nautomation-Prime/<tool-repo>.git
cd <tool-repo>

# Install dependencies
pip install -r requirements.txt

# Run with --help to see options
python main.py --help

Credential Management

Scripts use your operating system's native credential manager for secure authentication:

  • Windows: CDP Network Audit prompts you to save credentials to Windows Credential Manager on first run. Enter your username and password when prompted, and the script will store them securely. Future runs use the stored credentials automatically.
  • macOS: Credentials are stored in Keychain - Upcoming
  • Linux: Credentials are stored in pass or similar managers - Upcoming

Credentials are never stored in plaintext files or hardcoded in scripts.

Each repository's README covers platform-specific instructions.

Configuration

All scripts follow the Nautomation Prime philosophy of transparency and security:

  • Credentials are stored in OS credential managers (Windows Credential Manager, etc.)
  • Configuration files are well-documented with inline comments.
  • Pre-flight validation checks prevent unsafe deployments.

Support & Questions

For issues, feature requests, or questions about any script:

  • Check the Deep Dives documentation for detailed explanations.
  • Raise an issue on the tool's GitHub repository.
  • For tailoring or deployment in your estate, see Work With Me.

Need one of these tools working in your environment?

The tools are free. If you want one adapted, deployed, or rolled out across a live estate, I do that as paid work, on contract or as a fixed-scope project.


Resources by Topic

Quick access to find what you need:

Topic Resources
Network Discovery πŸ“– CDP Network Audit Deep Dive β€’ πŸ’» GitHub
Port & Interface Health πŸ“– Access Switch Audit Deep Dive β€’ πŸ’» GitHub
Compliance & Governance πŸ“– Cisco Compliance Audit Deep Dive β€’ πŸ’» GitHub
Configuration Management πŸŽ“ Configuration Backup (Beginner) β€’ πŸŽ“ Enterprise Backup with Nornir (Intermediate)
Data Collection & Reporting πŸŽ“ Show Commands to Excel (Beginner) β€’ πŸŽ“ Multi-Device Collection (Beginner)
Automation Frameworks πŸŽ“ Nornir Fundamentals β€’ πŸ“– Advanced Patterns
Automation Methodology πŸš€ PRIME Framework β€’ ℹ️ Philosophy & Approach

Between the Lines

In martial practice a kata is a form rehearsed until it no longer needs deciding. The value was never the movement itself; it is the attention freed up once the movement has become reliable.

A script library is that idea written down. A tool is only worth having when it gives the same careful result on the hundredth run as on the firstβ€”and the reward for that is not speed. It is one less thing occupying you.

The "Prime" Philosophy

All scripts in this library adhere to three core principles:

  1. Line-by-Line Transparency - Every function is documented, every decision explained
  2. Hardened for Production - Robust error handling, security best practices, pre-flight checks
  3. Vendor-Neutral - Built on industry-standard libraries like Netmiko, Nornir, and TextFSM

Mission: To empower network engineers through the PRIME Frameworkβ€”delivering automation with measurable ROI, production-grade quality, and sustainable team capability built on the PRIME Philosophy of transparency, measurability, ownership, safety, and empowerment.