Go CLI for the Five9 SOAP Admin API, using Cobra. Modeled after ../webex-cli.
Files in cmd/ are auto-generated by codegen/generate_cli.py — never edit them by hand.
They have a comment at the top of each file confirming this.
To regenerate after changing the spec or codegen:
python3 codegen/extract_api_spec.py # Parse docs → codegen/five9_api_spec.json
python3 codegen/generate_cli.py # JSON spec → cmd/*.go
go build -o five9 . # Buildcodegen/extract_api_spec.py— parsesdocs/scrape/*.mdintocodegen/five9_api_spec.jsoncodegen/generate_cli.py— generatescmd/*.gofrom speccmd/reports.go— has a hand-writtenrun-and-waitcomposite command (also generated, but with custom logic)cmd/custom_prompts.go— hand-writtenprompts uploadandprompts replacecommands (WAV file upload via base64-encoded SOAP inline methods)
- SOAP API (not REST) — endpoint:
https://api.five9.com/wsadmin/v14/AdminWebService - HTTP Basic auth — credentials stored in OS keyring via
internal/auth/keyring.go - SOAP client —
internal/soap/(envelope builder, XML→JSON parser, fault handling) - Output formatting —
internal/output/output.go(json/table/csv/raw)
tablewriterpinned to v0.0.5 (v1.x has breaking API changes)go-keyringfor OS credential storagecobrafor CLI framework
- Pattern parameters (e.g.
--group-name-pattern) default to".*"so list commands work without requiring the flag. - CLI command groups map 1:1 to generated
cmd/*.gofiles (21 groups, ~181 SOAP methods).