Capture and check development environments

On Arch, Debian, or Ubuntu, record explicit package names and selected runtimes in omg.lock, then check for drift without installing software.

Recording installed packages and language runtimes

Most developer environments drift because developers use different tools for each layer: OS packages are installed ad-hoc (`apt-get`, `pacman`, `brew`), language runtimes are managed by separate version tools, and project libraries are pinned in application lockfiles.

OMG’s environment subsystem (`src/cli/env.rs` and `src/core/env/fingerprint.rs`) records explicitly installed system package names and selected OMG runtime versions in `omg.lock`. The published CLI captures seven runtimes (Node.js, Python, Rust, Go, Ruby, Java, and Bun). It does not record system package versions or application dependencies.

Capturing state and verifying drift

`omg env capture` supports the Arch ALPM and Debian/Ubuntu APT backends. It records explicit package names and selected runtime versions, then writes a full SHA-256 hash of that inventory to `omg.lock`. The CLI displays the first 16 characters as a short identifier.

Run `omg env check` to compare `omg.lock` with the live system without installing packages. It reports missing or extra package names and runtime version differences. System package version changes under the same name are outside this check.

Capture environment state and detect drift

omg env capture
omg env check

Sharing the captured inventory

You can share `omg.lock` through GitHub Gist with `omg env share`. The Gist is secret by default; add `--public` only when you want public visibility.

`omg env sync <url>` downloads the lockfile into the current directory and runs a drift check. It does not install packages or runtimes. Review differences and install the needed software with the appropriate commands.

Share and check an environment inventory

omg env share
omg env sync <gist-url>

A verified team onboarding workflow

  1. The repository maintainer configures runtime pins and captures the working environment.

    omg env capture && git add omg.lock .node-version && git commit -m "chore: pin environment"
  2. A new contributor clones the repository and runs an initial environment check.

    git clone <repo> && cd <repo> && omg env check
  3. If drift or missing runtimes are reported, inspect the differences and install the required versions.

    omg use node lts && npm ci
  4. Run the project tasks using OMG’s polyglot task runner.

    omg run test

Sources and verification

Commands and behavior are based on the references below. Source review is not a claim that every workflow has been executed on every supported platform.

Read as Markdown