A comprehensive Python-based network automation tool that connects to network devices, collects detailed information, analyzes configurations, and generates professional documentation reports suitable for network audits, compliance, and operational reference.
- Multi-Vendor Support: Cisco IOS/IOS-XE/NX-OS, Aruba ArubaOS-Switch/ArubaOS-CX, HP ProCurve, and extensible for other vendors
- Subnet Discovery: Automatically discover devices on a network subnet
- Dynamic Inventory: Scan subnets without pre-configured inventory files
- Parallel Collection: Concurrent data collection from multiple devices
- Comprehensive Analysis: Security analysis, configuration checks, and best practices validation
- Multiple Report Formats: HTML, Excel, and Markdown reports
- Configuration Backup: Automatic configuration backup with version control
- Configuration Comparison: Track and compare configuration changes over time
- Secure Credential Management: Encrypted storage of device credentials
- Python 3.8 or higher
- Network access to devices
- SSH credentials for devices
- Clone the repository:
git clone https://github.com/netdocai/netdocai.git
cd netdocai- Install dependencies:
pip install -r requirements.txt- Install NetDocAI:
pip install -e .- Copy the environment template:
cp .env.example .env- Generate an encryption key:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"-
Edit
.envand add your encryption key and default credentials -
Create your device inventory in
config/devices.yamlOR use subnet discovery
# Discover devices and save to inventory file
netdocai discover --subnet 172.0.66.0/24 --username cisco --password cisco --enable-secret cisco
# Discover and scan in one command
netdocai scan --subnet 172.0.66.0/24 --username cisco --password cisco --enable-secret cisconetdocai scan --inventory config/devices.yaml --output ./reportsnetdocai compare --device core-sw-01 --old 20240101_120000 --new latest# HTML and Excel reports
netdocai scan --inventory config/devices.yaml --format html --format excel
# HTML only
netdocai scan --inventory config/devices.yaml --format htmlNetDocAI generates comprehensive reports including:
- Executive Summary: High-level overview with statistics and health scores
- Device Inventory: Complete list of all network devices
- Individual Device Reports: Detailed information for each device
- Device information and specifications
- Interface details and status
- Routing configuration
- VLAN information
- Security configuration
- Analysis results and recommendations
devices:
- hostname: core-sw-01
ip_address: 192.168.1.10
device_type: cisco_ios
username: admin
location: Data Center
role: Core Switchconnection:
timeout: 30
max_workers: 10
output:
directory: ./reports
backup_directory: ./backups
logging:
level: INFO
file: ./logs/netdocai.logNetDocAI/
βββ netdocai/
β βββ collectors/ # Device connection and data collection
β βββ parsers/ # Output parsing and data models
β βββ analyzers/ # Configuration analysis
β βββ reporters/ # Report generation
β βββ storage/ # Data persistence
β βββ utils/ # Utilities and helpers
β βββ cli/ # Command-line interface
βββ config/ # Configuration files
βββ templates/ # Report templates
βββ tests/ # Test suite
βββ docs/ # Documentation
- Credentials are encrypted using Fernet encryption
- SSH key-based authentication supported
- Read-only access to devices recommended
- Sensitive data sanitized in reports
- Audit logging for all actions
- User Guide - Detailed usage instructions
- Configuration Guide - Configuration options
- API Documentation - Python API reference
Run tests with pytest:
pytest tests/ -vContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Netmiko for multi-vendor SSH connections
- Uses TextFSM for parsing network device outputs
- Report generation powered by Jinja2
For issues and questions:
- GitHub Issues: https://github.com/netdocai/netdocai/issues
- Documentation: https://netdocai.readthedocs.io
- Web UI dashboard
- Additional vendor support (Juniper, Arista, HP)
- Network topology visualization
- Compliance framework (CIS, PCI-DSS, NIST)
- Integration with ServiceNow, Slack
- ML-based anomaly detection
- Multi-tenancy support
NetDocAI - Making network documentation effortless