Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 1.96 KB

File metadata and controls

67 lines (48 loc) · 1.96 KB

Webex CLI

A CLI tool for Webex Calling and Contact Center APIs.

Project Layout

  • Go CLI at repo root (main.go, cmd/, internal/)
  • codegen/ — Python scripts that generate cmd/calling/*.go and cmd/cc/*.go from Postman collections
  • site/ — Astro Starlight docs site for GitHub Pages
  • skill/ — Sample Claude Code skill for using the CLI

Code Generation Pipeline

The files in cmd/calling/ and cmd/cc/ are generated — do not edit them by hand.

A Makefile orchestrates the pipeline. Key targets:

# Full pipeline (download + generate + build):
make refresh

# Regenerate from existing committed collections:
make codegen && make build

# Download collections only:
make download

No API key is required — collections are fetched from the Webex Public Workspace via Postman's public gateway.

Build

go build -o webex .

Releasing

Releases are handled by a GitHub Actions workflow triggered by pushing a tag. Do not run goreleaser locally — it requires secrets (e.g. WEBEX_CLIENT_ID) that are only available in CI.

git tag v0.X.0
git push origin v0.X.0
# Then set the release notes via gh:
gh release edit v0.X.0 --title "v0.X.0" --notes "## Improvements
* ..."

Module Path

github.com/Cloverhound/webex-cli — all Go imports use this path.

Key Files

  • cmd/root.go — Root cobra command, global flags
  • cmd/auth.go — Auth subcommand (status, list, switch)
  • cmd/login.go / cmd/logout.go — OAuth flow
  • internal/auth/ — Token storage (keyring), OAuth, org resolution
  • internal/client/ — HTTP client, request builder, pagination
  • internal/config/ — Config file (~/.webex-cli.yaml)
  • internal/output/ — JSON/table/raw output formatting
  • codegen/extract_api_outline.py — Postman → normalized CLI names
  • codegen/extract_api_spec.py — Postman → enriched API spec (params, body fields)
  • codegen/generate_cli.py — API spec → Go cobra command files