A Python-based CLI tool for managing network configurations with features like command completion, error handling, and configuration management.
- Command-line interface with auto-completion
- Configuration management (running and candidate configs)
- Static route configuration
- Interface management
- Error handling and validation
- FRR configuration rendering
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/CLI.git
cd CLI
- Install dependencies:
pip install -r requirements.txt
Run the CLI tool:
python configCli.py
show running
- Display running configurationshow candidate
- Display candidate configurationset protocols static route <prefix> next-hop <address>
- Set a static routedelete protocols static route <prefix>
- Delete a static routecommit
- Apply candidate configurationdiscard
- Discard candidate configuration
.
├── configCli.py # Main CLI application
├── cli_common.py # Common CLI utilities
├── validators.py # Input validation functions
├── suggestors.py # Interface suggestion functions
├── renderers/ # Configuration renderers
│ ├── static.py # Static route renderer
│ └── frr.conf.j2 # FRR configuration template
├── config.json # Command structure configuration
└── commands.json # Command definitions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.