@magicdian/omv
v2605.24.1
Published
Date-based version management with one local source of truth.
Readme
oh-my-versioning
Date-based version management with one local source of truth.
OMV CLI
omv is a local-first Rust CLI that treats .omv/ as the canonical version
authority and synchronizes language-native manifests plus runtime-export files
from that state.
Installation
Install the latest prebuilt OMV binary with npm:
npm install -g @magicdian/omvThe npm package installs the platform-specific omv binary from the matching
GitHub Release. End users do not need a Rust toolchain.
Core Model
.omv/state.tomlis the only mutable version truth.- Native manifests such as
Cargo.toml,CMakeLists.txt,pyproject.toml, andgo.modare synchronized outputs. - Runtime exports such as
src/generated/version.rsandinclude/omv_version.hare generated read-only views for application code. - Automation and AI tools should read version state with
omv currentand update it withomv bump.
Commands
omv init: interactive menuconfig-style initializationomv current: print the current managed version and.omvstate summaryomv bump: compute the next version and sync enabled targetsomv sync: re-sync manifests/runtime exports from current.omv/state.tomlomv adapter install: install agent/spec adapters into host frameworksomv adapter refresh: re-render previously installed adapters from registryomv adapter list: list available adaptersomv adapter status: show installed adapters recorded by OMVomv help: print helpomv version/omv -V: print CLI version
Global Options
--locale <en-US|zh-CN>: override locale for current run--no-ntp: skip NTP validation for current run (bump)--json: shortcut for structured JSON output--output json: extensible structured output form
Structured Output
omv current, omv bump, omv sync, and omv adapter ... support
machine-readable output through --json or --output json.
Success envelope:
{
"ok": true,
"contract_version": "1",
"command": "current",
"data": {
"version": "2604.13.3"
},
"error": null
}Failure envelope:
{
"ok": false,
"contract_version": "1",
"command": "runtime",
"data": null,
"error": {
"code": "missing_state",
"message": "missing state file: ...",
"details": {
"path": ".omv/state.toml"
}
}
}Exit codes remain meaningful:
- CLI/parse failures exit non-zero with a structured
clierror envelope - runtime failures exit non-zero with a structured
runtimeerror envelope
Files Under .omv/
Canonical persisted state:
.omv/config.toml.omv/state.toml.omv/targets.toml.omv/adapters.toml
Generated AI/spec contract surface:
.omv/ai/contract.json.omv/ai/instructions.md.omv/ai/adapters/...
Generated helper guidance:
.omv/skills/README.md.omv/skills/bump-guidance.md
adapters.toml records which host adapters OMV has installed so
omv adapter refresh can safely re-project them after OMV contract changes.
Adapter Architecture
OMV uses installable adapters so host-framework integration stays explicit and replaceable.
Adapter categories:
- agent adapters: inject OMV version rules into agent/IDE entrypoints
- spec adapters: inject OMV version rules into spec/governance frameworks
First-wave supported adapters:
- agent:
codex,claude - spec:
openspec,trellis
Example:
omv adapter install --agent codex --spec openspecInstall behavior uses an auto backend:
- on Unix-like systems, OMV prefers symlinks when the target file shape allows it
- otherwise OMV materializes managed files or managed blocks
- OMV records the result in
.omv/adapters.toml
AI and Spec Flow
The reference flow is:
- Read current truth via
omv current --json - Plan/spec/work on code without hand-editing manifest versions
- Advance version truth via
omv bump --json - Let OMV sync manifests and runtime exports
Host files such as AGENTS.md, CLAUDE.md, openspec/project.md, or Trellis
guide indexes are projections of .omv/ai/*, not independent truth sources.
Version Model
- version format:
YYMM.dd.BuildNumber(numericx.y.zcompatible) daily-reset: resetBuildNumberto1when date changescontinuous: keep incrementingBuildNumberacross date changes
Quick Examples
omv init
omv current
omv current --json
omv bump --json
omv adapter list
omv adapter install --agent codex --spec trellis
omv adapter refresh