Auto-generated CLI for the wxc_sdk Webex SDK
Project description
wxc-cli
Auto-generated CLI for wxc_sdk — every API endpoint is
a command, wired up at startup by introspecting WebexSimpleApi.
Install
pip install wxc-cli
The tool does not work with Python 3.14. To install in a venv with a different Python version:
pipx install wxc-cli --python python3.13
Or from source:
git clone ...
pip install -e .
Auth
export WEBEX_ACCESS_TOKEN="your-token-here"
# or pass it per-command:
wxc-cli --token YOUR_TOKEN people list
Usage
wxc-cli --help # list all command groups
wxc-cli people --help # list people commands
wxc-cli people list --display-name Bob # filter by name
wxc-cli people list --output json # JSON output
wxc-cli people details --person-id Y2l… # single person
wxc-cli telephony callqueue --help # nested sub-APIs work too
The wxc_sdk supported endpoint list serves as a reference for the available commands.
If for example the wxc_sdk reference has an endpoint api.person_settings.forwarding.read then wxc-cli
supports wxc-cli person-settings forwarding read and
wxc-cli person-settings forwarding read --help gives you an overview of the supported parameters.
The endpoint names in the
wxc_sdk supported endpoint list are
links to the actual function definitions for the respective endpoint.
For example,
this is the
documentation for the api.person_settings.forwarding.read endpoint which helps to understand the CLI parameters.
Note: The SDK uses snake-case names for endpoints and the CLI kebab-case names for commands.
Output formats
Every command accepts --output table (default), --output json, --output csv, or --output raw.
wxc-cli rooms list --output json | jq '.[].title'
Pydantic model inputs
Methods that take a Pydantic model (e.g. create, update) accept a --<param>-json flag:
wxc-cli people create \
--settings-json '{"emails":["alice@example.com"],"display_name":"Alice"}'
Raw output
-o raw is clean stdout with no Rich markup, headers, or decoration.
| Situation | Output |
|---|---|
--fields person_id (single field) |
one bare value per line — directly pipeable |
--fields person_id,display_name (multiple) |
tab-separated, one record per line |
no --fields |
all non-None fields, tab-separated |
list[scalar] or nested model in a field |
JSON-encoded inline |
scalar return (bool, str, int) |
str(value) |
Typical shell patterns:
# Feed IDs into a loop
for id in $(wxc-cli people list --display-name Alice -o raw --fields person_id); do
wxc-cli people details --person-id "$id" --calling-data -o json
done
# Extract one field with cut/awk
wxc-cli rooms list -o raw --fields title,type | awk -F'\t' '$2=="direct" {print $1}'
# xargs
wxc-cli people list --display-name Alice -o raw --fields person_id \
| xargs -I{} wxc-cli person-settings forwarding read --entity-id {} -o json \
| jq '.call_forwarding.always'
# command substitution
wxc-cli people list --calling-data --fields display_name,emails \
--location-id $(wxc-cli locations list --name Hartford --fields location_id -o raw)
How it works
cli.py introspects WebexSimpleApi at import time:
- Each sub-API attribute (
.people,.telephony,.rooms, …) becomes a Typer command group. - Each public method becomes a command inside that group.
- The method's type-annotated parameters become
--optionflags — scalars directly, Pydantic models via--<n>-json. - Generator return types (list endpoints) are consumed fully and rendered as a Rich table or JSON array.
- Nested sub-APIs (e.g.
telephony.calls,telephony.callqueue) recurse into sub-groups automatically.
New endpoints added to wxc_sdk appear in the CLI with zero maintenance.
Shell completion
wxc-cli --install-completion # bash / zsh / fish
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wxc_cli-0.5.0.tar.gz.
File metadata
- Download URL: wxc_cli-0.5.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1ed00c5fab2657cfd9ac9a922a04c9e33c9c8abf542a96b114c85ed54cd6809
|
|
| MD5 |
93d334522e41bd6583f7b6166b00a5de
|
|
| BLAKE2b-256 |
dc663366113222c0338c1c2913895fd0c70e0e44a8c4501b1e7a4edeec53e7e2
|
File details
Details for the file wxc_cli-0.5.0-py3-none-any.whl.
File metadata
- Download URL: wxc_cli-0.5.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2ede7a077dd5ae9d230e5d25fcd18fde25b7cf6ad5cc435722c4d242c1ff16
|
|
| MD5 |
3874e3f71d6f73a3c9435bc3697c337f
|
|
| BLAKE2b-256 |
6338bc417124d287047f38732a187c5080b754d275c18592afd99270d2b8ac46
|