Hier Config CLI¶
A powerful command-line interface tool for network configuration analysis, remediation, and rollback built on top of the Hier Config library.
Overview¶
hier-config-cli helps network engineers analyze configuration differences, generate remediation commands, prepare rollback procedures, and predict configuration states across multiple network platforms. It's an essential tool for network automation workflows, change management, and configuration compliance.
Key Features¶
- Remediation Generation: Automatically generate commands to transform running config into intended config
- Rollback Planning: Create rollback procedures before making changes
- Future State Prediction: Preview the complete configuration after applying changes
- Multi-Platform Support: Works with Cisco, Juniper, Arista, HP, Fortinet, VyOS, and more
- Multiple Output Formats: Export as text, JSON, or YAML
- Type-Safe: Fully typed Python code with mypy support
- Well-Tested: Comprehensive test suite with high code coverage
- Detailed Logging: Verbose and debug modes for troubleshooting
Use Cases¶
Change Management¶
Before applying configuration changes to network devices, use hier-config-cli to:
- Generate the exact commands needed for remediation
- Create rollback procedures in case of issues
- Preview the final configuration state
- Document changes for approval workflows
Configuration Compliance¶
Ensure network devices match their intended configurations:
- Compare running configs against golden configs
- Identify configuration drift
- Generate remediation to bring devices into compliance
Network Automation¶
Integrate with your automation tools:
- CI/CD Pipelines: Validate configuration changes in pull requests
- Nornir: Scale configuration analysis across hundreds of devices
- Ansible: Generate dynamic remediation playbooks
Quick Example¶
# Generate remediation commands
hier-config-cli remediation \
--platform ios \
--running-config running.conf \
--generated-config intended.conf
# Output:
# === Remediation Configuration ===
# no hostname router-01
# hostname router-01-updated
# interface GigabitEthernet0/0
# description WAN Interface - Updated
Get Started¶
Ready to dive in? Check out the Installation guide and Quick Start tutorial.
Links¶
- GitHub: netdevops/hier-config-cli
- PyPI: hier-config-cli
- Issues: Report a bug
- Hier Config Library: netdevops/hier_config
Acknowledgments¶
Built on top of the excellent Hier Config library by James Williams and contributors.