ocmo-cli
Command-line interface for the OCMO configuration service. A thin shell over
ocmo-sdk with a kubectl-shaped verb/noun grammar. The CLI
contains no API protocol logic of its own.
Distribution: PyPI name ocmo-cli · Python: 3.11+ · License: Apache-2.0
Pre-1.0.0: Pin ocmo-cli and ocmo-sdk to the same release as your OCMO API server.
Installation
Published package:
uv tool install ocmo-cli
# or
pipx install ocmo-cli
Monorepo development (from repository root):
uv sync --all-packages
uv run ocmo --help
Quick start
# Point at your server (saved to ~/.config/ocmo/config.yaml)
ocmo config set server https://ocmo.example.com
ocmo config set namespace prod
# Authenticate
ocmo auth login
# Use it
ocmo -n prod get config app/web
ocmo -n prod resolve app/web --cast json
ocmo -n prod ls tree app/
Configuration
Precedence (same model as kubectl):
command flag > OCMO_* env var > current context in ~/.config/ocmo/config.yaml > built-in default
Manage contexts:
ocmo config get-contexts
ocmo config use-context prod
ocmo config set server https://ocmo.example.com
ocmo config view
Output formats
-o, --output accepts: table (default on TTY), wide, json, yaml, name, raw,
jsonpath=<expr>.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Generic runtime failure |
| 2 | Usage error |
| 3 | Not found (404) |
| 4 | Auth / permission failure (401, 403) |
| 5 | Conflict (409) |
| 6 | Path locked (423) |
| 7 | Validation failure (422, 413) |
| 8 | Hook execution failure |
| 9 | Import/export verification failure |
| 10 | Resolve returned no output items (length: 0) |
| 130 | Interrupted |
Development
From repository root (workspace includes CLI and SDK):
uv sync --all-packages
uv run pytest cli/tests -q
uv run ruff check cli/
uv run mypy cli/ocmo_cli
Regenerate the command tree from the SDK operation map:
cd cli
uv run python scripts/generate_commands.py --write
Integration smoke tests (live API):
OCMO_RUN_INTEGRATION=1 uv run pytest cli/tests/test_smoke_integration.py -v
Architecture notes
Command surface
Generated operations are registered at import time from committed commands.yaml (produced from
sdk/operations.yaml). CI fails if the file drifts from the spec. Hand-written commands live in
ocmo_cli/commands/.
Framework
Built on click (not typer) for fast cold start, dynamic command registration, and programmatic
ocmo api escape hatch.
Related components
- SDK: ../sdk/README.md
- API: ../api/README.md
- Integration guides: ../docs/how-to/README.md · ../docs/reference/cli.md
- Monorepo overview: ../README.md
Metadata
Release files for ocmo-cli 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocmo_cli-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for ocmo_cli-0.9.0-py3-none-any.whl |
Release files / ocmo_cli-0.9.0-py3-none-any.whl
| Download URL | ocmo_cli-0.9.0-py3-none-any.whl |
|---|---|
| Size | 140.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
290a703a46c776911061f9aa9ab58ef23fbdd0fca24a699535a92d7e96e75512
|
|
BLAKE2b-256 checksum How to use checksums |
1b6e890f64c73035d607acd735b2f216ff3e91780f1e54367d3f7bbded6091f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ocmo-cli 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.