Skip to main content

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.


Metadata

Release files for ocmo-cli 0.8.25

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ocmo-cli 0.8.25
File Interpreter ABI Platform Actions
ocmo_cli-0.8.25-py3-none-any.whl Python 3 none any Details for ocmo_cli-0.8.25-py3-none-any.whl

Release files / ocmo_cli-0.8.25-py3-none-any.whl

Download URL ocmo_cli-0.8.25-py3-none-any.whl
Size 139.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00b73d4f39568b4df7e63b4da4c4fca3e66ff2ede8c27a539962108584fd719a
BLAKE2b-256 checksum
How to use checksums
0aba7291321f386db273fef3e1af72ac575e8209e29bd73e0b73fd3835f2f033
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.8.25

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page