A command-line interface for processing Arista AVD inventories and generating configurations, documentation, and ANTA tests using pyavd.
Important
Personal Project Notice
This project (avd-cli) is a personal project and is not an official development of the Arista AVD team or Arista Networks. It is maintained independently and is not endorsed, supported, or affiliated with Arista Networks, Inc.
For official AVD tools and support, please visit avd.arista.com.
- 🔧 Configuration Generation: Generate EOS device configurations using pyavd
- 📚 Documentation Generation: Create comprehensive network documentation in Markdown
- 🧪 ANTA Test Generation: Generate ANTA test catalogs for network validation
- 🚀 Configuration Deployment: Deploy configurations to EOS devices via eAPI with diff statistics
- ⚡ Lightning fast generation: Generate configurations, documentation and tests way faster than ansible (
1.28secfor 10 hosts compare to3secwith Ansible) - 🌐 Multi-Fabric Support: Process multiple network fabrics with variable inheritance
- 🔧 Rich Terminal Experience: Beautiful CLI with progress bars and formatted output
# Using pipx (recommended)
pipx install avd-cli
# Or using pip
pip install avd-cli- Build AVD artifacts for the entire fabric
# Generate all outputs (configs, documentation, ANTA tests)
# Default output: ./examples/atd-inventory/intended/
avd-cli generate all --inventory-path ./examples/atd-inventory
→ Loading inventory...
✓ Loaded 10 devices
ℹ Using default output path: examples/atd-inventory/intended
→ Generating configurations, documentation, and tests...
✓ Generation complete!
Generated Files
┏━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Category ┃ Count ┃ Output Path ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Configurations │ 10 │ examples/atd-inventory/intended/configs │
│ Documentation │ 10 │ examples/atd-inventory/intended/documentation │
│ Tests │ 2 │ examples/atd-inventory/intended/tests │
└────────────────┴───────┴─────────────────────────────────────────────────┘- Deploy configurations to EOS devices using eAPI
# Deploy configurations to EOS devices
avd-cli deploy eos --inventory-path ./examples/atd-inventory --dry-run --diff
Deployment Plan (dry-run)
Mode: replace
Targets: 10 devices
Concurrency: 10 devices
⠼ Deploying to 10 devices...
Deployment Status
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━┓
┃ Hostname ┃ Status ┃ Duration ┃ Diff (+/-) ┃ Error ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━┩
│ spine01 │ success │ 2.34s │ +127 / -5 │ │
│ spine02 │ success │ 1.89s │ +127 / -5 │ │
│ leaf-1a │ success │ 3.12s │ +245 / -12 │ │
│ ... │ ... │ ... │ ... │ │
└────────────────┴─────────┴──────────┴────────────┴───────┘Use avd-cli generate topology containerlab to emit a Containerlab topology from an
AVD inventory for network testing and simulation. The command automatically:
- Auto-names topology from inventory directory basename (e.g.,
eos-design-basics) - Generates management network section with auto-computed IPv4 subnet encompassing all device IPs
- Creates nodes as
kind: ceoswithmgmt-ipv4fromansible_host - Computes dynamic hierarchy via uplink analysis for proper graph visualization
- Builds network links from two sources:
- Ethernet interfaces: Links where both
peerandpeer_interfaceare defined inethernet_interfaces - AVD uplink topology: Links from
l3leaf/l2leafstructures usinguplink_interfaces,uplink_switches, anduplink_switch_interfaces
- Ethernet interfaces: Links where both
Links are automatically deduplicated. Startup configuration paths are computed as
relative paths from the topology file (e.g., ../configs/hostname.cfg), ensuring
portability. By default, configs are expected in <output-path>/configs/, customizable
with --startup-dir.
The generated topology file uses .clab.yml extension (e.g., <topology-name>.clab.yml)
following Containerlab naming conventions, enabling CLI auto-discovery features. The format
complies with the official Containerlab topology definition.
Example:
# Generate configs and topology (auto-named from inventory path)
avd-cli generate configs -i ./eos-design-basics -o ./output
avd-cli generate topology containerlab -i ./eos-design-basics -o ./output
# Creates: ./output/containerlab/eos-design-basics.clab.yml
# Deploy with Containerlab
cd ./output/containerlab
sudo containerlab deploy -t eos-design-basics.clab.yml
# Or use auto-discovery (Containerlab finds .clab.yml files)
cd ./output/containerlab
sudo containerlab deployComplete documentation is available at titom73.github.io/avd-cli
Core Dependencies:
- Arista Networks AVD - AVD collection and pyavd library
- Arista Networks ANTA - ANTA Framewaork for network testing
- Click - Elegant CLI framework
- Rich - Beautiful terminal formatting
- pytest - Comprehensive testing framework
- UV - Fast Python package management
Community: Special thanks to the Arista AVD community and all contributors making network automation accessible and reliable.
Contributions are welcome! Please read CONTRIBUTING.md for detailed guidelines.
make ciThis ensures all linting, type checking, and tests pass locally before CI runs on GitHub.
This project is licensed under the Apache License 2.0.