feat: complete professional cli with full lifecycle and tests

This commit is contained in:
Fredrick Amnehagen 2026-02-05 11:37:29 +01:00
parent a7d97227d3
commit 34ba255024
12 changed files with 112 additions and 9 deletions

46
README.md Normal file
View file

@ -0,0 +1,46 @@
# LoopAware Infrastructure CLI
Professional CLI tooling for managing dynamic infrastructure resources (DNS, DHCP, Ingress, and Port Forwarding).
## Features
- **DNS/DHCP:** Manage `dnsmasq` reservations and custom records on `la-dnsmasq-01`.
- **Ingress:** Manage HAProxy subdomains and backend routing.
- **Router:** Manage OpenWrt firewall redirects.
- **Agent-Friendly:** Designed for use by AI agents and developers.
## Installation
```bash
cd external/dynamic-infra-tooling
pip install -e .
```
## Configuration
Copy `config.yaml.example` to `config.yaml` and update with your infrastructure details.
```bash
cp config.yaml.example config.yaml
```
## Usage
Use the `infra` command:
```bash
# List DNS entries
infra dns list
# Add an ingress
infra ingress add my-app.loopaware.com 10.32.70.50 80
# Add a port forward (requires ROUTER_PASS env var)
export ROUTER_PASS='...'
infra router add "My-Service" tcp 5000 10.32.70.50 5000
```
## Testing
```bash
pytest tests/test_cli.py
```