Cisco-style interactive CLI for the Meraki Dashboard API, with hierarchical context switching (org / network / device) and show commands generated from OpenAPI GET operations.
pip install -e ".[dev]"Requires Python 3.10+.
# PowerShell
$env:MERAKI_DASHBOARD_API_KEY = "your-key"
# bash
export MERAKI_DASHBOARD_API_KEY=your-keyOr inside the shell:
mersh# set api-key <key>
mersh# save
Config is stored at ~/.mersh/config.json (override with MERSH_CONFIG).
mersh
# or
python -m mershmersh# show organizations
mersh# org 123456
mersh-Org-123456# show networks
mersh-Org-123456# network N_abc
mersh-Org-123456-Net-N_abc# show
mersh-Org-123456-Net-N_abc# device Q2XX-YYYY
mersh-Org-123456-Net-N_abc-Dev-Q2XX-YYYY# show clients
mersh-Org-123456-Net-N_abc-Dev-Q2XX-YYYY# exit
mersh-Org-123456-Net-N_abc# end
mersh#
Context navigation:
| Command | Effect |
|---|---|
org <id> |
Enter org context; prompt becomes mersh-Org-<id># |
network <id> |
Enter network context (from org) |
device <serial> |
Enter device context |
exit |
Pop one context level (from root: quit) |
end |
Return to root context |
GET operations map to show ... in the matching context (path params owned by the context are implicit). Non-GET operations remain as camelCase operationId commands in that context. Extra key=value tokens become query/body kwargs.
One-shot:
mersh -c "show organizations"
mersh -c "org 123456" -c "show networks"python -m mersh.generate
# or
mersh-generate
# Org-specific / Early Access:
python -m mersh.generate -o ORG_ID -k YOUR_API_KEYArtifacts:
src/mersh/data/cli_commands.json— multi-context command trees (root/org/network/device)src/mersh/data/operations.json— param + context metadata forexec_api
Manual overlays:
src/mersh/cli/commands_manual.json— root navigation (org,device,set api-key, …)src/mersh/cli/commands_contexts.json— per-contextexit/end/network/device
pytest