Description
The CLI should expose a lightweight top-level opencontext --version path that prints the installed package version and exits successfully.
Today, the CLI module eagerly pulls in the FastAPI/Uvicorn startup path, and it does not offer a dedicated top-level --version flag. That makes simple version inspection heavier than necessary and more brittle in environments that only need package metadata.
Expected behavior
opencontext --version prints the package version and exits with status 0.
- The version path does not require importing FastAPI/Uvicorn or triggering application startup side effects.
- Existing integrations that reference
opencontext.cli:app continue to work.
Why this matters
- Users and packaging/debugging tools expect
--version to be cheap and reliable.
- Lightweight version inspection is useful even when web/runtime dependencies are unavailable.
- Preserving the legacy app entrypoint avoids breaking existing deploy or embedding workflows.
Description
The CLI should expose a lightweight top-level
opencontext --versionpath that prints the installed package version and exits successfully.Today, the CLI module eagerly pulls in the FastAPI/Uvicorn startup path, and it does not offer a dedicated top-level
--versionflag. That makes simple version inspection heavier than necessary and more brittle in environments that only need package metadata.Expected behavior
opencontext --versionprints the package version and exits with status 0.opencontext.cli:appcontinue to work.Why this matters
--versionto be cheap and reliable.