Skip to content

Installation

Installation

This guide will help you install AVD CLI on your system.


Prerequisites

Before installing AVD CLI, ensure you have:

  • Python 3.9 or higher installed on your system
  • pip or pipx for package installation
  • Basic familiarity with command-line tools

Installation Methods

pipx installs packages in isolated environments, preventing dependency conflicts.

# Install pipx if not already installed
python3 -m pip install --user pipx
python3 -m pipx ensurepath

# Install avd-cli
pipx install avd-cli

Why pipx?

pipx creates an isolated environment for each application, avoiding conflicts with other Python packages on your system.

Method 2.1: Using pip and Github repository

# Install from GitHub
pipx install git+https://github.com/titom73/avd-cli.git

Method 2.2: Using pip and Github repository

# Install from GitHub
pip install git+https://github.com/titom73/avd-cli.git

# Or install in a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install git+https://github.com/titom73/avd-cli.git

Method 3: From Source (Development)

For contributors or users who want the latest development version:

# Clone the repository
git clone https://github.com/titom73/avd-cli.git
cd avd-cli

# Install with UV (recommended for development)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --all-extras

# Or with pip
pip install -e .

Verify Installation

After installation, verify that AVD CLI is working:

# Check version
avd-cli --version

# Display help
avd-cli --help

Expected output:

Usage: avd-cli [OPTIONS] COMMAND [ARGS]...

  AVD CLI - A powerful tool for processing Arista AVD inventories

Options:
  --version   Show the version and exit.
  --help      Show this message and exit.

Commands:
  generate  Generate configurations, documentation, or tests
  info      Display inventory information
  validate  Validate inventory structure

Upgrading

With pipx

pipx upgrade avd-cli

With pip

pip install --upgrade git+https://github.com/titom73/avd-cli.git

Uninstallation

With pipx

pipx uninstall avd-cli

With pip

pip uninstall avd-cli

Dependencies

AVD CLI automatically installs the following core dependencies:

  • Click (≥8.1.0) - CLI framework
  • Rich (≥13.0.0) - Terminal output formatting
  • PyYAML (≥6.0) - YAML parsing
  • Jinja2 (≥3.0.0) - Template engine
  • pyavd (≥4.0.0) - Arista AVD library

Next Steps

Now that AVD CLI is installed, you can:


Troubleshooting

Command not found

If you get a command not found error after installation:

  1. With pipx: Ensure pipx’s bin directory is in your PATH:
python3 -m pipx ensurepath
# Then restart your terminal
  1. With pip: If installed with --user, ensure your user’s bin directory is in PATH:
export PATH="$HOME/.local/bin:$PATH"
# Add this to your ~/.bashrc or ~/.zshrc for persistence

Permission Errors

If you encounter permission errors:

# Use --user flag with pip
pip install --user git+https://github.com/titom73/avd-cli.git

# Or use a virtual environment
python3 -m venv venv
source venv/bin/activate
pip install git+https://github.com/titom73/avd-cli.git

Python Version Issues

Ensure you’re using Python 3.9 or higher:

python3 --version

If your default Python is older, you may need to install a newer version or use python3.9, python3.10, etc. explicitly.


Need Help?

If you encounter issues during installation, please: