# OMG complete documentation --- Release reference: v0.2.0. Individual guides retain their own source references and review dates. Source review is not platform execution certification. --- # Installing OMG Install OMG on Arch, Debian, Ubuntu, Fedora, and Apple Silicon macOS; enable shell integration, update, and uninstall. Canonical: https://getomg.dev/docs/installation/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Install with the universal installer ### What the installer checks Two independent gates run before anything is copied into your home folder. A failed gate stops the install. | Step | Detail | | --- | --- | | Download the script | curl \| bash | | Check the archive | published sha256 | | Verify build proof | gh attestation verify | | Install the binaries | into ~/.local/bin | | Add the folder to PATH | | | Stop and report | do not disable the check | Connections: Download the script to Check the archive; Check the archive to Verify build proof; Verify build proof to Install the binaries; Install the binaries to Add the folder to PATH; Check the archive to Stop and report (mismatch); Verify build proof to Stop and report (failed). The universal installer detects your operating system and package backend, downloads the matching release binaries, and installs them to ~/.local/bin. It requires the GitHub CLI (gh) to verify the release attestation. ### Linux and macOS, including WSL ```sh curl -fsSL https://getomg.dev/install.sh | bash ``` > Native Windows is not supported. Run the installer inside a supported WSL2 Linux guest so OMG uses its package backend. The v0.2.0 release publishes APT 6 archives for Debian 12 and Ubuntu 24.04, plus an APT 7 debian-trixie archive for Debian 13 and Ubuntu 26.04. ## Platform packages ### Supported platforms and install methods | Platform | Install method | | --- | --- | | Arch Linux | Universal installer or a matching GitHub release archive | | Debian 12/13 and Ubuntu 24.04/26.04 | Universal installer, or download a release tarball and copy the binary to /usr/local/bin | | Fedora | Universal installer or a matching Fedora release archive | | macOS | Universal installer. Homebrew packaging is not available yet | | Windows | WSL2 on a supported Arch, Debian, Ubuntu, or Fedora guest, using the installer inside the distribution | Release binaries support x86_64 Linux and Apple Silicon macOS. Linux archives are backend-specific for Arch, Debian/Ubuntu, and Fedora. Intel macOS, Linux ARM64, 32-bit x86, ARMv7 release installs, and native Windows are unsupported. The installer maps RHEL/CentOS-family identification to the Fedora artifact as a best-effort fallback, but Fedora evidence does not establish RHEL compatibility. The supported installation channels are the universal installer and GitHub release downloads. Debian 12 and Ubuntu 24.04 use the APT 6 archives. Debian 13 and Ubuntu 26.04 use the APT 7 `debian-trixie` release pair, published in v0.2.0. The installer checks the native APT library ABI; do not substitute an archive built for a different ABI. Published assets establish availability, not execution verification on every host configuration. ### Backend and feature matrix | Backend | What it means | | --- | --- | | Arch (`arch`) | libalpm plus AUR workflows; the default source-build feature set | | Debian/Ubuntu (`debian`) | Native APT operations; source builds need libapt-pkg-dev and native build headers | | Fedora (`fedora`) | DNF/RPM operations; source builds use the pure-Rust RPM database path | | Apple Silicon macOS (`macos`) | Homebrew package operations; published macOS binaries are ARM64 | | Debian index/test (`debian-pure`) | Pure-Rust index fixtures only; refuses live package mutations | | Windows | No native backend or binary; install inside WSL and use the guest distribution backend | ## Shell integration and first checks 1. Enable the shell hook so runtime versions switch when you change directories. ```sh echo 'eval "$(omg hook bash)"' >> ~/.bashrc ``` 2. For Zsh, add the same hook to ~/.zshrc. For Fish, add omg hook fish | source to ~/.config/fish/config.fish. 3. Verify the installation. ```sh omg --version && omg doctor ``` 4. Optionally install completions for your shell. ```sh omg completions zsh ``` > omg doctor checks connectivity, required tools, package-backend health, the daemon, PATH, and the shell hook. Add --network to test mirrors. Add --eol to find end-of-life runtimes. ## Installer options The installer reads environment variables. Put them on the bash side of the pipe, not in front of curl, so they reach the installer process. ### Installer environment variables | Variable | Effect | | --- | --- | | OMG_NO_TELEMETRY=1 | Skip the telemetry consent prompt and keep telemetry disabled | | OMG_SKIP_SHELL=1 | Skip shell integration setup | | OMG_VERSION=v0.2.0 | Install a specific release | | INSTALL_DIR=~/.omg/bin | Install to a custom directory | ### Combine options in one command ```sh curl -fsSL https://getomg.dev/install.sh | OMG_NO_TELEMETRY=1 OMG_SKIP_SHELL=1 bash ``` ## Updating and uninstalling ### Update OMG itself ```sh omg self-update ``` omg self-update verifies and stages the matching omg and omgd binaries before replacing either one. Each replacement is atomic, and a failure restores the prior files. Restart a running daemon afterward so it loads the new code. You can also obtain a release through the universal installer or GitHub releases. > Interactive successful commands can show a cached update notice; the check never installs anything. CI, root, quiet, and JSON runs stay silent. Set OMG_NO_UPDATE_CHECK=1 to disable checks and notices. The notice cache is update-notice.json under the cache directory, which OMG_CACHE_DIR can override for ordinary users. ### Remove a script installation ```sh curl -fsSL https://getomg.dev/install.sh | bash -s -- --uninstall ``` > The installer backs up shell files it changes as .omg-backup and leaves configuration and caches in place. On Linux and WSL, removing ~/.local/share/omg or ~/.config/omg deletes installed runtimes, tools, history, policy, and settings. On macOS, data and configuration default to ~/Library/Application Support/omg. Back up state before deleting it. ## Build from source Source builds use the Rust toolchain pinned by the repository. Select exactly one package backend with `--no-default-features`; feature names are additive. A source build is not the same trust path as a release archive and should come from a reviewed checkout. ### Backend-specific builds ```sh cargo build --release --locked --no-default-features --features arch,pgp,license cargo build --release --locked --no-default-features --features debian,pgp,license cargo build --release --locked --no-default-features --features fedora,pgp,license cargo build --release --locked --no-default-features --features macos,pgp,license cargo build --release --locked --no-default-features --features debian-pure,pgp,license ``` > The optional license feature gates only `omg account`. It is not a local paywall. The `debian-pure` feature is for indexing and test fixtures and refuses live Debian or Ubuntu mutations. Native Windows has no Cargo backend feature. ## Daemon and release pairing ### Check and start the daemon ```sh omg daemon-status omg daemon --foreground omg daemon ``` Release archives pair `omg` with `omgd` on supported Linux and macOS targets. Restart a running daemon after `omg self-update` so it loads the new binary. In v0.2.0, vulnerability audits can use the direct package backend when no daemon is available. Metrics still need daemon support. ## If the command is not found The installer places the binary in ~/.local/bin. If that directory is missing from PATH, add it and restart the shell. If the binary exists but will not run, restore its execute permission. ### Fix PATH and permissions ```sh echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc chmod +x ~/.local/bin/omg ``` For CI pipelines, install a chosen OMG release in a setup step, add ~/.local/bin to PATH, then install the runtime requested by the committed project pin with omg use node before running omg run build. Shell startup files are not normally loaded by CI steps; expose the installed runtime directory on PATH and verify node --version in the step that runs the build. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/installation.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/installation.md) - [omg-cli/omg/install.sh](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/install.sh) - [omg-cli/omg/src/cli/self_update.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/self_update.rs) - [omg-cli/omg/src/cli/update_notice.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/update_notice.rs) - [omg-cli/omg/Cargo.toml](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/Cargo.toml) - [omg-cli/omg/.github/workflows/release.yml](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/.github/workflows/release.yml) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # CLI reference A curated OMG command guide for packages, runtimes, audits, environments, and maintenance, with useful options and limits. Canonical: https://getomg.dev/docs/cli/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## How to read the command line This reference targets v0.2.0. The CLI has one parser for package operations, runtime managers, project tasks, environment records, and team or enterprise workflows. `omg --help` shows the public command list. Add `--all-commands` to include advanced commands, and add `--help` after any command or subcommand for its exact arguments. Package commands use the native backend of the host: ALPM and the AUR on Arch, APT on Debian or Ubuntu, DNF and RPM on Fedora, and Homebrew on Apple Silicon macOS. Native Windows has no backend; use OMG inside WSL so the Linux guest supplies the backend. Runtime and audit coverage still varies by provider and platform. `omg completions` supports Bash, Zsh, Fish, PowerShell (`pwsh`), and Elvish. The directory-change PATH hook currently emits Bash, Zsh, and Fish scripts; PowerShell and Elvish are completion-only values and return an unsupported-shell error when passed to `omg hook`. ### A safe first pass Nothing here changes the machine until the fourth step, and that step asks for confirmation first. | Step | Detail | | --- | --- | | omg --help | the public list | | omg search | find the package | | Preview install | omg install ripgrep --dry-run | | omg install | now it changes | | omg doctor | reads exit status | Connections: omg --help to omg search ; omg search to Preview install; Preview install to omg install ; omg install to omg doctor. ### Start here ```sh omg --help omg --all-commands --help omg doctor --network --eol omg status ``` ### Global options | Option | Effect | | --- | --- | | -v, --verbose (repeatable) | Increase detail; package build output is streamed live | | -q, --quiet | Suppress non-essential logs and fast-path banners; command results still print | | --json | Request JSON where the command supports it; output schemas vary by command | | --all-commands | Include advanced commands in top-level help | | -h, --help / -V, --version | Print command help or the installed OMG version | ### Exit status and automation contracts in v0.2.0 | Command or option | What an agent or CI job can rely on | | --- | --- | | omg env check | Read-only comparison; missing omg.lock or detected drift exits nonzero | | omg audit scan --fail-on-findings | Findings and scan errors exit nonzero; omit the flag for report-only findings | | omg audit licenses --check-policy | Arch only; policy violations fail even when --filter narrows displayed rows | | omg config validate | Read its output: v0.2.0 can report validation issues and still exit successfully | | --json | Only use where the command implements JSON; it does not convert every command into a stable machine protocol | | --yes | Only accepted by specific mutation commands; it does not bypass required AUR source review or attended security gates | | omg run -- | Requires a task name, forwards trailing arguments, and executes project-defined code | ### Nested parser options | Command family | Exact nested arguments and options | | --- | --- | | hooks and workspace | `hooks install --force`; `hooks run `; `workspace add --name`; `workspace run [-- ] --parallel --filter --yes`; `workspace diff [branch]` defaults to `main` | | config, privacy, and env | `config reset --yes`; `privacy export --output`; `env export --source-target `; `env plan --target `; `env share --description --public`; `env sync ` | | audit | `scan --fail-on-findings`; `sbom --output --inventory-only`; `secrets --path`; `log --limit --severity --export`; `slsa --certificate-identity `; `licenses --format --export --filter --check-policy`; `fix --dry-run --yes --min-severity`; `export --framework --period --output` | | snapshots, CI, and migration | `snapshot create --message`; `restore --dry-run --yes`; `ci init --advanced`; `migrate export --output`; `migrate import --dry-run` | | team | `team init --name`; `golden-path create --node --python --packages`; `compliance --export --enforce`; `activity --days` | | containers | `run [-- ] --name --detach --interactive --env --volume --workdir`; `shell --image --workdir --env --volume`; `build --dockerfile --tag --no-cache --build-arg --target`; `init --base` | | account and enterprise | `account link --token-stdin`; `enterprise reports --report-type`; `policy show --scope`; `audit-export --framework --period --output`; `license-scan --export` | | hidden shell helpers | `hook-env --shell` is called by generated hooks; `complete --shell --current --last [--full]` powers dynamic completion | ## Package management ### Every package command | Command | Purpose and important options | | --- | --- | | omg search (s) | Search configured repositories; --detailed, --no-aur, and --limit control source detail and result count | | omg install [packages] (i) | Install packages or open the interactive picker; --yes, --dry-run, --review, and --allow-local-file | | omg remove (r) | Remove packages; --recursive is Arch-only, with --yes and --dry-run | | omg update (u) | Update packages; --check, --yes, --dry-run, --review, --no-sync, --aur-only, --fast, and --turbo | | omg info | Show package metadata from the active backend | | omg why | Show dependency parents; --reverse shows dependents | | omg outdated | List packages with available updates | | omg size | Show package disk usage; --tree and --limit refine it | | omg blame | Show when and why a package was installed | | omg clean | Remove orphans or caches; --orphans, --cache, --aur, --all, --dry-run, --yes | | omg explicit | List explicitly installed packages; --count prints only the count | | omg sync (sy) | Refresh package databases from mirrors | | omg ec / tc / oc / uc | Print explicit, total, orphan, or available-update counts | ### Safe package workflow ```sh omg search ripgrep --detailed omg install ripgrep --dry-run omg install ripgrep --yes omg history --search ripgrep ``` > Package operations are backend-specific. AUR recipes execute community build code, and rollback depends on the backend, cached archives, or reachable source history. Keep the native package manager available for recovery. The Bash and Zsh hooks provide omg-ec, omg-tc, omg-oc, and omg-uc count helpers. The v0.2.0 CLI also provides omg ec, omg tc, omg oc, and omg uc. ## Runtime management ### Runtime commands | Command | Purpose and options | | --- | --- | | omg use [version] | Install or select a version; omit the version to use a detected project pin. --uninstall requires an explicit version | | omg list [runtime] | List installed versions; --available or -a lists downloadable versions | | omg which | Report the version selected for the current directory | | omg hook | Print or install the directory-change hook; --uninstall removes the managed hook | ### Native runtime managers | Runtime | Names, pins, and exposed tools | | --- | --- | | node | Alias nodejs; .node-version, .nvmrc, .tool-versions, and package.json; node, npm, npx | | python | Alias python3; .python-version, pyproject.toml, and .tool-versions; python3, pip | | go | Alias golang; .go-version, go.mod, and .tool-versions; go, gofmt | | rust | Alias rustlang; rust-toolchain, rust-toolchain.toml, and .tool-versions; rustc, cargo | | ruby | .ruby-version and .tool-versions; ruby, gem | | java | .java-version and .tool-versions; java, javac | | bun | Alias bunjs; .bun-version, .tool-versions, and package.json; bun | | pi | .tool-versions; pi | | deno | .deno-version, .dvmrc, and .tool-versions; deno | | zig | Alias ziglang; .zig-version and .tool-versions; zig | | dotnet | global.json and .tool-versions; dotnet | | erlang | .tool-versions; erl, erlc | | php | .php-version and .tool-versions; php | | swift | .swift-version and .tool-versions; swift, swiftc | ### The exact 54 registry tools | Registry | Names | | --- | --- | | GitHub-release tools | ripgrep, fd, bat, eza, fzf, zoxide, starship, just, task, jq, yq, gh, lazygit, delta, neovim, helix, zellij, helm, k9s, terraform, opentofu, vault, consul, minikube, kind, kustomize, tilt, skaffold, lazydocker, glow, pandoc, shellcheck, shfmt, hadolint, actionlint, hyperfine, tokei, dust, duf, procs, ruff, uv, fnm, protoc, terragrunt, packer, dive, golangci-lint, delve, stylua, kotlin, scala, elixir, ghcup | The hook walks from the current directory toward its parents; the nearest explicit pin wins. It also reads `mise.toml`, `.mise.toml`, and `package.json` where the native parser supports them. Unknown runtime names fail explicitly instead of invoking another version manager. ## Shell integration, Git hooks, and workspaces ### Shell and monorepo commands | Command | Purpose and options | | --- | --- | | omg completions | Install completions for bash, zsh, fish, powershell/pwsh, or elvish; --stdout prints instead | | omg hooks install | Install environment-sync Git hooks; --force overwrites existing hooks | | omg hooks uninstall / status | Remove hooks or show their status | | omg hooks run | Run pre-commit, post-checkout, or post-merge manually | | omg workspace init | Create a workspace definition | | omg workspace add | Add a project; --name overrides the directory name | | omg workspace remove / list | Remove a project or list workspace members | | omg workspace run | Run across projects; --parallel, --filter, and --yes control execution | | omg workspace diff [branch] | Compare workspace environments with a branch (default main) | | omg workspace check / status | Check project environments or show workspace state | ### Shell setup examples ```sh eval "$(omg hook bash)" eval "$(omg hook zsh)" omg hook fish | source omg completions powershell ``` ## Status, health, and security ### Health and diagnostics | Command | Purpose and options | | --- | --- | | omg status | Show package totals, updates, orphans, vulnerabilities, and cached runtimes; --fast uses counts only | | omg doctor | Check backend, daemon, PATH, and shell hook; --network tests mirrors and --eol checks runtime end-of-life. Exit 0 means no health issues were found; warnings can remain. Issues exit nonzero. --turbo instead primes sudo credentials; it does not run the health checks | | omg audit [scan] | Scan installed packages for advisories using the daemon or direct backend. Findings are report-only by default; audit scan --fail-on-findings makes them fail the command | | omg audit sbom | Write a CycloneDX system-package SBOM on Arch, Debian, Ubuntu, or Fedora; -o/--output selects the file. --inventory-only explicitly skips advisory matching | | omg audit secrets | Scan a directory for credentials; -p/--path selects it | | omg audit log | Read or export audit entries; --limit, --severity, and --export filter output | | omg audit verify / policy | Check local audit-chain consistency or show policy status | | omg audit slsa | Verify supported artifact signatures against the required --certificate-identity value; this does not establish a SLSA level | | omg audit licenses | Report installed-package licenses on Arch; --format, --export, and --filter control output. --check-policy checks the full installed inventory and exits nonzero on policy violations | | omg audit fix | Upgrade vulnerable Arch packages when updates are available; --dry-run, --yes, and --min-severity | | omg audit export | Export SOC 2 evidence on a supported backend; other accepted framework names are not implemented. --period records metadata rather than filtering events | | omg audit eol | Check end-of-life dates for installed Node.js, Python, Rust, Go, Ruby, Java, Bun, and Deno | > Audit verification checks local consistency, not authenticity or completeness. SBOM and compliance exports are plaintext evidence bundles; the SLSA-named command does not certify a SLSA build level. > These audit options ship in v0.2.0. A failure to collect required inventory or advisories is an error, not an empty successful scan. An inventory-only SBOM marks advisory matching as skipped; it is not a vulnerability verdict. ## Tasks, tools, and project setup ### Development commands | Command | Purpose and options | | --- | --- | | omg run | Run a detected project task; --watch, --parallel, --using , and --all are mutually exclusive modes | | omg new | Scaffold rust, react, node, python, or go projects; alias create | | omg tool install | Install a registry developer tool from supported sources | | omg tool list / remove | Inspect or remove managed tools | | omg tool update | Update one tool or use the special name all | | omg tool search / registry | Search or list the curated tool registry | | omg init | Run first setup; --defaults or a non-interactive terminal applies defaults and captures omg.lock; --skip-shell and --skip-daemon skip those setup actions | ### Task detection | Project file | Native command family | | --- | --- | | package.json | npm, yarn, pnpm, or bun scripts | | deno.json | deno task | | Cargo.toml / Makefile / Taskfile.yml | cargo, make, or task | | pyproject.toml / Pipfile | poetry or pipenv | | composer.json / pom.xml / build.gradle | composer, Maven, or Gradle | | mise.toml / .mise.toml | OMG reads supported tasks, tools, and environment entries | ## Environments, snapshots, history, and rollback ### Environment state commands | Command | Purpose and options | | --- | --- | | omg env capture | Write explicit package names and probed supported OMG runtime and registry-tool versions to omg.lock on Arch, Debian, or Ubuntu | | omg env check | Report drift against omg.lock on those backends without changing the machine | | omg env share | Publish a GitHub Gist; --description and --public control metadata and visibility | | omg env sync | Fetch and check a shared environment record without installing software | | omg env export --source-target | Read omg.lock and print a portable TOML manifest; source-target identifies the capture platform | | omg env plan --target | Read .omg.toml and print a JSON requirements plan without installing or copying files | | omg diff | Compare the current lock or --from with another lock file | | omg snapshot create / list | Create a state snapshot with optional --message or list snapshots | | omg snapshot restore | Preview or restore a snapshot with --dry-run and --yes | | omg snapshot delete | Delete one snapshot | | omg migrate export | Write a portable manifest; -o/--output defaults to omg-manifest.json | | omg migrate import | Map and install from a manifest; --dry-run previews changes | ### History and rollback | Command | Purpose and options | | --- | --- | | omg history | Show transactions; --limit, --search, --type, --from, and --to filter entries | | omg rollback [id] | Restore a previous package state; omit the id for the newest transaction and use --yes in non-interactive shells | > Environment records are inventories and drift checks, not complete machine images. A shared Gist can disclose private package and runtime information, even when it is secret and unlisted. ## Team, container, and account commands ### Team workflows | Command | Purpose and options | | --- | --- | | omg team init | Create a team workspace; --name sets its display name | | omg team join | Join a team from a GitHub Gist URL or ID | | omg team status / members | Show sync state or members | | omg team push / pull | Publish local state or fetch team state | | omg team dashboard | Open the interactive team TUI | | omg team roles list | List available roles | | omg team golden-path create | Create a template with --node, --python, and --packages | | omg team golden-path list / delete | Inspect or delete templates | | omg team compliance | Report that local compliance scoring is unavailable; --enforce warns without enforcing, and --export fails because no evaluated report exists | | omg team activity | Show activity; --days sets the lookback window | ### Containers and dashboard account | Command | Purpose and options | | --- | --- | | omg container status | Check Docker or Podman | | omg container run | Run a command; --name, --detach, --interactive, --env, --volume, and --workdir | | omg container shell | Open a project-mounted shell; --image, --workdir, --env, and --volume | | omg container build | Build an image from the current directory; --dockerfile, --tag, --no-cache, --build-arg, and --target. The default file is Dockerfile; an explicit -f path must be relative | | omg container list / images / pull | Inspect containers, images, or download an image | | omg container stop / exec | Stop or execute in a running container | | omg container init | Generate Dockerfile.omg; --base selects the image. Build with omg container build -f Dockerfile.omg -t myapp. Existing Dockerfile.omg is not overwritten; remote installers are checksum-pinned | | omg account link / status / unlink | Optional dashboard link; --token-stdin avoids putting the token in shell history | ## Configuration and privacy ### Configuration commands | Command | Purpose | | --- | --- | | omg config get / set | Read or change a setting | | omg config list / validate | List effective settings or validate syntax and values | | omg config reset | Restore defaults; --yes skips confirmation | | omg config path | Print the active configuration path | | omg privacy status | Show local privacy settings and policy summary | | omg privacy export | Export local OMG data; -o/--output selects a file | | omg privacy opt-out / opt-in | Disable or re-enable telemetry collection | Configuration paths follow XDG on Linux and WSL and Application Support on macOS. Unprivileged processes can use `OMG_DATA_DIR`, `OMG_CONFIG_DIR`, `OMG_CACHE_DIR`, and `OMG_SOCKET_PATH` overrides; root ignores these caller-supplied locations. Review exported data before sharing it. ## CI, daemon, dashboard, and enterprise ### CI and lifecycle commands | Command | Purpose and options | | --- | --- | | omg ci init | Generate GitHub, GitLab, or CircleCI configuration; --advanced adds matrices and audit steps | | omg ci validate / cache | Check CI expectations or print recommended cache paths | | omg daemon [--foreground] | Start omgd on Unix; --foreground keeps it attached | | omg daemon-status | Show daemon health and socket details (Unix) | | omg metrics | Print Prometheus-style system metrics (Unix) | | omg dash (d) | Open the interactive system dashboard | | omg stats | Show usage statistics | | omg self-update (up) | Update the paired omg and omgd binaries; --force or --version selects the update | | omg generate-man | Generate man pages; -o/--output changes the destination | ### Fleet and enterprise commands | Command | Purpose and options | | --- | --- | | omg fleet status | Show fleet status across machines | | omg enterprise reports | Create monthly, quarterly, or custom executive reports with --report-type | | omg enterprise policy show | Show policies, optionally scoped with --scope | | omg enterprise audit-export | Export generic evidence with --framework, --period, and --output | | omg enterprise license-scan | Scan license compliance; --export accepts json or csv | > Unix-only commands are not available in a native Windows process. The account command is compiled when the license feature is enabled. Compliance labels do not turn a plaintext inventory into certified framework evidence. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/cli.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/cli.md) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) - [omg-cli/omg/src/cli/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/mod.rs) - [omg-cli/omg/src/cli/commands.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/commands.rs) - [omg-cli/omg/src/cli/config.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/config.rs) - [omg-cli/omg/src/cli/container.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/container.rs) - [omg-cli/omg/src/cli/env.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/env.rs) - [omg-cli/omg/src/cli/run.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/run.rs) - [omg-cli/omg/src/cli/security.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/security.rs) - [omg-cli/omg/src/cli/snapshot.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/snapshot.rs) - [omg-cli/omg/src/cli/team.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/team.rs) - [omg-cli/omg/src/cli/tool.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/tool.rs) - [omg-cli/omg/src/cli/ci.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/ci.rs) - [omg-cli/omg/src/cli/self_update.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/self_update.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Configuration and policy Configure OMG through config.toml and policy.toml. Learn file locations, security grades, version files, and environment variables. Canonical: https://getomg.dev/docs/configuration/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## File locations On Linux, OMG follows the XDG base directory specification. macOS uses its Application Support directory. An empty configuration is valid. Every setting has a default, so most machines need no configuration. ### Linux and WSL default paths | Path | Purpose | | --- | --- | | ~/.config/omg/config.toml | General settings such as telemetry and AUR build tuning | | ~/.config/omg/policy.toml | Package policy enforced against prepared Arch transactions | | ~/.local/share/omg/versions/ | Installed runtime versions | | ~/.local/share/omg/tools/ | CLI tools installed with omg tool | | ~/.local/share/omg/status-cache.json | Versioned daemon status snapshot | | ~/.local/share/omg/completion-cache.json | Shell completion cache | | ~/.local/share/omg/history.json | Transaction history | | ~/.local/share/omg/audit/audit.jsonl | Hash-chained audit log | ### Where the files live Your home folder holds the settings you edit and the data OMG keeps. Nothing in the figure is created until you ask for it. | Step | Detail | | --- | --- | | Home folder | the tilde, ~ | | config.toml | general settings | | policy.toml | security policy | | Local data | runtimes and history | Connections: Home folder to config.toml; Home folder to policy.toml; Home folder to Local data. > For ordinary Linux users, the daemon normally keeps its socket and omg.status prompt snapshot in the session runtime directory, with validated fallbacks when needed. Root uses /var/lib/omg for data and daemon state and /var/cache/omg for caches. It ignores caller-supplied OMG storage, configuration, daemon, and socket overrides; existing user state is not imported automatically. > The table shows unprivileged Linux and WSL defaults. On macOS, data and configuration default to ~/Library/Application Support/omg. XDG data and config variables apply on Linux. Unprivileged OMG path overrides apply across supported platforms. Use omg config path and omg config get data_dir to inspect the active locations before changing files. ## General settings in config.toml ### Developer workstation example ```toml telemetry_enabled = false [aur] build_concurrency = 8 enable_ccache = true cache_builds = true ``` ### AUR build settings and defaults | Setting | Default and meaning | | --- | --- | | build_method | "bubblewrap" by default; alternatives are "chroot" and "native" | | build_concurrency | 1 by default; the config command accepts 1 through 8 parallel AUR builds | | review_pkgbuild | true by default; requires interactive PKGBUILD review before building | | secure_makepkg | true by default; uses stricter makepkg flags | | allow_unsafe_builds | false by default; permits native builds without sandboxing | | allow_network | false by default; opt in to expose host networking to sandboxed build code | | use_metadata_archive | true by default; bulk AUR metadata for fast update checks | | metadata_cache_ttl_secs | 300 seconds by default; freshness window for AUR metadata | | makeflags | Unset by default; optional make flags, validated before use | | pkgdest / srcdest | Unset by default; optional shared package and source cache paths | | ccache_dir / sccache_dir | Unset by default; optional compiler-cache paths | | cache_builds | true by default; reuses built packages | | enable_ccache | false by default; speeds up C and C++ builds | | enable_sccache | false by default; speeds up Rust builds | | telemetry_enabled | false by default; runtime telemetry is strictly opt-in | ### Read and change settings from the CLI ```sh omg config list omg config get data_dir omg config set aur.build_concurrency 8 omg config set telemetry.enabled false omg config validate ``` The TOML telemetry key is telemetry_enabled, while config get and config set use telemetry.enabled. In v0.2.0, writable CLI keys are telemetry.enabled, aur.build_concurrency, aur.enable_ccache, aur.enable_sccache, aur.secure_makepkg, and aur.makeflags. The data_dir and socket keys are read-only. Edit the file printed by omg config path for other supported TOML settings. Inspect validation output: v0.2.0 can print configuration issues and still return exit status 0. Do not use that status alone as a CI policy gate. Unknown current-schema keys and invalid values can also fail settings loading in commands that consume them. Configuration files larger than 1 MiB are rejected. ## Security policy in policy.toml ### Security grades from lowest to highest | Grade | Meaning | | --- | --- | | Risk | The configured vulnerability scanner found a known vulnerability | | Community | AUR or another nonofficial package source | | Verified | Official repository metadata identifies the package | | Locked | Reserved for provenance evidence that automatic grading does not yet assign | 1. Package grading. Every candidate gets a grade from the table above. 2. Grade check. The grade must meet minimum_grade. 3. AUR check. AUR packages are rejected when allow_aur is false. 4. Trust check. Grades below Verified are rejected when require_pgp is true. 5. License check. Licenses outside allowed_licenses are rejected when the list is set. 6. Ban check. Packages in banned_packages are always rejected. ### Corporate style policy ```toml minimum_grade = "Verified" allow_aur = false require_pgp = true allowed_licenses = ["Apache-2.0", "MIT", "BSD-3-Clause"] banned_packages = [] ``` The default policy uses a minimum_grade of Community. It allows AUR packages and does not require the Verified grade. Tighten minimum_grade, allow_aur, require_pgp, allowed_licenses, and banned_packages when the machine needs stricter controls. Explicit policy is enforced against prepared Arch transactions, including dependencies. Native APT, DNF, and Homebrew mutations refuse explicit policy because a precheck cannot guarantee their final transactions. ## Version files OMG reads ### Detected version files | File | Runtime | | --- | --- | | .nvmrc | Node.js | | .node-version | Node.js | | .bun-version | Bun | | .python-version | Python | | .ruby-version | Ruby | | .go-version | Go | | .java-version | Java | | rust-toolchain | Rust | | rust-toolchain.toml | Rust | | .tool-versions | Multiple runtimes in asdf format | | package.json | Node.js and Bun through the engines or volta field | | go.mod | Go through the go directive | ### Rust toolchain file format ```toml [toolchain] channel = "stable" components = ["rustfmt", "clippy"] profile = "minimal" ``` ## Environment variables ### Variables OMG respects | Variable | Purpose | | --- | --- | | OMG_SOCKET_PATH | Unprivileged override for the daemon socket path | | OMG_DATA_DIR | Unprivileged override for runtime, tool, history, and audit data | | OMG_CACHE_DIR | Unprivileged override for derived cache and update-notice state | | OMG_DAEMON_DATA_DIR | Unprivileged daemon data override; set consistently for a separately configured service | | OMG_CONFIG_DIR | Unprivileged configuration-directory override; must be absolute, otherwise it is ignored with a warning | | OMG_TELEMETRY=0 | Disable runtime telemetry; false, off, and no are also accepted | | OMG_DISABLE_TELEMETRY=1 | Disable runtime telemetry; true, on, and yes are also accepted | | OMG_NO_UPDATE_CHECK=1 | Suppress built-in update notices and checks; presence of the variable is sufficient | | OMG_NO_TELEMETRY=1 | Installer-only consent opt-out; use runtime controls for installed OMG | | OMG_SKIP_SHELL=1 | Installer-only control to skip shell integration | | OMG_VERSION=v0.2.0 | Installer-only release selection; unset defaults to its latest release marker | | RUST_LOG | Logging filter. The CLI defaults to warn and the daemon defaults to info | | GITHUB_TOKEN | Credential required by omg env share; supply through a secret store | | OMG_DASHBOARD_TOKEN | Optional dashboard-link credential; omg account link --token-stdin accepts stdin instead | | XDG_RUNTIME_DIR | Linux socket directory. Falls back to /run/user/$UID or a private /tmp/omg-$UID directory | | XDG_DATA_HOME | Linux data directory. The default is ~/.local/share | | XDG_CONFIG_HOME | Linux configuration directory. The default is ~/.config | | XDG_CACHE_HOME | Linux cache directory. The default is ~/.cache | | MISE_ENV | Select supported mise environment configuration layers during project detection | ## Running the daemon with systemd The daemon omgd is optional. Without it, the CLI falls back to direct package-manager queries. On Linux, a systemd user unit can keep it running across logins. 1. Create ~/.config/systemd/user/omgd.service with ExecStart pointing at %h/.local/bin/omgd and Restart=on-failure. 2. Enable and start the unit. ```sh systemctl --user enable omgd && systemctl --user start omgd ``` 3. Check the result. ```sh omg daemon-status ``` > There is no config switch to disable the daemon. Simply do not start omgd on machines where you do not want it. ## When configuration misbehaves ### Common configuration problems | Symptom | Fix | | --- | --- | | Config not loading | Check the file path and TOML syntax, then run omg config validate | | Permission denied | Ensure the socket and data directories are writable by your user | | Policy blocks installs | Raise or lower minimum_grade, or adjust allow_aur and require_pgp | | Runtime not found | Use one of the documented native runtime names, such as node or python | ### Back up Linux or WSL configuration and reset ```sh mv ~/.config/omg/config.toml ~/.config/omg/config.toml.bak mv ~/.config/omg/policy.toml ~/.config/omg/policy.toml.bak omg config validate ``` > On macOS, configuration and runtime data share ~/Library/Application Support/omg. Moving that directory resets both. Back it up before making changes. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/configuration.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/configuration.md) - [omg-cli/omg/src/config/settings.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/config/settings.rs) - [omg-cli/omg/src/cli/config.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/config.rs) - [omg-cli/omg/src/core/paths.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/paths.rs) - [omg-cli/omg/src/core/security/policy.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/policy.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) - [omg-cli/omg/src/core/telemetry.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/telemetry.rs) - [omg-cli/omg/src/cli/update_notice.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/update_notice.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Runtime management Install and switch Node.js, Python, Go, Rust, Ruby, Java, Bun, Deno, Pi, Zig, .NET, Erlang, PHP, and Swift versions with version-file auto-detection. Canonical: https://getomg.dev/docs/runtimes/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Supported runtimes ### Native runtimes and their binaries | Runtime | Install and inspect | | --- | --- | | Node.js | omg use node 20, then omg which node. Provides node, npm, and npx | | Python | omg use python 3.12. Provides python3 and pip | | Go | omg use go 1.21. Provides go and gofmt | | Rust | omg use rust stable or omg use rust nightly. Provides rustc and cargo | | Ruby | omg use ruby 3.2. Provides ruby and gem | | Java | omg use java 21. Provides java and javac | | Bun | omg use bun latest. Provides bun | | Deno | omg use deno latest. Provides deno | | Pi | omg use pi 0.83.0. Installs through npm with lifecycle scripts disabled | | Zig | omg use zig 0.13.0. Provides zig | | .NET | omg use dotnet 8.0. Provides dotnet | | Erlang | omg use erlang 26.2. Provides erl and erlc | | PHP | omg use php 8.3. Provides php | | Swift | omg use swift 5.10. Provides swift and swiftc | > Unknown runtime names fail explicitly. OMG does not invoke or download another version manager. In v0.2.0, runtime downloads and archive extractions enforce bounded overall deadlines, async subprocess waits, and symlink-safe staging across all runtime managers. ## How version switching works ### Which version file wins OMG reads the project directory first and then its parents. Dedicated pins and supported language manifests come before .tool-versions; package.json follows for Node and Bun. Supported mise configuration layers are considered after these files in each directory. | Step | Detail | | --- | --- | | Project directory | checked upward | | Runtime-specific pin | .node-version, go.mod | | Language manifest | go.mod, pyproject.toml | | .tool-versions | multi-runtime pin | | package.json | Node.js or Bun | | Version on PATH | | Connections: Project directory to Runtime-specific pin; Runtime-specific pin to Language manifest (not set); Language manifest to .tool-versions (not set); .tool-versions to package.json (not set); Runtime-specific pin to Version on PATH; Language manifest to Version on PATH; .tool-versions to Version on PATH; package.json to Version on PATH. > OMG is designed around native language version files (.node-version, .python-version, go.mod, rust-toolchain.toml) and standard .tool-versions. Support for mise.toml is strictly a migration compatibility surface so teams transitioning from mise can run without rewriting repository configurations; it is not OMG’s default or native configuration format. 1. The generated shell hook invokes omg hook-env when the prompt or directory changes. 2. OMG reads version files in the current directory and then walks through its parents. The nearest pin wins. 3. The hook resets the base PATH and prepends the concrete installed version directory requested by each pin. 4. Subshells, tmux, and screen inherit the resulting PATH. ### Version file priority per runtime | Runtime | Detection order | | --- | --- | | Node.js | .node-version, .nvmrc, .tool-versions, then package.json | | Python | .python-version, pyproject.toml, then .tool-versions | | Go | .go-version, go.mod, then .tool-versions | | Rust | rust-toolchain, rust-toolchain.toml, then .tool-versions | | Ruby | .ruby-version, then .tool-versions | | PHP | .php-version, then .tool-versions | | Swift | .swift-version, then .tool-versions | | Java | .java-version, then .tool-versions | | Bun | .bun-version, .tool-versions, then package.json | | Deno | .deno-version, .dvmrc, then .tool-versions | | Zig | .zig-version, then .tool-versions | | .NET | global.json, then .tool-versions | | Erlang and Pi | .tool-versions | When no version file matches, the hook restores the base PATH. omg use installs the requested version and updates its current symlink. A matching project pin controls PATH the next time the hook runs. Runtime archives have provider-specific host support; native runtime management runs on supported Unix targets and is not a native Windows installation path. ## Common runtime tasks ### Node.js ```sh omg use node lts omg list node omg list node --available omg which node ``` ### Python with a virtual environment ```sh omg use python 3.12 omg list python omg which python ``` Record the required installed Python version in .python-version before relying on the shell hook. At a new prompt, verify python3 --version and which -a python3. Then create a fresh environment with python3 -m venv .venv. Invoke .venv/bin/python and .venv/bin/python -m pip explicitly: the v0.2.0 Bash and Zsh hooks reset PATH at each prompt and can undo virtual-environment activation. ### Rust components through rust-toolchain.toml ```sh [toolchain] channel = "stable" components = ["clippy", "rustfmt"] ``` ### Deno ```sh omg use deno latest echo "2.9" > .deno-version omg list deno --available ``` On Arch, Debian, and Ubuntu, omg env capture records explicit package names and the versions found by probing supported OMG runtimes and registry tools. Teammates use omg env check to inspect drift. This capture path is unavailable on Fedora and macOS. The lock does not record system package versions or application dependencies. ## Where versions live and how they are verified - Every runtime installs under the OMG data directory. The default versions path is ~/.local/share/omg/versions on Linux and ~/Library/Application Support/omg/versions on macOS. Runtime switching does not need sudo. - Verification depends on the provider. Archive-based managers compare published SHA-256 checksums when available; Python uses python-build-standalone metadata, Java uses Adoptium checksums, and Bun and Deno use release metadata or checksum sidecars. Pi installs through npm with lifecycle scripts disabled. - Direct runtime downloads use HTTPS with certificate validation. - OMG stages an installation in a temporary directory on the same filesystem, then publishes the version directory after installation and validation succeed. - Each installed version has its own directory. Switch away before removing it with omg use --uninstall. Uninstall requires an explicit version; it does not infer the version from a project pin. ## Migrating from other version managers > There are no automatic migration subcommands. omg migrate only exports and imports a portable environment manifest. Migration from nvm, pyenv, or rustup is manual and non-destructive. 1. Note your versions with the old tool, for example nvm list or pyenv versions. 2. Install the same versions with OMG. ```sh omg use node 20 ``` 3. Keep both managers installed until you trust the switch, then remove the old entries from your shell profile. ## When versions do not switch 1. Inspect the version OMG selected. ```sh omg which node ``` 2. Check that the selected directory comes first in PATH. ```sh which -a node ``` 3. Confirm the project pin requests an installed version. ```sh cat .node-version ``` 4. Install or reactivate the requested version. ```sh omg use node 20.10.0 ``` 5. Restart the shell so the hook reloads. ```sh exec zsh ``` If the shell hook is missing entirely, PATH never updates on directory change. Confirm that eval of omg hook for your shell is present in the profile, and see the troubleshooting topic for the full checklist. Conflicting global packages from a previous manager can shadow OMG binaries; remove those PATH entries first. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/mod.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/runtimes/node.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/node.rs) - [omg-cli/omg/src/runtimes/python.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/python.rs) - [omg-cli/omg/src/runtimes/python/catalog.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/python/catalog.rs) - [omg-cli/omg/src/runtimes/go.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/go.rs) - [omg-cli/omg/src/runtimes/rust.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/rust.rs) - [omg-cli/omg/src/runtimes/bun.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/bun.rs) - [omg-cli/omg/src/runtimes/ruby.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/ruby.rs) - [omg-cli/omg/src/runtimes/java.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/java.rs) - [omg-cli/omg/src/runtimes/deno.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/deno.rs) - [omg-cli/omg/src/runtimes/pi.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/pi.rs) - [omg-cli/omg/src/runtimes/zig.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/zig.rs) - [omg-cli/omg/src/runtimes/dotnet.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/dotnet.rs) - [omg-cli/omg/src/runtimes/erlang.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/erlang.rs) - [omg-cli/omg/src/runtimes/php.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/php.rs) - [omg-cli/omg/src/runtimes/swift.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/swift.rs) - [omg-cli/omg/src/runtimes/tool_registry.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/tool_registry.rs) - [omg-cli/omg/src/core/runtime_resolver.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/runtime_resolver.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Daily workflows Daily development, team onboarding, CI, and maintenance routines; lockfile workflows apply to Arch, Debian, and Ubuntu. Canonical: https://getomg.dev/docs/workflows/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## A daily development loop 1. Start the day with a system check. ```sh omg status ``` 2. Apply available updates when you are ready. ```sh omg update ``` 3. Change into a project. The shell hook reads version files and selects matching installed runtimes automatically; it does not install missing versions. 4. Run project tasks without knowing the ecosystem tool. ```sh omg run dev ``` 5. Record the day at a natural stopping point. ```sh omg env capture ``` ### Inspect, preview, approve, verify Every mutation follows the same order. The dashed line is the step most people skip: going back to inspect when the preview surprises them. | Step | Detail | | --- | --- | | Inspect the package | search, info, why | | Preview the change | dry run first | | Review source and policy | AUR and rules | | Approve the mutation | the real command | | Check the result | native state and history | Connections: Inspect the package to Preview the change; Preview the change to Review source and policy; Review source and policy to Approve the mutation; Approve the mutation to Check the result; Review source and policy to Inspect the package (adjust). On Arch, Debian, and Ubuntu, omg env capture writes explicit package names and probed OMG runtime and registry-tool versions to omg.lock. Commit that file with your project and run omg env check to inspect drift. It does not record system package versions or all application dependencies. Fedora and macOS do not support this capture path. ## Team onboarding 1. The team lead pins versions in version files and captures omg.lock. 2. Commit the lockfile and version files to the repository. ```sh git add omg.lock .nvmrc .python-version ``` 3. A new member installs OMG and the shell hook, clones the project, and verifies the machine against the lock. ```sh omg env check ``` 4. Differences are visible immediately; fix them before running the project. ```sh omg run dev ``` ### Keeping a team in sync ```sh omg team init mycompany/frontend omg team pull omg env capture omg team push ``` > Environment capture and drift checks require an Arch, Debian, or Ubuntu backend. omg env share publishes the lockfile as a GitHub Gist and needs GITHUB_TOKEN. Teammates fetch and check it with omg env sync followed by the Gist URL; sync does not install missing software. ## CI and container pipelines 1. Install OMG in a setup step and add ~/.local/bin to PATH. 2. Fail fast when the runner does not match the committed lockfile. ```sh omg env check ``` 3. Run tasks through the task runner. ```sh omg run test ``` 4. Print the recommended Linux cache paths and lockfile-based key, then copy them into your CI provider cache step. ```sh omg ci cache ``` ### Generate CI configuration ```sh omg ci init github omg ci init gitlab omg ci validate ``` In Docker images, install a chosen OMG release in a RUN step, copy the project including omg.lock and version files, and install the required runtimes before checking the inventory. omg env check compares state; it does not install anything. Use --yes only on commands that accept it. Required source reviews and attended AUR security gates can still prevent non-interactive installation. ## A practical security routine ### Periodic security review ```sh omg audit omg audit secrets -p . omg audit sbom -o sbom.json omg audit verify ``` In v0.2.0, SBOM generation supports Arch, Debian, Ubuntu, and Fedora when inventory and advisory data are available, and vulnerability scans can run without a daemon. Ordinary scans report findings; use omg audit scan --fail-on-findings when CI must fail on vulnerabilities. Inventory-only SBOMs explicitly omit advisory matching and are not clean scan results. The secret scan covers your project directory. audit verify checks the retained log for local consistency; filesystem access can still delete, truncate, or rewrite it. Review the results before changing packages. ## System maintenance ### Weekly maintenance ```sh omg update omg clean --orphans omg clean --cache omg doctor ``` > Remove an installed runtime with omg use --uninstall. Switch away from an active version first, then confirm the result with omg list . 1. Before a major upgrade, create a restoration point. ```sh omg snapshot create -m "Before upgrade" ``` 2. Review recent transactions if anything looks wrong. ```sh omg history --limit 20 ``` 3. Roll back the last transaction if the upgrade misbehaves. ```sh omg rollback ``` ## Monitoring from the shell prompt ### Prompt helper functions on Zsh ```sh omg-ec omg-uc ``` The Bash and Zsh shell hooks provide count functions for prompts. omg-ec shows explicit packages, omg-tc shows all packages, omg-oc shows orphans, and omg-uc shows available updates. They use the daemon binary status snapshot when it is fresh; consult omg status or the native package manager when you need current counts. Run omg dash for a full-screen view. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/workflows.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/workflows.md) - [omg-cli/omg/src/cli/env.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/env.rs) - [omg-cli/omg/src/core/env/fingerprint.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/env/fingerprint.rs) - [omg-cli/omg/src/core/env/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/env/mod.rs) - [omg-cli/omg/src/core/env/portable.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/env/portable.rs) - [omg-cli/omg/src/core/env/team.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/env/team.rs) - [omg-cli/omg/src/cli/team.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/team.rs) - [omg-cli/omg/src/cli/ci.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/ci.rs) - [omg-cli/omg/src/core/task_runner.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/task_runner.rs) - [omg-cli/omg/src/cli/security.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/security.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Security model Package policy, vulnerability and secret scanning, SBOM export, Sigstore checks, telemetry, and the tamper-evident audit log. Canonical: https://getomg.dev/docs/security/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Security grades ### How OMG classifies packages | Grade | Classification | | --- | --- | | Locked | Reserved for provenance evidence. Automatic grading does not assign it | | Verified | Official repository metadata identifies the package | | Community | AUR and other nonofficial package sources | | Risk | The configured vulnerability scanner found a known vulnerability | > The grade order is Risk, Community, Verified, then Locked. Current automatic grading returns Risk, Community, or Verified. A package name alone never grants Locked status. ## Vulnerability scanning In v0.2.0 (public beta), omg audit scan prefers a running omgd and falls back to direct package-backend scanning when the daemon is unavailable. Package admission and advisory scans use the batch POST /v2/packages/assess/local endpoint (up to 32 coordinates per batch, with Cache-Control: no-cache on admission) returning deterministic policy_verdict values (reject_malware, reject_exploited, warn_vulnerable, warn_partial, allow) alongside zero-day, CISA KEV, EUVD, and EPSS signals, with automatic OSV fallback. Debian and Ubuntu installs simulate full transitive changes via apt-get -s before PackageReview, and macOS Homebrew installs screen DistributionPackage coordinates through PackageReview. A scan with no findings is not proof that every package is safe. Findings are reported without failing by default; use omg audit scan --fail-on-findings for a nonzero exit when vulnerabilities are found. > Scan coverage depends on the advisory source and its freshness. This website has not verified continuously up-to-date production CVE ingestion. GitHub security commits are a record of code changes, not a live vulnerability-database status check. ### Scan and report ```sh omg audit omg audit scan --fail-on-findings omg audit log --severity error omg audit eol ``` > OSV requests use the shared HTTP client with a five-second connection timeout and a fifteen-second total timeout. The vulnerability scanner does not retry a failed request. > For CI, distinguish a completed scan with findings from a scanner failure. --fail-on-findings makes findings fail the command; inventory or advisory errors also fail rather than becoming an empty successful scan. Review the reported coverage and advisory source. ## Artifact signature verification ### How an artifact signature is checked A successful check ties the file you hold to the signing identity you specified. It is not a build-level or safety verdict. | Step | Detail | | --- | --- | | Downloaded artifact | the file you hold | | Expected identity | email or OIDC URI | | SHA-256 digest | computed locally | | Rekor SET | signed entry timestamp | | Fulcio certificate | chain checked | | Signature verified | identity is bound | | Not a SLSA level | nor proof of safety | Connections: Downloaded artifact to SHA-256 digest; SHA-256 digest to Rekor SET; Rekor SET to Fulcio certificate; Fulcio certificate to Signature verified; Expected identity to Signature verified (must match); Signature verified to Not a SLSA level (with limits). - Runtime installers and self-update compare downloaded bytes with the expected SHA-256 digest when that digest is available. - AUR key preparation invokes gpg to inspect and import keys required by a build. - omg audit slsa verifies a Sigstore hashedrekord artifact signature and Rekor signed entry timestamp (SET) against the pinned log key. It does not independently verify a Merkle inclusion proof or checkpoint. - Supply an independently trusted publisher email or OIDC URI with `--certificate-identity`. The v0.2.0 parser requires this option; choosing an identity from the untrusted artifact itself does not establish trust. - The current hashedrekord check does not establish build provenance or assign a SLSA level. It is a standalone audit and does not gate installation. ### Verify a downloaded artifact ```sh omg audit slsa artifacts/package.pkg.tar.zst --certificate-identity "$EXPECTED_SIGNER_IDENTITY" ``` ## Policy enforcement On Arch, OMG checks policy.toml against the prepared ALPM transaction, including dependencies. It rejects candidates below minimum_grade, disallowed AUR sources, packages below Verified when require_pgp is true, licenses outside allowed_licenses, and banned_packages. Native APT, DNF, and Homebrew installs and upgrades refuse an explicit policy because a separate precheck cannot guarantee their final transactions. ### Inspect the active policy ```sh omg audit policy ``` ## SBOM generation and compliance ### Generate and export evidence ```sh omg audit sbom -o sbom.json omg audit log --export audit.csv omg audit export --framework soc2 --output ./audit-evidence omg enterprise audit-export --framework soc2 --period 2026-Q1 ``` In v0.2.0, the CLI writes a CycloneDX 1.5 system-package SBOM on Arch, Debian, Ubuntu, and Fedora when inventory and advisory data are available; Homebrew is unsupported. The SBOM contains installed package identities and matched findings, not application dependency graphs. An inventory or advisory failure stops default generation. If the installed inventory changes during collection, generation also fails rather than combining inconsistent snapshots. > omg audit export --framework soc2 writes an audit log, vulnerability scan, SBOM, and policy snapshot on a supported backend. Failure to collect a required component stops the export. Other accepted framework names return an unimplemented error. --period is metadata, not a time-range filter. The separate enterprise audit-export writes a generic inventory bundle for its accepted framework labels. These plaintext files are evidence to review, not compliance certification. > Use omg audit sbom --inventory-only -o inventory.json when you need package inventory without advisory matching. v0.2.0 labels that omission in the SBOM; the result cannot be read as a clean vulnerability scan. Inventory failures still stop generation. The default command requires advisory matching. ## License review and vulnerability fixes ### Review installed package licenses on Arch ```sh omg audit licenses omg audit licenses --check-policy omg audit fix --dry-run ``` The installed-package license report and automatic vulnerability fix require the Arch backend. On Debian, Ubuntu, Fedora, and macOS they return an unsupported-backend error. In v0.2.0, --check-policy evaluates the complete installed Arch inventory and exits nonzero on violations, even when --filter narrows the displayed report. A successful check only establishes that the configured local license restrictions were satisfied. omg audit fix upgrades affected Arch packages when updates are available; review the dry run first. > For machine-readable license output, use omg audit licenses --format json or --format csv. Add --check-policy when the command must also enforce the configured allowed-license list. Review the full policy before relying on the exit status. ## Secret scanning ### Detected credential families | Credential type | Severity | | --- | --- | | AWS access and secret keys | Critical | | GitHub and GitLab tokens | Critical | | Private keys | Critical | | Stripe live keys | Critical | | Slack tokens and Google API keys | High | | NPM tokens | High | | JWT and generic API keys or passwords | Medium | ### Scan a project ```sh omg audit secrets omg audit secrets -p /path/to/project ``` > The scanner skips placeholder-shaped values such as your_api_key_here, example_token, and template variables. Markdown and text files are still scanned, so realistic example credentials can trigger findings. ## Tamper-evident audit log Package changes, security scan summaries, policy rejections, and daemon lifecycle events are appended to audit/audit.jsonl under the OMG data directory. Editing a retained entry breaks its hash chain. The local chain cannot prove that an attacker with filesystem access did not delete or truncate entries. ### Review and prove integrity ```sh omg audit log --limit 50 omg audit verify ``` ### How each entry is linked ```sh # entry N carries both the previous entry hash and its own: # "prev_hash": hash(entry N-1) # "hash": sha256(canonical fields + prev_hash) # Writers read the last hash under a lock, so two concurrent processes # cannot fork the chain, and a writer that starts after another one has # appended keeps the linkage correct instead of reusing a stale value. # verify recomputes the linkage and reports the first entry that does not match omg audit verify ``` > Chain verification proves internal consistency, not authorship or completeness. Anyone who can rewrite the file can recompute the chain, so treat it as local tamper evidence rather than an independently anchored record. ## Telemetry is opt-in - Runtime telemetry is disabled by default and activates only after you explicitly enable it. - Installer tracking asks for consent, defaults to no, and can be skipped permanently with OMG_NO_TELEMETRY=1. - At runtime, OMG_TELEMETRY=0 or OMG_DISABLE_TELEMETRY=1 also disables collection. - Collected telemetry never includes package names, search queries, file paths, arguments, or error output. - Events are queued locally in your data directory and sent only over HTTPS, and network failures never fail the command you ran. ### Manage telemetry and export local data ```sh omg privacy status omg privacy opt-out omg privacy export ``` ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/security.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/security.md) - [omg-cli/omg/src/cli/security.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/security.rs) - [omg-cli/omg/src/core/security/scan.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/scan.rs) - [omg-cli/omg/src/core/security/vulnerability.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/vulnerability.rs) - [omg-cli/omg/src/core/security/sbom.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/sbom.rs) - [omg-cli/omg/src/core/security/sbom_shared.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/sbom_shared.rs) - [omg-cli/omg/src/core/security/policy.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/policy.rs) - [omg-cli/omg/src/core/security/audit.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/audit.rs) - [omg-cli/omg/src/core/security/secrets.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/secrets.rs) - [omg-cli/omg/src/core/security/slsa.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/slsa.rs) - [omg-cli/omg/src/core/security/pgp.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/pgp.rs) - [omg-cli/omg/src/core/http.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/http.rs) - [omg-cli/omg/src/core/telemetry.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/telemetry.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Troubleshooting Fix daemon, shell hook, policy, cache, and rollback problems with the diagnostics OMG ships for each failure mode. Canonical: https://getomg.dev/docs/troubleshooting/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Start with the built-in diagnostics ### First commands to run ```sh omg doctor omg status omg --version ``` ### Which result points where Read the exit status first, then follow the line that matches it. Change nothing until you know which one you are looking at. | Step | Detail | | --- | --- | | One command failed | start here | | omg doctor | reads exit status | | command not found | PATH problem | | daemon-status | background helper | | audit policy | rule rejection | | Keep the evidence | before you change anything | Connections: One command failed to omg doctor; omg doctor to command not found (PATH); omg doctor to daemon-status (socket); omg doctor to audit policy (rejected); command not found to Keep the evidence; daemon-status to Keep the evidence; audit policy to Keep the evidence. omg doctor checks connectivity, required tools, package-backend health, the daemon, PATH, and the shell hook. Add --network to test mirrors. Add --eol to flag end-of-life runtime versions. Most sections below start from these results. ## Daemon problems Current Linux and macOS release archives include a matching omgd. Archives from v0.1.222 and earlier omit it on non-Arch targets. When no daemon is running, supported package queries use the direct backend path. Use omg daemon-status to inspect the daemon. 1. Check whether the daemon responds. ```sh omg daemon-status ``` 2. Start it if needed. ```sh omg daemon ``` 3. Run omgd in the foreground to see startup errors. It removes stale sockets only after ownership checks. ```sh omgd ``` 4. If you use a systemd user service, inspect its recent log. ```sh journalctl --user -u omgd -n 50 ``` > Permission denied on the socket usually means XDG_RUNTIME_DIR or its socket has the wrong owner. Do not delete a socket owned by another user. Fix the directory ownership, then start the daemon as your own user. ## Shell hook and completions 1. Confirm the hook is installed in your profile. ```sh grep "omg hook" ~/.zshrc ``` 2. Reinstall it if missing. ```sh echo 'eval "$(omg hook zsh)"' >> ~/.zshrc ``` 3. Restart the shell completely, not just re-source the profile. ```sh exec zsh ``` 4. Test the hook in a project with a version file. ```sh omg which node ``` Check whether a prompt theme runs full package queries on each prompt. Prefer the cached prompt functions such as omg-ec for counts; a running daemon refreshes their snapshot. Runtime pin detection itself reads project files and installed versions. For broken completions, regenerate them and rebuild the Zsh completion cache. ### Regenerate completions ```sh omg completions zsh rm -f ~/.zcompdump && compinit ``` ## Search, AUR builds, and policy blocks ### Package problems and first fixes | Symptom | Fix | | --- | --- | | Search returns nothing | Refresh package databases with omg sync, then retry the search | | AUR build fails | Install base-devel, clear AUR build directories with omg clean --aur, and retry | | Install blocked by policy | Read the rule in the error and inspect the active policy with omg audit policy | | Rollback fails | The package cache lacks the old version; fetch it from the distribution archive | On Arch, policy rejections name the violated rule, such as a grade below minimum_grade or a disallowed AUR source. On native APT, DNF, and Homebrew paths, an explicit policy can stop an install because OMG cannot enforce it against the final native transaction. Inspect policy.toml and the active backend before changing either. ### AUR build recovery ```sh pacman -Q base-devel omg clean --aur omg install ``` ## Runtime downloads and switching When a version will not switch, an older manager often precedes the OMG path. Run which -a node to see every candidate in order. Remove stale PATH entries, run omg use again, then restart the shell with exec zsh. Read the specific download error before retrying. Check connectivity to the runtime origin, proxy settings, and free space in the directory shown by omg config get data_dir. A checksum mismatch, rejected archive path, or missing launcher is an integrity failure: preserve the error and do not disable verification. Unsupported runtime names fail by design; OMG does not install a fallback manager for them. ## Cache and history corruption 1. Restart the daemon to clear its in-memory search and package caches. ```sh pkill -x omgd; omg daemon ``` 2. If the status snapshot is corrupt, stop the daemon and move the snapshot aside before restarting. ```sh pkill -x omgd; data_dir="$(omg config get data_dir)"; mv "$data_dir/status-cache.json" "$data_dir/status-cache.json.bak"; omg daemon ``` 3. Reading malformed history fails and leaves the original file in place. When a later transaction is recorded, OMG can quarantine malformed history before starting a fresh log. Preserve the original and inspect any existing recovery copies. ```sh data_dir="$(omg config get data_dir)"; ls "$data_dir"/history.json.corrupt-* ``` > If omg audit verify fails, back up the audit log instead of editing it. Editing a hash-chained log makes reconstruction harder; the backup preserves evidence. ## Rollback limits On Arch, official package rollback needs the old archive in the pacman cache. If it is missing, obtain the exact package from a trusted distribution archive, review its provenance, and install the local file explicitly. On Debian or Ubuntu, rollback asks APT to install the recorded package version, which must still be available from configured sources. ### Install a downloaded Arch package ```sh omg install ./package.pkg.tar.zst --allow-local-file ``` > On Arch, AUR rollback rebuilds the historical commit recorded for the transaction. Debian cannot restore AUR package changes. ## Last-resort reset and bug reports 1. Use a full reset only after targeted recovery fails. Stop the daemon first. ```sh pkill -x omgd ``` 2. Print the data directory and review it before moving anything. ```sh omg config get data_dir ``` 3. Move the reviewed data directory aside instead of deleting it. On macOS this also moves configuration. ```sh data_dir="$(omg config get data_dir)"; mv "$data_dir" "$data_dir.bak" ``` 4. On Linux or WSL, move the separate configuration directory aside. ```sh mv ~/.config/omg ~/.config/omg.bak ``` 5. Start the daemon and confirm the clean state. ```sh omg daemon && omg status ``` When reporting a problem, include four artifacts. Send the operating system release, omg --version, the output of omg doctor, and the failing command with its error output. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/troubleshooting.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/troubleshooting.md) - [omg-cli/omg/src/core/history.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/history.rs) - [omg-cli/omg/src/cli/doctor.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/doctor.rs) - [omg-cli/omg/src/core/paths.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/paths.rs) - [omg-cli/omg/src/daemon/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/mod.rs) - [omg-cli/omg/src/daemon/cache.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/cache.rs) - [omg-cli/omg/src/daemon/server.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/server.rs) - [omg-cli/omg/src/cli/snapshot.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/snapshot.rs) - [omg-cli/omg/src/cli/packages/clean.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/packages/clean.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Architecture How the omg CLI and omgd daemon use caches, a Unix socket, and a status snapshot read by Bash and Zsh prompt helpers. Canonical: https://getomg.dev/docs/architecture/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Two release binaries ### The OMG binaries and their roles | Binary | Role | | --- | --- | | omg | The CLI handles arguments, package operations, policy, output, interactive views, and prompt counters | | omgd | The daemon maintains an in-memory package index, background status refresh, and caches | Current Linux and macOS release archives include both binaries. Archives from v0.1.222 and earlier omit omgd on non-Arch targets. The CLI talks to the daemon over a Unix socket when omgd is running. Bash and Zsh hooks provide prompt count helpers that read the fixed-size omg.status snapshot beside the socket. The v0.2.0 CLI also provides omg ec, omg tc, omg oc, and omg uc with daemon and backend fallbacks. ## What happens on a search ### Search request path A running daemon answers from memory. Without one, the same query takes the direct backend path. | Step | Detail | | --- | --- | | omg search | your command | | omgd daemon | only when running | | Direct backend | no daemon needed | | Cache lookup | in-memory hit or miss | | In-memory index | | | Official repositories | libalpm, APT, RPM | | AUR | over HTTPS | Connections: omg search to omgd daemon (daemon running); omg search to Direct backend (no daemon); omgd daemon to Cache lookup; Cache lookup to In-memory index (cache miss); In-memory index to Official repositories; In-memory index to AUR (AUR query); Direct backend to Official repositories. 1. A simple omg search or omg info call takes an optimized path. Search may query a running daemon; Debian package info can read the local APT database directly. 2. When a daemon answers, it checks its in-memory cache. 3. On a daemon cache miss, the daemon searches its in-memory package index and remote sources. 4. The daemon caches that result and returns it to the CLI. 5. If the daemon is unavailable, the CLI uses the same direct backend path. On Arch, official repositories and the AUR can be queried in parallel. On Arch, OMG binds libalpm through direct FFI instead of invoking pacman for queries. Rust bindings do not remove the dependency on the C libalpm library; required C fallbacks remain. Debian and Ubuntu read the native APT database. Fedora reads RPM data directly, with a subprocess fallback when the database format requires it. AUR requests use HTTPS. Fedora support does not establish RHEL compatibility. ## What happens on a runtime switch ### Runtime switch path Every step stays inside your own data directory, so no administrator password is involved. | Step | Detail | | --- | --- | | Detect the runtime | node, python, rust | | Version installed? | checked in the data dir | | Download release | from the provider | | Check integrity data | provider-specific | | Extract version | versions/runtime/version | | Update current link | | | Project PATH updated | by the shell hook | Connections: Detect the runtime to Version installed?; Version installed? to Download release (missing); Download release to Check integrity data; Check integrity data to Extract version; Extract version to Update current link; Update current link to Project PATH updated. 1. The CLI detects the runtime type and checks whether the requested version is installed. 2. If not, it downloads the release from its configured provider and checks the integrity data available for that provider. 3. The version is extracted under versions/runtime/version in the OMG data directory. 4. The current symlink records the selected version. When a project pin exists, the shell hook prepends that concrete version directory to PATH. > Unknown runtime names fail explicitly. OMG does not invoke or download another version manager. A Node project pin can reuse a matching binary from an existing nvm directory. Pi installs through npm with lifecycle scripts disabled. ## Cache tiers ### From hottest to most durable | Tier | What it holds | | --- | --- | | In-memory | Recent searches, package details, and system status shared by all CLI instances | | Status snapshots | Versioned JSON persisted with atomic writes for quick status and history-independent cache state | | Binary status file | Fixed-size omg.status counts read by Bash and Zsh hook helpers; CLI count commands can also use daemon and backend fallbacks | Search indexes are rebuilt from native package-manager databases rather than treated as durable authority. The status-cache.json snapshot is derived state; transaction history, audit logs, installed runtimes, and package archives have separate purposes and must not be treated as disposable status caches. Status snapshots use a same-directory temporary file, fsync, and atomic rename. ### The binary snapshot is a fixed record, not a summary ```sh # omg.status is exactly 32 bytes, laid out as: # offset 0 4 bytes magic 0x4F4D4753 ("OMGS") # offset 4 4 bytes format version # offset 8 16 bytes four u32 counts: total, explicit, orphan, updates # offset 24 8 bytes unix timestamp in seconds # Hook helpers accept the file only when its owner, size, format, and age pass # validation. When it is missing or stale, check current state with omg status. omg-ec # explicitly installed packages in Bash or Zsh omg-uc # updates available in Bash or Zsh ``` > A snapshot can lag a package change between refreshes, so a prompt counter is not a transaction record. Use omg status for a fresh count and the native package tool when you need the authority. ## IPC protocol - Transport is a Unix domain socket with length-delimited framing. - Messages use a compact binary serialization format chosen for low latency. - Requests cover search, package info, system status, security audits, explicit package listings, and cache or health controls. - A daemon cache hit returns the stored result. A miss searches the in-memory index and, when the command needs them, the native databases and remote sources. - Without a running daemon, the CLI falls back to direct package-manager queries instead of failing. ### What one call puts on the wire ```sh # frame = [ length ][ version prefix ][ bitcode payload ] # both peers reject a version prefix they do not understand # 1. the CLI writes one request frame # 2. the daemon decodes it and routes it to a handler # 3. the daemon writes one response frame # 4. a decode error fails the call; it is never reported as an empty success # For unprivileged users: OMG_SOCKET_PATH, then $XDG_RUNTIME_DIR/omg.sock. # Without XDG_RUNTIME_DIR, Unix uses /run/user/$UID/omg.sock when available, # otherwise a validated private /tmp/omg-$UID directory or home fallback. # It will not use another user's socket when ownership checks fail. omg daemon-status ``` > The socket stays on the local machine and carries no transport encryption or authentication beyond filesystem ownership. It is not a network interface. ## Security paths 1. Runtime and self-update downloads verify expected SHA-256 digests. 2. AUR key preparation uses gpg to inspect and import required keys. 3. omg audit slsa verifies a Sigstore hashedrekord artifact signature and Rekor signed entry timestamp. It does not verify a Merkle inclusion proof or establish build provenance. 4. In v0.2.0 (public beta), omg audit prefers omgd and can fall back to a direct scan. Package admission uses batch POST /v2/packages/assess/local (with policy_verdict and OSV fallback), Arch and Fedora keep native advisory paths, and Debian, Ubuntu, and Homebrew installs enforce PackageReview. 5. Arch installs and updates check policy.toml against prepared transactions. Native APT, DNF, and Homebrew mutations refuse explicit policy. Runtime operations stay inside the user data directory. System package operations can elevate through sudo when the native backend requires it. Sensitive writes use atomic replacement where implemented, and audited security events are appended to a hash-chained log. ## Background workers and shutdown - A status refresh worker probes runtime versions, counts vulnerabilities, updates caches, and rewrites the binary status file and JSON snapshot. - An optional ALSA scanner periodically fetches Arch security advisories and matches them against installed packages. - On SIGINT or SIGTERM the daemon stops accepting connections, lets active requests finish, stops workers, and cleans up the socket. The daemon maintains derived query and status state rather than owning native package transactions. Prefer a graceful shutdown and restart it with omg daemon when needed; its caches repopulate on demand. Package-manager locks and transaction recovery remain the responsibility of the active backend. ## Source and applicability Source-reviewed documentation, not a claim that every command was executed on every supported platform. Development-only behavior is explicitly identified in the text. - [omg-cli/omg/docs/architecture.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/architecture.md) - [omg-cli/omg/src/daemon/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/mod.rs) - [omg-cli/omg/src/daemon/cache.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/cache.rs) - [omg-cli/omg/src/daemon/db.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/db.rs) - [omg-cli/omg/src/daemon/index.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/index.rs) - [omg-cli/omg/src/daemon/protocol.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/protocol.rs) - [omg-cli/omg/src/daemon/handlers.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/handlers.rs) - [omg-cli/omg/src/daemon/server.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/server.rs) - [omg-cli/omg/src/daemon/status_policy.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/status_policy.rs) - [omg-cli/omg/src/core/client.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/client.rs) - [omg-cli/omg/src/core/fast_status.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/fast_status.rs) - [omg-cli/omg/src/core/paths.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/paths.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) - Reviewed source commit: 395d1846350897945be7a5dda444f8ba3fbcad27 --- # Start using OMG Install a verified OMG release, inspect your system, and select a project runtime without changing system packages. Canonical: https://getomg.dev/docs/getting-started/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Choose your installation This walkthrough installs OMG in your account, checks its setup, and selects a Node.js version. System package installation is a separate, optional step. Use a terminal on one of the released platforms. Linux archives target x86_64 and use the distribution's package backend. The macOS archive targets Apple Silicon. | System | Package backend | | ----------------------- | ----------------------------------------- | | Arch Linux x86_64 | ALPM and AUR | | Debian or Ubuntu x86_64 | Native APT | | Fedora x86_64 | DNF and RPM | | Apple Silicon macOS | Homebrew | | Windows | Use a supported Linux distribution in WSL | Debian 13 and Ubuntu 26.04 need the APT 7 archive included in v0.2.0. Intel macOS, native Windows, and Linux ARM do not have matching published archives. Read [installation](/docs/installation/) before choosing a download for another system. Keep your native package manager available. OMG is still approaching beta, and package transactions can affect the whole system. ## Run the installer You need HTTPS access, `curl`, Bash, and the GitHub CLI, `gh`. The installer uses `gh` to verify build provenance in addition to checking the archive's SHA-256 digest. ```bash curl -fsSL https://getomg.dev/install.sh | bash ``` To read the installer before running it, open [install.sh](https://getomg.dev/install.sh). The public script URL can change independently of this guide's release. For a pinned installer source, use the release script as described in [installation](/docs/installation/). The one-liner installs the current release. To install this guide's pinned release without editing shell startup files instead: ```bash curl -fsSL https://getomg.dev/install.sh | OMG_VERSION=v0.2.0 OMG_NO_TELEMETRY=1 OMG_SKIP_SHELL=1 bash export PATH="$HOME/.local/bin:$PATH" omg --version omgd --version ``` Both version commands should identify 0.1.224. The prebuilt installer puts the matching programs in `~/.local/bin` by default. The source-build path has separate compiler prerequisites and can offer to install build dependencies. If the installer cannot verify a checksum or attestation, keep the error and retry only after checking the cause. Install `gh` through your trusted system package source if it is missing. ## Check the setup Run these commands as your regular user: ```bash omg --help omg doctor omg status --fast omg search ripgrep --no-aur ``` Help lists the ordinary command groups. `omg --all-commands --help` also includes advanced commands. Status reports package counts, and search reads configured package sources without installing the result. `omg doctor` exits with code 0 when its checks pass and code 1 when it finds issues. Add `--network` to probe mirror connectivity or `--eol` to inspect runtime end-of-life status. `doctor --turbo` primes sudo credentials and is a separate operation. Search may need network access. On Arch, `--no-aur` excludes community results. Other backends do not gain AUR support from this option. ## Select a runtime Install and select a Node.js 22 release in your user account: ```bash omg use node 22 omg list node omg which node ``` The first command can download a matching release. `omg which node` prints the selected version, rather than an executable path. The major request `22` does not lock a specific patch release. To use installed versions automatically in a project, add the hook for your shell. For Bash, add this line once to `~/.bashrc`, then open a new terminal: ```bash eval "$(omg hook bash)" ``` Zsh and Fish setup, pin precedence, and removal are covered in [shell integration](/docs/shell/). The hook selects installed versions. It does not download missing ones. Enter a project with a `.node-version` file and check both selection and execution: ```bash omg which node node --version command -v node ``` If the pin names an unavailable release, install that version with `omg use node VERSION`, replacing `VERSION` with the project's exact request. Keep application dependencies and their lockfiles under the project's normal package manager. ## Preview a system package change If you want to install a system package, inspect its metadata and preview the operation first: ```bash omg info ripgrep omg install --dry-run ripgrep ``` To apply that change, run `omg install ripgrep` and review the confirmation. The native backend may request administrator credentials. Package names and dependencies vary by distribution. Run OMG as your regular user and let the transaction request elevation. A root invocation uses different state paths and ignores caller-controlled OMG path overrides. Read [package management](/docs/packages/) before using removal, cleanup, AUR builds, or update shortcuts. ## Recover from setup problems If the shell cannot find OMG, repeat the PATH export above and inspect `command -v omg`. If several installations appear in your PATH, identify their owners before replacing files. If a command cannot contact package sources, run `omg doctor --network` and compare with your native package manager. A network failure does not mean that the local runtime store needs to be removed. The optional daemon keeps derived status and package data warm. Start with `omg daemon-status`; read [daemon operation](/docs/daemon/) if you want to enable it. Most package commands work without it. Keep the exact command, version, and error for support. Remove tokens and private paths before sharing logs. Continue with [runtime management](/docs/runtimes/), [project tasks](/docs/tasks/), or [troubleshooting](/docs/troubleshooting/). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/getting-started.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/getting-started.md) - [omg-cli/omg/install.sh](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/install.sh) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) - [omg-cli/omg/src/cli/doctor.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/doctor.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage system packages Search, preview, install, update, remove, and clean system packages with the limits of each native backend. Canonical: https://getomg.dev/docs/packages/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Check the backend first Install the build for your operating system and run package transactions as your regular user. OMG requests elevation when its native backend needs it. | Platform | Package source | Limit to keep in mind | | ------------------- | ----------------------------- | ---------------------------------------- | | Arch Linux | Official repositories and AUR | AUR packages build from reviewed recipes | | Debian and Ubuntu | Native APT | Package cache cleanup is not implemented | | Fedora | DNF and RPM | No AUR builds | | Apple Silicon macOS | Homebrew | No AUR builds | | Native Windows | None | Use a supported WSL distribution | The `debian-pure` build feature supports index and test work. It refuses live Debian or Ubuntu package mutations. See [installation](/docs/installation/) for the release and backend matrix. ## Find a package and its source ```bash omg search ripgrep ``` The first three matches in the recorded Arch Linux session on OMG v0.2.0 were: ```text ripgrep 15.2.0-1 ℹ Official ripgrep-all 0.10.10-3 ℹ Official ripgrep-all-git 0.10.10.462.g0f10fb9-1 ⚠ AUR ``` Press Enter on a result to inspect its details or Esc to return to the prompt. Package versions and ordering follow your current package index. To see more metadata, restrict the search to official packages, or inspect a package by name: ```bash omg search ripgrep --detailed --limit 30 omg search ripgrep --no-aur omg info ripgrep ``` Search defaults to 15 results. On Arch, it includes AUR entries unless you pass `--no-aur`. `--detailed` adds source metadata where available. Use `--json` only with commands whose output contract you have checked in the [CLI reference](/docs/cli/). To inspect an installed package's relationships and disk use: ```bash omg why ripgrep omg why ripgrep --reverse omg size --limit 10 omg size --tree ripgrep omg blame ripgrep ``` Available details depend on the backend and recorded history. `--reverse` asks what depends on the package. ## Preview and install ```bash omg install --dry-run ripgrep omg install ripgrep ``` The preview describes the requested operation without applying the package transaction. It can still read package metadata and contact sources. The real command can install dependencies and change the system package database. Name several packages in one invocation when you want one operation. Bare `omg install` requires an attended picker and fails without a terminal. It does not install a project's application dependencies. `--yes` skips ordinary confirmation. `--review` forces PKGBUILD review for AUR builds. Normal AUR review is already enabled by the default `aur.review_pkgbuild` setting. Separate AUR approvals and policy checks are not blanket-disabled by `--yes`. For a local package archive, explicitly permit file input: ```bash omg install --allow-local-file ./package.pkg.tar.zst ``` Use an archive format supported by your backend and review its origin first. See [security](/docs/security/) for policy and signature limits. ## Check and apply updates ```bash omg outdated omg update --check omg update --dry-run omg update ``` The normal update workflow can update system packages and managed runtimes. On Arch, it also handles installed AUR packages. Use these options only for the workflow they describe: - `--check` lists updates without installing them. - `--dry-run` previews the transaction. - `--yes` skips ordinary confirmation. - `--review` forces review for each AUR build. - `--no-sync` uses cached package metadata. - `--aur-only` skips the official database sync and system upgrade on Arch. - `--fast` combines sync and upgrade without a preview. - `--turbo` skips sync and uses cached data with the optimized Arch path. `--aur-only` conflicts with both `--fast` and `--turbo`. These performance modes do not promise equivalent support on every backend. Prefer the normal update path while diagnosing a failure. `omg sync` refreshes package metadata without installing updates. Refreshing metadata can change a later preview. ## Remove and clean deliberately ```bash omg remove --dry-run ripgrep omg remove ripgrep ``` `--recursive` also removes unused dependencies on Arch. Other backends do not promise that behavior. Add `--yes` only after reviewing the package set. Bare `omg clean` lists cleanup actions. Preview a chosen action before applying it: ```bash omg clean --orphans --dry-run omg clean --cache --dry-run omg clean --aur --dry-run ``` `--all` combines orphan, cache, and AUR cleanup. `--yes` skips ordinary confirmation. The APT backend rejects `--cache`, `--aur`, and `--all`. Fedora supports orphan and downloaded package cache cleanup, with no AUR cleanup. On Arch, cache cleanup keeps one recent package version by default. Warnings about versions mentioned in history do not preserve those artifacts. Cleanup can therefore remove files needed for a later rollback. ## Check results and retain recovery evidence ```bash omg explicit omg explicit --count omg ec omg tc omg oc omg uc omg history --limit 5 ``` The four short counters report explicit, total, orphan, and available-update counts. A cached count can lag a transaction. Use package metadata and the transaction result to confirm the actual change. Command errors return a nonzero status. Security scans report findings without failing by default; pass `omg audit scan --fail-on-findings` in CI to fail on findings. History covers supported OMG transactions, rather than every action through the native package manager. Rollback depends on the backend and older package availability. It does not restore all machine state. If a transaction fails, keep its output and inspect `omg doctor` before deleting caches or retrying with different privileges. Use the native package tool to investigate backend failures. Read [troubleshooting](/docs/troubleshooting/) for diagnostics, [configuration](/docs/configuration/) for AUR settings, and [updates](/docs/updates/) for updating OMG itself. ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/packages.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/packages.md) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) - [omg-cli/omg/src/cli/packages/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/packages/mod.rs) - [omg-cli/omg/src/cli/packages/update/arch.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/packages/update/arch.rs) - [omg-cli/omg/src/config/settings.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/config/settings.rs) --- # Activate runtimes in your shell Add Bash, Zsh, or Fish hooks, inspect project pin precedence, install completions, and remove integration safely. Canonical: https://getomg.dev/docs/shell/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Add the hook for your shell Install OMG and confirm that `omg --version` works before editing shell startup files. Inspect the file for an existing OMG hook and keep one copy. | Shell | Startup file | Line to add | | ----- | ---------------------------- | ------------------------- | | Bash | `~/.bashrc` | `eval "$(omg hook bash)"` | | Zsh | `~/.zshrc` | `eval "$(omg hook zsh)"` | | Fish | `~/.config/fish/config.fish` | `omg hook fish \| source` | `omg hook SHELL` prints integration code. The normal command does not edit the startup file. `omg init` offers an interactive setup path if you want OMG to help make that edit. Open a new terminal after adding the line. Automatic runtime activation supports Bash, Zsh, and Fish. PowerShell and Elvish completion generation does not imply a runtime hook for those shells. ## Install the version before entering a project The hook selects installed runtimes. It does not install a missing version or application dependencies. For a project that requests Node.js 22: ```bash omg use node 22 omg list node ``` Enter the project containing its version file, then inspect selection and execution: ```bash omg which node node --version command -v node ``` `omg which node` reports a version. `command -v node` reports which command the shell resolves. Check both when several runtime managers are installed. A major request such as `22` can select a matching installed patch release. Commit an exact version when the project needs an exact patch pin. ## Resolve competing project pins The hook checks the current directory before its ancestors. A nearer directory's pin wins. Within a directory, OMG processes its version-file list before supported mise layers. For Node.js, the same-directory order is: 1. `.node-version` 2. `.nvmrc` 3. `.tool-versions` 4. `package.json` 5. Supported mise `[tools]` layers Within `package.json`, `engines.node` overrides `volta.node`. These fields can contain a version request rather than an exact patch. The hook's precedence is specific to shell detection; individual runtime commands can have their own resolver. Other supported inputs include: | Runtime | Dedicated inputs before `.tool-versions` | | ------- | -------------------------------------------- | | Python | `.python-version`, then `pyproject.toml` | | Go | `.go-version`, then `go.mod` | | Rust | `rust-toolchain`, then `rust-toolchain.toml` | | Deno | `.deno-version`, then `.dvmrc` | | Bun | `.bun-version` | | Java | `.java-version` | | Ruby | `.ruby-version` | | PHP | `.php-version` | | Swift | `.swift-version` | | Zig | `.zig-version` | | .NET | `global.json` | The hook accepts supported native pins from layered mise files. Backend-qualified tools, plugins, and version arrays are outside the native compatibility contract. Read [runtime management](/docs/runtimes/) and [project tasks](/docs/tasks/) before migrating a more complex setup. Malformed current-directory pins produce a warning and leave the base PATH in use. Malformed ancestor pins are skipped with a warning. A valid file with a missing installed version still does not trigger a download. ## Keep task environments separate Shell hooks read runtime pins. They do not load mise `[env]`, read dotenv files, or execute mise source scripts. An explicit `omg run` task can resolve that project environment and execute repository-controlled code. The shell hook restores the base PATH it recorded before applying directory pins. A later PATH change, including a Python virtual environment activation, can be replaced on a subsequent prompt or directory change. For a Python command that must use the project's virtual environment, invoke its executable explicitly: ```bash .venv/bin/python --version ``` A project's `.venv` stays tied to the interpreter that created it, even if OMG switches the active global Python version; recreate the virtual environment when you change its base Python. ## Install command completions Completions and runtime activation are separate. To install a generated completion file for your user: ```bash omg completions bash ``` Replace `bash` with `zsh`, `fish`, `powershell`, or `elvish`. Read the printed destination and restart or reload the shell as needed. To inspect the generated script without installing it: ```bash omg completions zsh --stdout ``` Dynamic suggestions depend on backend metadata. A suggestion does not validate a package or perform an installation. ## Use counters as status hints Bash and Zsh hooks define `omg-ec`, `omg-tc`, `omg-oc`, and `omg-uc`. They report explicit, total, orphan, and available-update counts from a validated status snapshot. The snapshot has a five-minute freshness limit. Zsh also caches helper values for up to 60 seconds. Bash reads the snapshot for each helper call. Fish does not define these helpers; use `omg ec`, `omg tc`, `omg oc`, and `omg uc` instead. Rejected or missing snapshots can produce fallback values. Use [daemon status](/docs/daemon/) and package commands when you need current evidence. ## Remove integration or diagnose a failure Use the matching shell when removing recognized OMG-owned hook lines: ```bash omg hook zsh --uninstall ``` This writes an `.omg-backup` beside the startup file. It refuses to rewrite a symlink-managed file; edit the managed source instead. Start a new shell to discard functions and PATH state from the old hook. If selection is wrong, inspect the nearest pin, installed versions, and `command -v` before removing another manager. If completion installation fails, inspect the printed destination and permissions. Invalid shell names and unsupported hooks fail rather than enabling a partial integration. Read [configuration](/docs/configuration/) for storage overrides and [troubleshooting](/docs/troubleshooting/) for diagnosis. ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/shell-integration.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/shell-integration.md) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) - [omg-cli/omg/src/hooks/completions.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/completions.rs) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) --- # Operate the optional daemon Start and inspect omgd, configure a user service, understand cached state, and recover from socket or upgrade problems. Canonical: https://getomg.dev/docs/daemon/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Decide whether to run omgd `omgd` keeps derived package indexes, security state, and status snapshots warm. Package transactions still run through the CLI and selected native backend. The daemon requires Unix domain sockets. Use the matching `omg` and `omgd` from your supported Linux or macOS release. Run both as your regular user. | Operation | Without a daemon | | ------------------------------------------------ | ---------------------------------------------------- | | Search, information, install, remove, and update | Uses the direct backend path | | Package counters | Uses a fresh status snapshot or direct package data | | `omg audit scan` | Uses a direct cold scan | | `omg audit sbom` | Uses supported system inventory and advisory sources | | `omg metrics` | Fails because it requires the daemon | SBOM inventory supports Arch, Debian, Ubuntu, and Fedora. Running a daemon does not add an unsupported inventory backend. ## Inspect the current process before starting another ```bash omg --version omgd --version omg daemon-status ``` Status prints whether the socket exists, whether the daemon answers, and available metrics. When reachable, it also reports cached package status. In v0.2.0, `daemon-status` can return success after printing a missing socket, failed connection, or failed ping. Read its diagnostic text. Do not use its exit status alone as a readiness check. `omg metrics` requires a successful daemon connection and is a separate command. Read the [CLI reference](/docs/cli/) before parsing its output in monitoring scripts. ## Start in the foreground for diagnosis If status shows no running daemon, start it in an attended terminal: ```bash omg daemon --foreground ``` Keep that terminal open and run `omg daemon-status` from another terminal under the same account. Foreground startup lets you inspect startup and request errors directly. For a detached process, use: ```bash omg daemon ``` Startup takes an exclusive lock before touching the socket. Another responding instance causes startup to stop instead of launching a second daemon. The lock releases when the process exits. The CLI has no `omg daemon stop` subcommand. Stop a foreground instance with Ctrl+C. For a detached process, use its service manager or identify its owner and process before sending SIGTERM. ## Resolve the socket as the same user For a regular user, the socket location is selected in this order: 1. `OMG_SOCKET_PATH`, when set to a nonempty value. 2. `XDG_RUNTIME_DIR/omg.sock`. 3. `/run/user/UID/omg.sock`. 4. `/tmp/omg-UID/omg.sock`. 5. A private run directory under the data directory if the temporary fallback is unsafe. Use the actual UID of the account running the daemon. `omg daemon-status` shows the resolved path or a diagnostic about that path. The socket uses mode `0600`; its private parent uses mode `0700`. Client and daemon validate directory type, ownership, and permissions. A stale socket is removed during startup only after the safety checks pass. Keep socket permissions private to one user and configure each user session separately. Running OMG through `sudo` uses root state paths instead of inheriting user overrides. Root ignores caller-controlled `OMG_CONFIG_DIR`, `OMG_DATA_DIR`, `OMG_CACHE_DIR`, `OMG_DAEMON_DATA_DIR`, and `OMG_SOCKET_PATH`. See [configuration](/docs/configuration/) for the complete path contract. ## Use your user service manager If you already configured the documented Linux user service, inspect and restart that service with: ```bash systemctl --user status omgd.service journalctl --user -u omgd.service -n 50 ``` These commands assume that `omgd.service` exists in your user session. They do not install a unit or apply to macOS. Use the service setup in [configuration](/docs/configuration/) and point `ExecStart` at the installed `omgd` executable. Run a service in the foreground under the manager so the manager owns its lifecycle and captures output. Avoid starting a detached CLI instance alongside an already managed service. ## Understand stale counts The daemon maintains memory caches, a package index, JSON status, and a binary status snapshot for prompt counters. Native package databases remain the package authority. A background pass refreshes vital signs every five minutes. Package changes between passes can leave counters behind. A failed refresh leaves the previous snapshot available for readers that accept it. The daemon does not own transaction history. Removing its derived state is therefore a different operation from removing installed runtimes or history. Do not delete the entire OMG data directory to repair a cache. See [architecture](/docs/architecture/) for request ownership and [package management](/docs/packages/) for transaction verification. ## Restart after replacing the binaries After a verified OMG update, check the installed pair again: ```bash omg --version omgd --version ``` Replacing the executable files does not update the process already in memory. For the configured Linux user service: ```bash systemctl --user restart omgd.service omg daemon-status ``` For a manual foreground instance, stop the old process and start `omg daemon --foreground` again. Do not start another daemon to hide a version mismatch. SIGINT and SIGTERM stop new connections, cancel background work, and allow owned tasks up to 30 seconds to finish. A forced termination can leave an old snapshot or socket, so inspect state before restarting. ## Recover from startup errors If another daemon responds, use that instance or stop it through its owner. If a socket belongs to another UID, check your account and overrides before changing ownership. If no process responds, retain the startup error, socket path, and directory ownership details. Startup can recover a genuinely stale socket after validating its parent. Do not remove arbitrary socket files as a first step. A missing daemon does not block ordinary package commands. Continue through the direct backend while diagnosing, or use [troubleshooting](/docs/troubleshooting/) for the reported error. Read [updates](/docs/updates/) before repairing an installed binary pair. ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/daemon.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/daemon.md) - [omg-cli/omg/src/daemon/server.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/daemon/server.rs) - [omg-cli/omg/src/cli/commands.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/commands.rs) - [omg-cli/omg/src/cli/daemon_status.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/daemon_status.rs) - [omg-cli/omg/src/core/paths.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/paths.rs) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) --- # Capture and compare environments Record inventory in omg.lock, detect drift, share a reviewed Gist, and preview explicit package mappings for another platform. Canonical: https://getomg.dev/docs/environments/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Check what capture can record Environment capture records detected runtime and tool versions together with explicitly installed system package names. It writes `omg.lock` in your current directory. Capture and live drift checking require an Arch or Debian package backend in v0.2.0. This includes the native Debian backend used on Ubuntu. Fedora and Homebrew targets are supported by the portability planner, not by `omg env capture` or `omg env check`. The runtime probe iterates all supported native runtime names and registry tool names. Only successfully detected versions are recorded. It is not a fixed subset of seven runtimes, nor a list of everything that could be installed. The lockfile records package names rather than their versions. It contains neither an application dependency graph nor dotfile contents. Keep npm, Cargo, Python, and other project lockfiles alongside your build instructions. ## Capture a reviewed baseline Open a terminal in the project whose inventory you want to record. If an existing lockfile matters, preserve it before recapturing. ```bash omg env capture less omg.lock ``` Capture writes normalized TOML with a schema version, detected versions, explicit package names, a timestamp, and a state hash. Review the package list before committing or publishing it. Inventory can reveal private tools or organizational details. The hash checks consistency of the file's own contents. A writer can recalculate it. Trust comes from the file's owner, reviewed history, or sharing source rather than that hash. Readers reject malformed lockfiles, unsupported newer schemas, non-regular files, symlinks, and files above the 16 MiB limit. Do not edit a hash to silence an unexplained failure. ## Detect drift without repairing it ```bash omg env check ``` The check compares a fresh capture against `omg.lock`. It exits successfully when there is no detected drift. Missing or invalid locks, unsupported capture backends, probe errors, and detected drift cause failure. Use it as a CI condition only on a backend that can perform the underlying capture. The check covers only the captured inventory fields, not exact system package versions or application dependencies. For an intentional environment change, review the difference and recapture the baseline. For an unintended change, install or select the intended tools through their normal commands, then check again. The check command does not install missing packages. To compare two saved snapshots rather than the current machine: ```bash omg diff --from before.lock after.lock ``` Without `--from`, `omg diff` compares its destination lock with the current environment. Its comparison scope remains the inventory fields. ## Share a lockfile through GitHub Gist Sharing needs a `GITHUB_TOKEN` that GitHub accepts for Gist creation. Supply it through your existing secret mechanism; keep it out of committed files and command arguments. Review `omg.lock`, then upload it: ```bash omg env share --description "Project development inventory" ``` The default creates a secret Gist. A secret Gist is unlisted, not access-controlled private storage. Anyone who obtains its URL can read it. OMG may print the visibility label `Private`, which refers to GitHub's unlisted secret Gist rather than access-controlled storage. `--public` creates a public Gist. The description defaults to `OMG Environment State` and is bounded to 1000 bytes by the implementation. The file content is uploaded as `omg.lock`. Sharing contacts GitHub and does not synchronize installed software. Missing tokens, rejected requests, and unreadable locks fail the command. ## Pull a shared inventory Use a Gist you reviewed and whose owner you trust: ```bash omg env sync https://gist.github.com/OWNER/0123abcdef ``` Replace the example owner and ID. You can also pass the hexadecimal ID alone. Gist URLs must use HTTPS on `gist.github.com` without a query or fragment; IDs must contain 7 to 64 hexadecimal characters. Sync validates the downloaded lock before writing it. When a readable regular local lock differs, the previous content is saved as `omg.lock.backup`. A later replacement can overwrite that backup, so preserve important history separately. After replacing the file, sync runs a local drift check. A nonzero result can therefore mean the download and write succeeded but your environment differs. Inspect both the new file and the reported drift before retrying. Sync downloads inventory. It does not install packages, select runtimes, copy dotfiles, or recreate application dependencies. ## Export explicit portability intent Export starts from an existing valid lockfile. State the platform where the capture was made: ```bash omg env export --source-target arch-x86_64 ``` The old capture schema cannot verify your source declaration. The command prints a starter TOML environment section and does not overwrite `.omg.toml`. Review and merge that section into the project's configuration. Package names are not assumed to mean the same thing on another distribution. Declare each destination mapping yourself: ```toml [environment] schema_version = 1 tools = ["git", "compiler"] [environment.runtimes] node = "22" [environment.packages.arch-x86_64] git = "git" compiler = "base-devel" [environment.packages.ubuntu-x86_64] git = "git" compiler = "build-essential" [environment.dotfiles] "dotfiles/editor.toml" = ".config/editor/config.toml" ``` Keep the separate `[scripts]` section if the project uses task preferences. ## Preview another platform ```bash omg env plan --target ubuntu-x86_64 ``` The planner reads `.omg.toml` and prints JSON. Supported explicit targets are `arch-x86_64`, `debian-x86_64`, `ubuntu-x86_64`, `fedora-x86_64`, and `macos-aarch64`. Planning does not install tools, contact registries, copy files, execute scripts, or change `omg.lock`. Runtime requirements remain uninterpreted intent. Missing mappings appear in `unmapped_tools`; exit success means valid input, not that every tool is mapped or available. Dotfile sources are relative to the manifest directory and destinations to the user's home. Validation checks path syntax. It does not inspect contents, existence, symlinks, ownership, or destination conflicts on disk. The schema accepts manifests up to 256 KiB, at most 512 tools, and at most 128 dotfile mappings. Invalid targets, undeclared tool mappings, unsafe paths, and duplicate destinations fail validation. OMG does not include an `omg env apply` command. Keep destination installation and file copying explicit. See [workflows](/docs/workflows/) for onboarding, [configuration](/docs/configuration/) for project versus user settings, and [troubleshooting](/docs/troubleshooting/) for lockfile failures. ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/environment-portability.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/environment-portability.md) - [omg-cli/omg/src/cli/env.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/env.rs) - [omg-cli/omg/src/core/env/fingerprint.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/env/fingerprint.rs) - [omg-cli/omg/src/core/env/portable.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/env/portable.rs) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) --- # Run project tasks Run detected project tasks, choose an ecosystem, forward arguments, and use the supported mise, watch, and parallel modes. Canonical: https://getomg.dev/docs/tasks/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Prepare the project `omg run` executes repository-defined code. Review the project and its parent configuration before running tasks from an unfamiliar checkout. Install the project's runtime, build tools, and application dependencies first. OMG can offer to install a missing runtime or enable a JavaScript manager, but task discovery does not install the whole development environment. Open a terminal in the project directory. Most task discovery reads that directory only. Supported mise files can also come from ancestors. ## Run a named task For a project that defines `build` and `test`: ```bash omg run build omg run test -- --coverage ``` OMG prints the selected ecosystem and source file before execution. Arguments after `--` belong to the task. Choose arguments supported by the actual underlying command. Requested task names accept ASCII letters, digits, hyphens, underscores, and dots. A name such as `test:watch` is rejected. Run that script with its native tool when the name cannot be changed. There is no `omg run --list` option. Read scripts or targets in the project files, or use the ecosystem's native task-list command. ## Check what OMG can discover | Project marker | Discovered tasks or entry point | | --- | --- | | `package.json` | `scripts`, plus `install` if there is no install script | | `deno.json` | `tasks` through `deno task` | | `composer.json` | `scripts` through `composer run-script` | | `Cargo.toml` | `build`, `test`, `check`, `run`, `clippy`, `fmt` | | `Makefile` | Plain targets the detector can read | | `pyproject.toml` | `[tool.poetry.scripts]` through `poetry run` | | `Pipfile` | `[scripts]` through `pipenv run` | | `pom.xml` | `clean`, `compile`, `test`, `package`, `install` | | `build.gradle` or `build.gradle.kts` | `build`, `test`, `run`, `clean` through `./gradlew` | | Supported mise files | Supported `[tasks]` entries through native OMG execution | | `Taskfile.yml` or `Taskfile.yaml` | `list`; other names can use the fallback | | `Rakefile` | `tasks`; other names can use the fallback | OMG does not discover `deno.jsonc`. Use `deno task` directly for a JSONC-only project. Taskfile and Rakefile support does not parse every declared task. When no discovered task matches, OMG tries an ordered marker-based fallback: Make, the JavaScript manager, Taskfile, Rake, Pipenv, Deno, then Composer. Without a marker, it tries an executable with the requested name. A misspelled task can therefore reach a fallback command rather than produce an inventory error. ## Choose between several ecosystems Rust tasks rank above JavaScript, then Python, Go, Ruby, Java, PHP, mise, and Make. Node, Bun, and Deno share the JavaScript priority. An unresolved highest-priority tie can prompt in an attended terminal and fails without one. Select a source explicitly when the project has competing tasks: ```bash omg run test --using rust omg run build --using node ``` To save a per-task preference, edit the project's `.omg.toml`: ```toml [scripts] test = "rust" build = "node" ``` Use `omg run test --all` to run all detected matches sequentially. Execution stops at the first failure. ## Check the JavaScript manager The detector checks `packageManager` first. Without a recognized field, it checks `bun.lockb`, `pnpm-lock.yaml`, `yarn.lock`, then `package-lock.json` or `npm-shrinkwrap.json`. With no marker, it uses npm. OMG does not use `bun.lock` as a detection marker. Set the manager explicitly in the project if that file is your only marker. ```json { "packageManager": "pnpm@9.0.0", "scripts": { "build": "vite build" } } ``` The field chooses the manager name. It does not pin or install the exact manager version after `@`. If pnpm or Yarn is missing, OMG can offer to enable it through Corepack. Verify the installed manager separately when exact versions matter. ## Use watch or parallel mode ```bash omg run test --watch omg run build,test --parallel ``` Watch reruns a task after watched files change. Stop it with Ctrl+C. An unsuccessful watched run is reported while the watcher can continue waiting for another change. Parallel mode accepts a comma-separated list of at most 16 names. Each task receives the arguments after `--`. Empty list entries are rejected. Check that concurrent tasks do not write the same output directory or shared fixture. `--watch`, `--parallel`, `--using`, and `--all` conflict with one another. Choose one mode per invocation; the parser rejects combinations. ## Run the supported mise subset OMG accepts a string task or a table with `run`, `depends`, `dir`, `env`, `description`, and `hide`. A run array executes in order and stops at failure. ```toml [tasks] generate = "echo ready" build = { run = "cargo build", depends = ["generate"] } ``` ```bash omg run build --using mise ``` Dependencies execute once in declared order. Missing dependencies and cycles fail before task execution. Arguments after `--` go only to the requested task. Task-local environment values do not flow into dependency tasks. Tasks run from the declaring configuration root unless `dir` supplies a literal relative path. Unsupported controls, dependency patterns, custom shells, file tasks, and templates in `run` or `dir` fail instead of being silently treated as supported. Layered mise project and local files can override earlier values. `MISE_ENV=test omg run test` selects the supported test layer. Comma-separated environment names are applied in order; later layers win. Explicit tasks resolve supported mise `[env]` values and `[env._]` path, file, and source directives. A source directive executes project code. Automatic shell hooks only select runtime pins and do not execute these environment sources. OMG does not import mise plugins, arbitrary backends, or `mise.lock`. Keep the native tool for features outside the supported subset. ## Make automated execution deterministic Preinstall the selected runtime and manager, install application dependencies, and resolve task ambiguity with `--using` or project preferences before running in CI. `omg run` has no `--yes` flag. Dependency installation prompts fail when no terminal is attached. `omg workspace run` has a separate `--yes` option for its own repository-command confirmation; that option does not belong to `omg run`. A failed child task causes `omg run` to exit nonzero and report the failure, though the exact numeric child exit code is not preserved on every task path. `--all` stops on failure; parallel mode reports task failures after the launched work. If detection picks the wrong task, inspect the reported file and select an ecosystem. If execution fails afterward, run the underlying command to diagnose project dependencies. Continue with [runtimes](/docs/runtimes/), [shell integration](/docs/shell/), [environment capture](/docs/environments/), and [troubleshooting](/docs/troubleshooting/). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/task-runner.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/task-runner.md) - [omg-cli/omg/src/core/task_runner.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/task_runner.rs) - [omg-cli/omg/src/config/mise_env.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/config/mise_env.rs) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) --- # Build and run containers Generate a reviewed Dockerfile, build with Docker or Podman, and run commands with explicit environment variables and mounts. Canonical: https://getomg.dev/docs/containers/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Connect an existing engine OMG wraps selected Docker and Podman commands. Install and configure an engine separately on your supported host. OMG prefers an available Podman executable, then Docker. ```bash omg container status omg container list omg container images ``` Status checks the detected engine by listing containers. A missing engine or failed engine request makes it fail. If both engines are installed, check the runtime named in the result before looking for a container in the other engine. Engine permissions, images, repository code, and host mounts remain separate trust decisions. Avoid exposing an engine socket or private host directory unless the container specifically needs it. ## Generate a project recipe From a project directory: ```bash omg container init ``` This writes `Dockerfile.omg`. It also creates or extends `.dockerignore` with protective rules and updates existing `Dockerfile.omg.dockerignore` and `.containerignore` files. Generation can run without a working engine. It generates a file rather than building an image or running a complete development environment. The default base is `ubuntu:24.04`. `--base` accepts another base-image reference: ```bash omg container init --base debian:bookworm-slim ``` Choose one init invocation. The command refuses to overwrite an existing `Dockerfile.omg`; inspect or preserve that file before regenerating it. OMG detects these project markers in the current directory: | Marker | Generator request | | -------------------------------------- | ----------------- | | `package.json` | Node `lts` | | `Cargo.toml` | Rust `stable` | | `go.mod` | Go `latest` | | `pyproject.toml` or `requirements.txt` | Python `3.12` | These are generator defaults. It does not resolve every project's exact runtime pin or application lockfile into an equivalent image. Some generated package commands use the base distribution's available versions. ## Review downloads and build context When the generated recipe needs a remote installer, OMG resolves a SHA-256 digest during generation and emits a verification step. Scripts are fetched over HTTPS; Go archive digests come from published Go release metadata. Generation fails if it cannot establish the required digests. The v0.2.0 CLI accepts `--base` for init and has no `--installer-digest` option. Retry a failed fetch after diagnosing publisher access rather than removing verification from the recipe. A digest captured during generation identifies the bytes fetched then. It does not authenticate the publisher independently or lock all later package downloads. Review every emitted install step before building. Inspect the recipe and ignore rules: ```bash less Dockerfile.omg less .dockerignore ``` The generated recipe copies the project into `/app`. Protective ignore rules reduce accidental inclusion of credentials and repository internals, but review your actual context and any engine-specific ignore file before sharing an image. ## Build the reviewed recipe ```bash omg container build --dockerfile Dockerfile.omg --tag myapp:dev ``` The current directory is the build context. `--dockerfile`, or `-f`, must name a valid relative path in that context. Without the flag, build looks for `Dockerfile`, rather than `Dockerfile.omg`. `--tag`, or `-t`, defaults to `omg-dev:latest`. Optional controls are `--no-cache`, repeatable `--build-arg KEY=VALUE`, and `--target` for a named build stage. ```bash omg container build -f Dockerfile.omg -t myapp:dev --no-cache ``` There is no trailing context argument for this OMG command. Build contacts package and image sources as required by the recipe. Success means the engine completed the build; run your application checks separately. ## Run a command with explicit inputs ```bash omg container run alpine -- echo hello omg container run alpine --env APP_MODE=test -- printenv APP_MODE ``` An ordinary run attaches with a TTY and removes the container on exit. `--interactive` explicitly requests the interactive configuration. `--detach` starts in the background and keeps the container after the launching command returns. The wrapper has no non-TTY attached mode. Exec also requests a TTY. Use the native engine when a pipeline needs its noninteractive controls. Use `--name` to choose a container name, `--workdir` for its working directory, repeatable `--env KEY=VALUE` for environment values, and repeatable `--volume HOST:CONTAINER` for mounts. ```bash omg container run alpine --volume "$PWD/data:/data" -- ls /data ``` Create and review the host data directory first. These mounts can expose writable host files. The wrapper rejects suffix modes such as `HOST:CONTAINER:ro`. Use the native engine directly when you need a read-only mount. Environment arguments require a nonempty key and `=`. Keep secrets out of ordinary command history and image build arguments. Use your engine's appropriate secret mechanism for credentials. ## Open a development shell ```bash omg container shell ``` The default shell uses `ubuntu:24.04`, mounts the current project at `/app`, and starts there. Files written through that mount can change the host project. Override the image with `--image`, the working directory with `--workdir`, or add `--env` and `--volume` entries. Changing `--workdir` does not remove the default project mount. The image must provide a usable shell and the programs you intend to run. The generator's recipe is a starting point; opening a shell does not validate the project's runtime or install dependencies. ## Manage an existing container ```bash omg container pull alpine omg container list omg container exec CONTAINER -- uname -a omg container stop CONTAINER ``` Replace `CONTAINER` with the exact name or ID you inspected. Pull downloads an image. Exec runs in an existing container; stop changes that container's state. Run, shell, and exec propagate a nonzero container process status through their wrapper path. Build, pull, stop, listing, and validation failures also fail the command. With `--detach`, a zero exit code only means the container started; check container logs and status to verify the application is healthy. If a command fails, inspect the engine's own status and logs. Check malformed mounts or environment entries before retrying. Preserve an existing recipe when generation refuses to overwrite it. See [project tasks](/docs/tasks/) for host execution, [installation](/docs/installation/) for verified OMG downloads, and [troubleshooting](/docs/troubleshooting/) for support evidence. ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/containers.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/containers.md) - [omg-cli/omg/src/cli/container.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/container.rs) - [omg-cli/omg/src/core/container.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/container.rs) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) --- # Update OMG and control notices Update a standalone OMG binary pair, restart omgd, and understand or disable advisory update notices. Canonical: https://getomg.dev/docs/updates/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Identify who owns the installed programs `omg self-update` updates OMG itself. `omg update` handles managed system packages and runtimes. Choose the operation that matches the thing you intend to change. Before updating, inspect the selected executables: ```bash command -v omg command -v omgd omg --version omgd --version ``` Use the standalone updater for a standalone installation you own. If your distribution or another package manager owns the executables, update through that package source. Avoid replacing package-managed files with a separate updater. Released Linux archives are backend-specific x86_64 builds. The macOS archive targets Apple Silicon. The updater chooses a compatible archive for its platform, including the available native APT ABI. ## Update a standalone installation You need network access, write access to the installation directory, and a trusted GitHub CLI capable of `gh attestation verify`. ```bash omg self-update ``` Without a requested version, the updater reads the production release marker at `https://releases.omg.latham.cloud/latest-version`. This marker can intentionally select a different release from GitHub's latest listing. The updater downloads the archive and SHA-256 sidecar, checks the digest, and verifies GitHub build provenance. It stages both `omg` and `omgd`, checks that each starts and reports the target version, then replaces the installed pair. Binary startup probes establish loader and version compatibility. They do not test every package operation on the host. The updater resolves `gh` from trusted fixed locations rather than arbitrary project PATH entries. A `gh` executable found by your shell is therefore not sufficient evidence that the updater accepts it. To request one specific release: ```bash omg self-update --version 0.1.224 ``` An equal version returns success without replacement. An older requested version fails unless `--force` is present. `--force` allows reinstallation or downgrade without turning off archive verification. To reinstall the same release: ```bash omg self-update --version 0.1.224 --force ``` Read the selected release's notes before a downgrade. Restoring old executable files does not automatically restore package state, installed runtimes, or configuration formats. ## Verify the pair and restart the daemon ```bash omg --version omgd --version omg daemon-status ``` The installed versions should match the requested release. A daemon already running in memory continues to use its old executable image until restarted. If you configured the Linux user service: ```bash systemctl --user restart omgd.service omg daemon-status ``` For a manually managed daemon, stop the identified old process and start `omg daemon` again. Do not launch a second instance alongside a running service. Read [daemon operation](/docs/daemon/) for startup ownership and diagnostic exit-status limits. ## Recover from a failed update A missing compatible archive, invalid checksum, rejected attestation, missing trusted `gh`, failed binary probe, or unwritable destination makes the update fail. If a candidate fails its startup probe, the existing pair remains in place. Replacement failures trigger restoration of previous files; if restoration itself needs attention, retain that error and inspect both installed programs before retrying. Install a supported GitHub CLI or repair the destination's ownership through its actual owner. Do not retry the whole operation as root just to inherit a user path override. Root ignores caller-controlled OMG storage, configuration, and socket overrides. For checksum or provenance failures, preserve the version, archive name, and full error. Retry only after checking the cause. The normal verification path should remain enabled. See [installation](/docs/installation/) for reinstalling a verified pair. Older updaters that replaced only `omg` can require a second forced update from the corrected updater to repair the daemon as well. ## Understand an update notice On Unix, an eligible successful interactive command can print an advisory that a newer final OMG release exists. Bash, Zsh, and Fish hooks can show the same notice. The foreground command reads local cached metadata. A separate background check has at most three seconds to fetch the release marker. The first eligible command can start that check; a later command can display its result. Checks and notices occur at most once per day per user cache. Failed network attempts count toward the check interval. Results older than seven days are ignored. Only strictly newer final versions without prerelease or build metadata are advertised. The check does not download an archive, replace a binary, or run an update. The request sends no install identifier or telemetry payload. The HTTPS server still receives normal request and network metadata. ## Explain a missing notice Notices are suppressed for root and CI sessions, quiet or JSON output, help and completion protocols, the updater itself, and other excluded command paths. Ordinary command notices require terminal stdout and stderr. Examples that suppress the notice include: ```bash omg status --json omg status --quiet omg status > status.txt ``` Failed commands do not receive an update notice or have their failure status replaced. An offline host, old cache, disabled check, or unsupported command path can all explain silence. A notice only compares version strings. Check the release notes and [security guide](/docs/security/) for security advisories and upgrade details. ## Disable or inspect notice state For Bash or Zsh, add this before the OMG hook in the shell configuration: ```bash export OMG_NO_UPDATE_CHECK=1 ``` For Fish: ```fish set -gx OMG_NO_UPDATE_CHECK 1 ``` The presence of `OMG_NO_UPDATE_CHECK` disables checks, even if its value is `0`. Remove or unset it to re-enable them. The other suppression rules still apply. Notice state lives in `update-notice.json` under the resolved OMG cache directory, normally `~/.cache/omg` on Linux. `OMG_CACHE_DIR` can override the location for a regular user. The cache contains check time, notice time, and the last version string. Unsafe, unreadable, symlinked, or oversized state is ignored. If the single notice file is damaged, preserve or remove that file after identifying its resolved path; the next eligible check can recreate it. Do not clear the entire data or runtime directory to repair an advisory cache. Read [configuration](/docs/configuration/) for platform paths and [troubleshooting](/docs/troubleshooting/) for persistent errors. ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/update-notices.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/update-notices.md) - [omg-cli/omg/src/cli/self_update.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/self_update.rs) - [omg-cli/omg/src/cli/update_notice.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/update_notice.rs) - [omg-cli/omg/src/core/paths.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/paths.rs) - [omg-cli/omg/install.sh](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/install.sh) --- # Install development tools Find registered CLI tools, install through their selected package manager, inspect trust controls, and update or remove managed tools. Canonical: https://getomg.dev/docs/tools/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Find a tool and its installation source `omg tool` installs command-line tools through a built-in name-to-source registry. It is separate from `omg use`, which selects native runtimes and tools supported by the runtime registry. Start by inspecting the selected source: ```bash omg tool search prettier omg tool registry ``` Search and registry list built-in names, package managers, and descriptions without querying remote registries. Registry entries can select system packages, npm, Cargo, pip, or Go. Source labels such as `pacman:ripgrep` delegate to the system-package install path, which uses the build's selected backend and that backend's package names. A package mapping is not guaranteed on every distribution. For example, `prettier` selects npm, while `cargo-watch` selects Cargo. Check the registry entry rather than assuming a familiar tool always uses its language package manager. ## Prepare the selected manager Install OMG on a supported Linux or Apple Silicon macOS host. Install the needed npm, Cargo, Python, or Go manager before using its tool source. You can select a supported runtime through [runtime management](/docs/runtimes/). Check the actual manager executable and version before installation, especially if several managers are on PATH. Run OMG as your regular user. Language-manager installs use managed user storage; system-package entries can request elevation through their native backend. ## Install and inspect a tool For the registered npm tool: ```bash omg tool install prettier omg tool list command -v prettier prettier --version ``` The install command names its source and package. A successful managed install stages the tool, validates its executable containment, records an installation security receipt, and publishes managed executable links. Managed payloads live under `tools/MANAGER/NAME` in OMG's data directory. Executable links live under that data directory's `bin`. Use [configuration](/docs/configuration/) for the platform-specific data path and supported overrides. `omg tool list` prints links in the managed bin directory. It is not a complete inventory of native system packages or every binary shipped by a package. If the command is not found after installation, inspect the printed link and your PATH. Add the resolved managed bin directory to your shell `PATH`, and avoid overwriting unrelated commands to resolve a name collision. ## Understand installation protections The managed language-tool path uses a staged home and a reduced environment by default. It avoids inheriting ambient registry, Git, SSH, cloud, and CI credentials. It rejects a project-local manager executable when the current directory is identified as a project. Installer stdin is closed. On Linux, manager processes also use `no_new_privs`. These controls restrict the installation process but do not make package code a complete filesystem or network sandbox. The defaults differ by manager: | Manager | Default | | -------------- | --------------------------------------------------------------------------------------------------------- | | npm | Public npm registry, initial install with scripts disabled, then `npm audit signatures` before activation | | Cargo | Isolated Cargo configuration and `cargo install --locked` | | pip | A dedicated virtual environment, public PyPI, and wheels only | | Go | Public proxy and checksum database, CGO disabled, and local toolchain only | | System package | Delegates to the selected package backend and its policy path | Cargo builds can execute crate build scripts, and installed tools run with your user account's permissions once invoked. These controls apply to `omg tool` language-manager installations; native `omg use` providers have their own download and verification contracts. ## Handle a package that needs an exception Read the manager's error before weakening a default. Prefer a package or published artifact that works with the normal protection. Exception variables accept comma-separated exact package matches, not prefix matches. | Variable | Exact match format | Effect | | -------------------------------------------- | --------------------- | ------------------------------------------------------------------- | | `OMG_TOOL_DANGEROUSLY_ALLOW_ALL_NPM_SCRIPTS` | npm package name | Allows a rebuild script phase after the initial verification step | | `OMG_TOOL_ALLOW_PIP_SDISTS` | pip package name | Allows source distributions and their build steps | | `OMG_TOOL_ALLOW_CARGO_UNLOCKED` | Cargo package name | Omits `--locked` | | `OMG_TOOL_ALLOW_GO_CGO` | Go package identifier | Allows CGO | | `OMG_TOOL_ALLOW_GO_TOOLCHAIN_DOWNLOAD` | Go package identifier | Allows Go toolchain downloads | | `OMG_TOOL_ALLOW_HOST_ENV` | `manager:package` | Inherits host environment and manager configuration | | `OMG_TOOL_ALLOW_UNVERIFIED` | `manager:package` | Skips the npm signature/provenance check for a matching npm install | The long npm variable name does not mean that setting any truthy value enables scripts globally. It still requires a matching package identifier. The approved rebuild can run dependency lifecycle scripts as part of that installation. Host-environment exceptions can expose credentials and change registry trust. An unverified exception removes an independent check; it does not repair a rejected signature. Scope any reviewed exception to one invocation and one exact package rather than exporting it permanently. OMG reports active overrides and records effective protections and executable hashes in `.omg-security-receipt.json` inside a managed install. This local receipt records the policy used during installation rather than an external signature. ## Install an unregistered name An unregistered name opens a source picker in an attended terminal. Choices are system packages, Cargo, npm, pip, and Go. Without a terminal, an unknown name fails instead of guessing a source. `omg tool install` has no `--source`, version, dry-run, or `--yes` option. Use the registry and the native manager when you need source controls outside this command. Choosing a source does not import arbitrary repository URLs or local paths. The managed package grammar validates the package identifier for that manager. ## Update a known tool ```bash omg tool update prettier omg tool update all ``` Updates reinstall through the registry's source and can use the network or rebuild packages. They do not preserve an exact old tool version by request. A failed staged managed install keeps the previously working payload before activation. Inspect the error and the version that still resolves before retrying. `update all` discovers managed installs, attempts updates, and reports failed names. It returns a failure if any attempted tool update fails. An unregistered tool cannot be updated automatically because the registry cannot determine its source. System packages delegated by the registry are normally updated through [package management](/docs/packages/). They are not all enumerated by `omg tool list` or the managed-store `update all` scan. ## Remove a tool and check command resolution ```bash omg tool remove prettier command -v prettier ``` Removal deletes the managed payload and cleans broken links in the managed bin directory. A system-package registry entry delegates removal to the package backend. A missing managed tool is an error. Another installation can still satisfy `command -v` after removal. Identify that executable's owner before deleting it. Install, update, and remove failures return nonzero. The global `--json` flag does not turn these human-readable handlers into a stable JSON protocol. If signatures fail, retain the exact package and error. If a wheel or locked Cargo build is unavailable, review the package's published artifacts before choosing an exception. For manager-path or link conflicts, preserve existing files and inspect ownership. Continue with [shell integration](/docs/shell/), [security](/docs/security/), and [troubleshooting](/docs/troubleshooting/). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/cli.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/cli.md) - [omg-cli/omg/src/cli/tool.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/tool.rs) - [omg-cli/omg/src/cli/args.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/args.rs) - [omg-cli/omg/src/core/paths.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/paths.rs) --- # Manage Ruby versions with OMG Install ruby-builder releases, select project Ruby versions, inspect gem paths, and understand host and checksum limits. Canonical: https://getomg.dev/runtimes/ruby/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Choose a Ruby build OMG v0.2.0 installs prebuilt MRI Ruby archives from `ruby/ruby-builder` GitHub releases. It does not compile Ruby or install JRuby through this manager. OMG selects `ubuntu-22.04` archives on Linux and `darwin` archives on macOS, with `x64` or `arm64` architecture tokens. A Linux target therefore means an Ubuntu-built, glibc-dependent payload, not verified compatibility with every Linux distribution. The requested release must contain the exact matching asset and its digest. OMG's published CLI binaries target Linux x86_64 and Apple Silicon macOS; use a supported Linux guest for WSL, as native Windows is unsupported. ## Install and inspect Choose a numeric version listed by the provider. Partial requests such as `3.2` resolve against the available Ruby release list; this manager has no `latest` alias. ```bash omg list ruby --available omg use ruby 3.2 omg list ruby omg which ruby ``` `omg use` installs when necessary and updates the managed `current` link. `omg which ruby` reports the selected version, not the executable path. With the OMG hook enabled, inspect the actual commands at a fresh prompt: ```bash ruby --version gem --version which -a ruby which -a gem ``` Bundler, project gems, and any compiler or system libraries needed for native gem extensions remain separate from OMG's Ruby installation. ## Pin a project Within one directory, `.ruby-version` takes priority over `.tool-versions`. The hook searches the current directory before its parents; supported mise tool layers follow the dedicated and universal pin files in each directory. Write the exact resolved version when the project needs a stable pin. For example, after confirming that `3.2.0` is the intended installed release: ```bash printf '%s\n' '3.2.0' > .ruby-version omg use ruby omg which ruby ``` This example is pin syntax, not a claim that an old Ruby release is appropriate for your project. Preserve an existing project pin rather than replacing it with the example. The hook selects installed versions; entering a directory does not download Ruby. ## Install a newer version or remove an old one Inspect `omg list ruby --available`, then use `omg use ruby VERSION` with the chosen numeric version. There is no separate `omg update ruby` command. Run the project's tests and install its dependencies with the project's existing Ruby tools. To remove a version, first switch to another installed version. Then run `omg use ruby VERSION --uninstall`, replacing `VERSION` with the exact directory version shown by `omg list ruby`. Removal refuses the active managed version; omitting the version does not infer one from the pin. ## Verification and storage The selected GitHub asset must publish a SHA-256 digest. OMG validates that digest, verifies the downloaded archive, extracts into staging, and checks the runtime layout before activation. Missing integrity metadata is an error rather than permission to install unchecked bytes. Checksums verify the upstream Ruby archive against GitHub release metadata, not gems installed afterward. Versions live under the OMG data directory in `versions/ruby`. Linux defaults to `~/.local/share/omg`; macOS defaults to `~/Library/Application Support/omg`. Inspect the active root with: ```bash omg config get data_dir ``` ## When Ruby or gem resolves unexpectedly | Symptom | Check | | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Release asset not found | Compare the exact Ruby version and host architecture with the provider list; an archive can be absent even when a release tag exists. | | Missing shared library | The Linux archive targets Ubuntu 22.04; inspect the host's compatibility rather than disabling checks. | | Ruby or gem comes from another manager | Compare `omg which ruby` with `which -a ruby` and `which -a gem`; inspect the shell hook and project pin. | | Gem command cannot find project dependencies | Use the project's Gemfile, lockfile, and Bundler workflow; OMG does not install those libraries. | ## Continue Read [runtime management](/docs/runtimes/), [configuration](/docs/configuration/), and [project tasks](/docs/tasks/). Source: [Ruby provider](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/ruby.rs), [runtime command dispatch](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [project pin detection](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/ruby.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/ruby.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage Java JDKs with OMG Install Temurin JDKs by feature number, use project pins, inspect JAVA_HOME, and understand patch-selection and host limits. Canonical: https://getomg.dev/runtimes/java/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Install a JDK by feature number OMG v0.2.0 downloads Eclipse Temurin JDKs from Eclipse Adoptium's API. It requests the HotSpot JDK image from the Eclipse vendor, not an arbitrary Java distribution or a standalone JRE. Java requests use a feature number: `21` and `21.0` select the same managed `21` directory. A patch request such as `21.0.5` is rejected. This is a feature-level selection, not an exact security-update or build pin. The manager does not provide `latest` or `lts` aliases. ```bash omg list java --available omg use java 21 omg list java omg which java ``` The remote list marks feature releases that Adoptium identifies as LTS; asset availability can still vary by architecture. ## Check host and executable selection The provider maps Linux and macOS on x86_64 and aarch64 to Adoptium's host identifiers. Installation requires a matching downloadable package and the expected extracted layout. OMG's published release binaries target Linux x86_64 and Apple Silicon macOS. The provider's broader architecture mapping does not add an OMG release target. Native Windows is unsupported; use a supported WSL guest for Linux workflows. With shell integration enabled, verify Java at a fresh prompt: ```bash java --version javac --version which -a java which -a javac ``` ## Pin a project The nearest directory containing a Java pin wins. Within one directory, `.java-version` precedes `.tool-versions`; supported mise layers are considered afterward. ```bash printf '%s\n' '21' > .java-version omg use java omg which java ``` Use the feature required by the project, not this example by default. `omg use java` can install the detected request. The prompt hook only selects a matching installed version and does not download missing JDKs. A full patch number in `.java-version` cannot name one of this manager's feature directories. Update the pin to a feature number (such as `21`) because this manager tracks feature-level directories rather than individual patches. ## Set JAVA_HOME when your build needs it The Java command prints a `JAVA_HOME` hint. Printing the path does not export it into the calling shell. The shell hook updates `PATH` for the selected runtime; it does not update a pre-existing `JAVA_HOME` used by Maven, Gradle, or an IDE. For Bash or Zsh, after selecting feature `21`, an explicit session setting is: ```bash export JAVA_HOME="$(omg config get data_dir)/versions/java/21" "$JAVA_HOME/bin/java" --version ``` Update that value when changing features. An IDE or service may have its own JDK setting and may not read interactive shell startup files. ## Change or remove a feature Use `omg use java FEATURE` to install or select another feature shown by the remote list. Reusing an already installed feature selects its existing directory; it is not a force-refresh command for the newest patch of that feature. To remove a feature, switch to another one first, then run `omg use java FEATURE --uninstall`. Java removal accepts the feature form, such as `21`; the active managed feature cannot be removed. There is no dedicated in-place JDK patch updater or `omg update java` command. If exact JDK build pinning is a requirement, this manager's feature-level contract is insufficient. ## Verification and troubleshooting Adoptium supplies the archive URL, filename, and SHA-256 checksum. OMG validates the metadata, verifies the download over HTTPS, stages extraction, and requires the runtime launcher before activation. Checksums verify the upstream JDK archive against Adoptium metadata, not application dependencies. | Symptom | Check | | -------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | Invalid Java version | Request a feature such as `21`, not a patch or an unsupported alias. | | No JDK for the host | Inspect the Adoptium feature/OS/architecture combination; availability can differ between features. | | Shell Java and build Java differ | Compare `which -a java`, `JAVA_HOME`, and the build tool's own JDK configuration. | | Old patch remains after selecting the same feature | Existing features are reused; feature selection does not imply a fresh download. | ## Continue See [runtime management](/docs/runtimes/), [configuration](/docs/configuration/), and [project tasks](/docs/tasks/). Source: [Adoptium provider](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/java.rs), [runtime dispatch](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [hook pin resolution](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/java.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/java.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage the Deno runtime with OMG Install verified Deno releases, pin JavaScript and TypeScript runtime versions, and keep Deno tasks and dependencies separate. Canonical: https://getomg.dev/runtimes/deno/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Choose a Deno release Deno is a JavaScript and TypeScript runtime. OMG v0.2.0 manages its executable; Deno itself remains responsible for project permissions, dependency resolution, lockfiles, and application execution. The provider downloads official `denoland/deno` GitHub release ZIPs. Its target map covers Linux GNU and macOS on x86_64 and aarch64. It does not select a musl-specific Linux archive or a Windows executable. OMG's published CLI binaries target Linux x86_64 and Apple Silicon macOS; WSL uses the Linux guest target rather than native Windows. ## Install and inspect ```bash omg list deno --available omg use deno latest omg list deno omg which deno ``` `latest` selects the newest stable release in the provider's bounded release list. Partial numeric requests also resolve against stable releases; an exact prerelease request is a different, explicit choice. The list is not an unbounded history of every Deno release. Use an exact version for a project that needs a repeatable runtime selection. `omg which deno` reports the selected version. With the shell hook enabled, check the executable at a fresh prompt: ```bash deno --version which -a deno ``` The activation directory exposes the installed version's `bin` directory without command shims. A Deno installed elsewhere can still win if another shell configuration puts it earlier on PATH. ## Pin a project Within a directory, Deno detection reads `.deno-version`, then `.dvmrc`, then `.tool-versions`. The current directory is checked before parent directories; supported mise layers follow those files within each directory. For an installed version intended by your project, an example pin is: ```bash printf '%s\n' '2.9.0' > .deno-version omg use deno omg which deno ``` Replace the example with the project's chosen release. The hook selects installed versions; it does not install a missing Deno when you enter the directory. A `deno.json` task definition is not a substitute for a Deno runtime version pin. ## Run the project's own Deno workflow Use Deno's normal project commands after confirming the runtime: ```bash deno task ``` OMG's task runner can discover tasks in `deno.json`. If an equal-priority task also exists in another ecosystem, select the intended ecosystem explicitly rather than relying on an interactive prompt in CI. See [project tasks](/docs/tasks/) for argument forwarding and selection modes. Keep the project's Deno lockfile and permission flags under review alongside runtime pins. ## Update or remove a version Use `omg list deno --available`, then `omg use deno VERSION` to install the chosen release. `omg use deno latest` asks the provider to resolve the current stable alias; it does not rewrite the project's version file. Switch to another installed version before running `omg use deno VERSION --uninstall`. The version is required and removal refuses the active managed version. There is no separate `omg update deno` command. ## Verify downloads and diagnose failures OMG requires either the GitHub asset's SHA-256 digest or the official archive's `.sha256sum` sidecar. The sidecar must identify the intended archive. A missing checksum or mismatch stops installation. The archive is extracted into staging and the expected Deno launcher is checked before publishing the version. Checksums verify the upstream archive against GitHub release metadata, not third-party modules Deno fetches later. | Symptom | Check | | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | Release or target ZIP is missing | Inspect the exact release and GNU Linux/macOS architecture mapping. | | Checksum data is absent | Use a release with supported integrity metadata; do not bypass verification. | | Deno remains unchanged after selection | Check the nearest pin, restart the hook, and compare `which -a deno`. | | Old version is absent from the remote list | Discovery uses a bounded recent-release window; an exact release lookup and a partial request are different operations. | ## Continue Read [runtime storage and hooks](/docs/runtimes/), [security boundaries](/docs/security/), and the [Node.js guide](/runtimes/node/) when choosing between runtimes. Source: [Deno provider](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/deno.rs), [runtime CLI](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [version-file hooks](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/deno.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/deno.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage Pi coding-agent versions with OMG Install exact Pi coding-agent releases with npm scripts disabled, pin projects, and understand Node, npm, and package-trust requirements. Canonical: https://getomg.dev/runtimes/pi/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## What this manager installs Pi is a coding-agent tool, not a programming language. OMG v0.2.0 manages versions of the npm package `@earendil-works/pi-coding-agent` in its own version tree. A working, compatible Node.js and npm must already be available on PATH. This manager invokes npm; it does not download a standalone Pi archive or automatically install Node.js for you. OMG's published CLI targets are Linux x86_64 and Apple Silicon macOS, with supported Linux guests used for WSL. There is no native Windows installation path here. Before installing Pi, check the toolchain that npm will use: ```bash node --version npm --version which -a node which -a npm ``` If you manage Node with OMG, select it first and verify it at a fresh prompt with the hook enabled. An existing system or third-party npm earlier on PATH is still the npm this provider can invoke. ## Install an exact release Select an exact published npm version. The version below illustrates the supported syntax; use the version required by your project or team. ```bash omg use pi 0.83.0 omg list pi omg which pi ``` `omg list pi --available` is explicitly unsupported in v0.2.0. The provider does not resolve `latest`, version ranges, or npm distribution tags into exact OMG version directories. Obtain the desired exact release from the package publisher before installing it. After successful installation and shell activation, inspect the executable at a fresh prompt: ```bash which -a pi ``` `omg which pi` is the selected version, while `which -a pi` shows command resolution. Pi's own usage and provider credentials remain part of Pi's configuration, not OMG's runtime configuration. ## Pin Pi alongside Node Pi has no dedicated `.pi-version` file in the shell hook. Use `.tool-versions` with an exact Pi version: ```text pi 0.83.0 ``` Add the entry to the project's existing `.tool-versions`; do not overwrite other runtime entries. A Node pin can coexist in the same file or in `.node-version`. ```bash omg use pi omg which pi ``` The nearest project pin wins. Within a directory, `.tool-versions` is considered before supported mise layers. The hook selects an installed Pi version and does not run `npm` when you enter a directory. ## Understand npm's role and the trust boundary OMG installs the exact package into a private staging prefix with npm's `--global --ignore-scripts --audit=false --fund=false` options and the public npm registry URL. Selected npm configuration overrides and `NODE_OPTIONS` are removed from the child environment. Lifecycle scripts are disabled during this installation. That does not make the installed package inert: running Pi executes package code with your user account's access. This is not the checksum-and-vendor-archive path used by most other OMG runtime providers. Before publication, OMG reads the installed package manifest, requires its version to match the exact request, and checks that `bin/pi` resolves to a file inside the installation prefix. A failed npm process or mismatched manifest stops activation. The resulting installation lives under `versions/pi` in the OMG data directory. Inspect the resolved data root with: ```bash omg config get data_dir ``` ## Change or remove a version Install another exact release with `omg use pi VERSION`. This updates the managed selection but does not edit a project pin. Keep the project's accepted Node.js and Pi versions aligned and run the project's usual acceptance checks. To remove an old version, select a different installed version first, then run `omg use pi VERSION --uninstall`. Removal requires an explicit exact version and refuses the active managed one. There is no dedicated `omg update pi` command. ## Troubleshoot installation and selection | Symptom | Check | | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- | | npm cannot be executed | Verify `npm --version` and PATH in the same shell that runs OMG. | | Remote listing is unsupported | Use an exact published npm version; OMG does not provide remote Pi discovery. | | Installed version differs from the request | OMG refuses that manifest rather than silently activating it. | | Another Pi executable runs | Compare the project pin, `omg which pi`, and `which -a pi`; inspect competing npm global directories. | | Pi cannot use its configured service | Inspect Pi's own configuration and credentials; successful OMG activation does not configure external providers. | ## Continue See [Node.js setup](/runtimes/node/), [runtime management](/docs/runtimes/), and [configuration](/docs/configuration/). Source: [Pi npm installer and validation](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/pi.rs), [runtime CLI](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [project hooks](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/pi.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/pi.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage Zig toolchains with OMG Install Zig from the official release index, verify SHA-256 downloads, pin projects, and distinguish release binaries from provider targets. Canonical: https://getomg.dev/runtimes/zig/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Choose a Zig toolchain OMG v0.2.0 downloads Zig toolchains from the official `ziglang.org/download/index.json` release index. The index supplies each target's archive URL and SHA-256 digest. The provider maps Linux and macOS on x86_64 and aarch64. Each requested version must still contain the matching target entry. OMG's published CLI binaries support Linux x86_64 and Apple Silicon macOS; the provider map does not create additional OMG release targets. Native Windows is unsupported, while WSL uses a supported Linux guest. ## Install and inspect ```bash omg list zig --available omg use zig latest omg list zig omg which zig ``` The release list excludes the index's `master` entry. `latest` chooses the newest listed release, and partial numeric requests resolve against the release index; `master` development snapshots are not managed by this command. With the shell hook enabled, verify the actual compiler at a fresh prompt: ```bash zig version which -a zig ``` `omg which zig` reports the selected version rather than a binary path. OMG normalizes the vendor archive into a version directory exposing `bin/zig`; the compiler's accompanying libraries remain inside that toolchain. ## Pin the project compiler Within a directory, `.zig-version` precedes `.tool-versions`. The hook searches the current directory before parents and then considers supported mise layers within each directory. For a project using a pinned release: ```bash printf '%s\n' '0.13.0' > .zig-version omg use zig omg which zig ``` Preserve a repository's existing compiler requirement. A partial pin can select different matching versions as installed inventory changes; use an exact release when that would be undesirable. The hook only selects installed toolchains and does not fetch one on directory entry. The runtime pin selects a compiler. It does not replace `build.zig`, `build.zig.zon`, dependency hashes, or the project's build instructions. ## Run a build After confirming the intended Zig version, use the project's normal build command: ```bash zig build ``` `omg run` discovers tasks from supported project manifests, not from `build.zig`; invoke Zig from a Makefile or supported task declaration if you want to run it via `omg run`. ## Install a newer release or remove one List remote versions and run `omg use zig VERSION` for the chosen release. `omg use zig latest` resolves the newest listed release from the index; it does not update a committed pin. There is no separate `omg update zig` command. Test the project's build with the selected compiler before changing its version file. Switch away from an old version before running `omg use zig VERSION --uninstall`. Use an explicit installed version. The command refuses to remove the active managed version; an omitted version is not inferred for uninstall. ## Verification and storage OMG validates the release-index artifact fields, checks the SHA-256 digest, and extracts the `.tar.xz` archive in staging. The normalized launcher and toolchain layout are checked before the version is activated. Checksums verify the upstream Zig archive against the official release index, not project build scripts or third-party dependencies. Toolchains live under `versions/zig` in the OMG data directory. The default data root is `~/.local/share/omg` on Linux and `~/Library/Application Support/omg` on macOS. ```bash omg config get data_dir ``` ## Diagnose failures | Symptom | Check | | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | Version or target missing | Check the release-index version and host target rather than trying a different architecture's archive. | | Checksum or extraction fails | Preserve the exact error; do not disable integrity or archive checks. | | Compiler version differs from the project | Compare the nearest pin, `omg which zig`, and `which -a zig` at a fresh prompt. | | Build breaks after switching | Check the project's accepted Zig release and dependency manifest; toolchain installation does not migrate source code. | ## Continue Read [runtime management](/docs/runtimes/), [configuration](/docs/configuration/), and [project tasks](/docs/tasks/). Source: [Zig provider](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/zig.rs), [runtime CLI](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [pin detection](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/zig.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/zig.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage .NET SDK versions with OMG Install Microsoft .NET SDKs, use global.json pins, understand SHA-512 verification, and diagnose host and SDK-selection limits. Canonical: https://getomg.dev/runtimes/dotnet/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Select an SDK, not just a language runtime OMG v0.2.0 manages the Microsoft .NET SDK. The `dotnet` host provides SDK commands used by languages such as C# and F#; this manager does not install a separate programming language called .NET. The provider reads Microsoft's official release-metadata index and channel documents. It excludes channels marked end-of-life from discovery and installation metadata selection. Supported phases include active, maintenance, preview, release-candidate, and go-live phases; `latest` selects a non-prerelease SDK. ## Check the host target The provider maps `linux-x64`, `linux-arm64`, `osx-x64`, and `osx-arm64` artifacts. It does not select Windows or musl-specific payloads. The host must also meet the selected SDK's native-library requirements. OMG's published CLI targets are Linux x86_64 and Apple Silicon macOS. Additional provider mappings are not additional OMG binary releases. On Windows, use OMG inside a supported WSL Linux guest rather than in a native Windows process. ## Install and inspect ```bash omg list dotnet --available omg use dotnet latest omg list dotnet omg which dotnet ``` Partial requests such as `9.0` resolve against supported-channel metadata. Use an exact listed SDK version when your project needs a specific feature band. An unavailable or end-of-life channel is not made available by writing its version into a pin file. At a fresh prompt with the OMG hook enabled: ```bash dotnet --version dotnet --list-sdks which -a dotnet ``` `omg which dotnet` reports OMG's selected version. The `dotnet` host can perform its own project-level SDK selection, so compare the actual `dotnet --version` inside the project as well. ## Pin the SDK with global.json OMG reads `global.json`'s `sdk.version` before `.tool-versions` within the same directory. It searches the current directory before parents; supported mise layers follow those files in each directory. A `global.json` pin has this shape; replace the example with an exact installed SDK version your project accepts: ```json { "sdk": { "version": "9.0.100" } } ``` ```bash omg use dotnet omg which dotnet dotnet --version ``` OMG reads the version field; this is not a full reimplementation of .NET's SDK resolution and roll-forward rules. The prompt hook selects an installed version and does not download a missing SDK. Keep the project's NuGet configuration, dependency lockfiles, and restore policy separate. ## Use the SDK in a project Once the selected SDK is verified, use the project's normal commands: ```bash dotnet restore dotnet build ``` These commands fetch NuGet dependencies and run project build logic. `omg run` does not discover tasks from `.csproj` files alone; add a supported task declaration if you want to invoke `dotnet` through `omg run`. ## Change or remove an SDK Install another listed version with `omg use dotnet VERSION`. Using `latest` does not rewrite `global.json`; update a project pin manually after checking its build and tests. To remove an old SDK, first select another installed version, then run `omg use dotnet VERSION --uninstall` with the exact installed SDK directory version. The active managed version cannot be removed. There is no separate `omg update dotnet` command. ## Verify downloads and troubleshoot .NET archives use SHA-512 hashes from Microsoft's metadata. OMG requires a valid hash, verifies the download, extracts the SDK's flat archive layout in staging, and checks the root `dotnet` launcher before publication. Unlike most archive managers here, this is SHA-512 rather than SHA-256. | Symptom | Check | | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | SDK cannot be found | Compare the exact version and channel support phase with the available list. | | Unsupported host or missing native library | Check the selected Linux/macOS runtime identifier and SDK prerequisites; a target entry does not install OS libraries. | | `dotnet --version` differs from OMG's selection | Inspect the nearest global.json, .NET's own resolver behavior, and competing PATH entries. | | Another host appears first | Compare `which -a dotnet` with the project pin and hook setup. | | Hash verification fails | Keep the error and stop; do not replace the expected digest with the downloaded file's hash. | ## Continue Read [runtime management](/docs/runtimes/), [configuration](/docs/configuration/), and [project tasks](/docs/tasks/). Source: [.NET provider](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/dotnet.rs), [runtime CLI](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [global.json detection](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/dotnet.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/dotnet.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage Erlang/OTP versions with OMG Install checksum-verified Erlang/OTP prebuilts, understand Linux compatibility and install scripts, and pin project versions. Canonical: https://getomg.dev/runtimes/erlang/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Choose an Erlang/OTP prebuilt OMG v0.2.0 installs prebuilt Erlang/OTP rather than compiling OTP from source. Linux downloads use Hex's `bob` build indexes at `builds.hex.pm`; macOS uses the `erlef/otp_builds` publisher index and release archives. The provider maps Linux and macOS on x86_64 and aarch64. Linux payloads are Ubuntu builds. Ubuntu 20.04, 22.04, and 24.04 have explicit mappings; Debian versions map to corresponding Ubuntu build generations. Other Linux identities fall back to the Ubuntu 24.04 build and rely on a runtime smoke check to reject incompatibility. A fallback is not verified support for every Linux distribution. The provider does not switch to a source build when a prebuilt cannot run. OMG's own published binaries target Linux x86_64 and Apple Silicon macOS; provider ARM64/Intel mappings do not add release targets. WSL uses the guest's Linux identity. ## Install and inspect ```bash omg list erlang --available omg use erlang latest omg list erlang omg which erlang ``` The available list comes from the host-specific publisher index. Linux rows without an archive SHA-256 are not installable: a source-commit hash is not an archive checksum. `latest` and partial numeric requests resolve against that index. With the shell hook enabled, check the selected runtime at a fresh prompt: ```bash which -a erl which -a erlc ``` To print OTP's own release identifier without entering an interactive shell: ```bash erl -noshell -eval 'io:format("~s~n", [erlang:system_info(otp_release)]), halt().' ``` The OTP release identifier can be less specific than the complete managed archive version. Compare it with `omg which erlang` rather than assuming both strings must have identical patch detail. ## Pin a project Erlang uses `.tool-versions` in the shell hook; there is no dedicated `.erlang-version` file. Add an exact chosen version to the project's existing file, for example: ```text erlang 26.2 ``` Preserve other tool entries. The nearest directory with a pin wins, and supported mise tool layers are considered after the ordinary version files within each directory. ```bash omg use erlang omg which erlang ``` The hook selects installed versions and does not run a network installation on directory entry. An OTP pin does not install project dependencies, rebar3, Elixir, or other BEAM tooling. ## Understand installation and verification Both provider paths require a published archive SHA-256. OMG verifies the archive before extraction. On Linux, OTP's bundled `Install -minimal` script must run in the final version directory because it records absolute paths. The installer marks the version as pending while setup runs, then performs an `erl` smoke check before activating it. A failed install script or smoke check causes cleanup of the broken version. This is executable provider setup, not a pure archive-copy operation. Checksums verify the archive against the publisher index, not project dependencies or host glibc compatibility. Versions live under `versions/erlang` in OMG's data root. Inspect it with: ```bash omg config get data_dir ``` ## Change or remove a version Choose a listed exact version with `omg use erlang VERSION`. Using `latest` does not rewrite the project's `.tool-versions` entry. Test the application with its expected OTP version before changing that pin. After switching to another installed version, run `omg use erlang VERSION --uninstall` to remove the old one. Supply the explicit installed version; the active managed version cannot be removed. There is no separate `omg update erlang` command. ## Troubleshoot the selected build | Symptom | Check | | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Version missing from the list | Inspect the host-specific publisher index; not every OTP release has every build. | | Missing archive digest | OMG refuses checksum-less rows; a source commit hash is not an archive checksum. | | glibc or shared-library failure | The selected Linux prebuilt is an Ubuntu build; inspect host compatibility and the smoke-check error. | | Linux build generation needs investigation | The provider supports `OMG_ERLANG_UBUNTU_RELEASE` for an explicit Ubuntu build-series selection; only choose a real publisher series compatible with the host. | | Different Erlang is executed | Compare `omg which erlang`, `.tool-versions`, and `which -a erl` at a fresh prompt. | ## Continue See [runtime management](/docs/runtimes/), [configuration](/docs/configuration/), and [security boundaries](/docs/security/). Source: [OTP providers and setup](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/erlang.rs), [runtime dispatch](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [project hooks](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/erlang.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/erlang.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage PHP channels with OMG Install PHP prebuilts on Debian/Ubuntu, understand rolling minor-channel refreshes, verify downloads, and pin project channels. Canonical: https://getomg.dev/runtimes/php/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Understand the rolling-channel contract OMG v0.2.0 installs PHP prebuilts from `shivammathur/php-builder` GitHub releases. Each upstream `major.minor` tag is a rolling channel; rebuilt assets can replace the previous patch within that channel. Use a channel such as `8.3`, not an exact patch such as `8.3.1`. The managed directory records the channel, while `php -v` reports the actual interpreter build. A channel pin does not provide immutable patch-level reproducibility. Unlike most OMG managers, explicit `omg use php CHANNEL` refreshes the rolling channel even if that channel is installed. Treat it as an operation that may download and replace the interpreter, not just a selection shortcut. ## Check platform limits This provider uses Linux Debian/Ubuntu system-root payloads. It has known distro tokens for Debian 11/12/13 and Ubuntu 22.04/24.04/26.04; architecture selection uses x86_64 or an ARM64 asset suffix. An asset must exist for the exact channel, distro, and architecture combination. In particular, a provider architecture mapping does not promise Debian ARM64 archives. Other Linux identities can fall back to an Ubuntu 24.04 payload, followed by a smoke check. That fallback is best-effort and not officially supported on Arch or Fedora. The PHP manager refuses macOS installation and points to Homebrew instead. OMG's published CLI artifacts target Linux x86_64 and Apple Silicon macOS; the macOS CLI's presence does not make this PHP archive provider available there. On Windows, run within a supported WSL Linux guest. ## Install and inspect ```bash omg list php --available omg use php 8.3 omg list php omg which php ``` The version shown above illustrates a channel request. Choose a channel your application accepts. `latest` selects the newest channel not marked prerelease by upstream; a rolling channel can still contain a development snapshot, so inspect the actual PHP version before relying on it. At a fresh prompt with the OMG hook enabled: ```bash php -v php --ini which -a php ``` The first command reports the installed patch; the second helps identify the interpreter's configuration. OMG does not convert this into a system-wide PHP/FPM service installation or manage a web server's chosen interpreter. ## Pin a project channel Within one directory, `.php-version` precedes `.tool-versions`. The hook checks the current directory before parents and supported mise layers after ordinary version files in each directory. ```bash printf '%s\n' '8.3' > .php-version omg which php ``` Preserve a project's existing accepted channel. Entering the directory selects an installed matching channel; it does not refresh that channel or download PHP. An explicit `omg use php` reads the pin and can perform the rolling-channel refresh described above. Keep Composer dependencies, extension requirements, application lockfiles, and service configuration under their own tooling. A PHP runtime pin does not install those project dependencies. ## Refresh, switch, or remove a channel To refresh a channel, run `omg use php CHANNEL`, replacing `CHANNEL` with a listed minor channel. Recheck `php -v` and run the application's tests afterward. The same channel name may now represent different patch bytes. To move to another minor release, select that listed channel explicitly and update the project pin after validation. There is no separate `omg update php` command. To remove an old channel, first select a different installed channel, then run `omg use php CHANNEL --uninstall`. An explicit channel is required, and removal refuses the active managed one. ## Verification and installation boundaries The chosen GitHub asset must provide a SHA-256 digest. OMG refuses missing integrity metadata, verifies the downloaded `.tar.xz`, and extracts it into an OMG-owned staging tree rather than into the host system root. The provider searches the staged payload for the PHP binary, creates its internal `bin/php` link, and performs a version smoke check. A failed binary check does not justify installing an unchecked or incompatible payload. Checksums verify the current rolling asset metadata without freezing the channel. The CLI smoke check verifies the `php` binary itself, not optional extensions, FPM, or application dependencies. ## Diagnose failures | Symptom | Check | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------ | | Exact patch cannot be found | Request a `major.minor` channel; this backend does not preserve exact patch releases. | | No asset for the host | Compare the channel/distro/architecture combination; do not substitute a foreign system-root archive. | | Runtime changed after `omg use php` | Explicit use refreshes an installed rolling channel; compare `php -v` with the prior build. | | Missing shared library or smoke-check failure | Inspect native-library compatibility with the selected Debian/Ubuntu payload. | | Web server still uses another PHP | Inspect the service's PHP/FPM configuration; interactive PATH selection does not reconfigure services. | ## Continue Read [runtime management](/docs/runtimes/), [configuration](/docs/configuration/), and [project tasks](/docs/tasks/). Source: [PHP rolling-channel provider](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/php.rs), [runtime command dispatch](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [pin detection](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/php.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/php.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) --- # Manage Swift toolchains on Ubuntu with OMG Install signed Swift.org Ubuntu toolchains, pin project versions, and understand distribution, architecture, and PGP verification limits. Canonical: https://getomg.dev/runtimes/swift/ Release baseline: v0.2.0 Reviewed: 2026-12-01 ## Check the Ubuntu requirement first OMG v0.2.0's Swift provider installs official Swift.org Linux toolchains only on hosts identifying as Ubuntu 22.04 or 24.04. It maps x86_64 and aarch64 archive variants. Other Ubuntu series, Debian, Arch, Fedora, and macOS are rejected by this manager. The presence of an OMG macOS binary does not imply a native Swift download path on macOS. This page does not configure Xcode or Apple's system toolchain. WSL can use a supported Ubuntu guest; native Windows is unsupported. OMG's published Linux CLI binary targets x86_64, and the selected Swift release must publish an archive for your Ubuntu version and architecture. ## Install and inspect a release The provider discovers stable `swift-NUMERIC-RELEASE` versions through `swiftlang/swift` GitHub releases. Preview tags, development snapshots, and prerelease entries are excluded. ```bash omg list swift --available omg use swift latest omg list swift omg which swift ``` `latest` and partial numeric requests resolve against the bounded stable-release list. An exact version still needs a known release and matching Swift.org archive; being numerically plausible is not enough. With the shell hook enabled, inspect the actual toolchain at a fresh prompt: ```bash swift --version swiftc --version which -a swift which -a swiftc ``` OMG keeps the vendor `usr` layout intact. The Swift hook path is the selected toolchain's `usr/bin`, rather than the ordinary `bin` directory used by many other managers. ## Pin a project toolchain Within one directory, `.swift-version` precedes `.tool-versions`. The hook checks the current directory before parents, then supported mise layers after ordinary version files in each directory. For a project intentionally using the example release: ```bash printf '%s\n' '5.10' > .swift-version omg use swift omg which swift ``` Choose the release required by your project; the example is not a current support recommendation. The hook only selects installed versions and does not download or verify a new toolchain when you enter a directory. The compiler pin does not replace Swift package manifests, dependency resolution, or the application's own test and build process. ## Run the project's build After verifying the selected compiler, use the project's normal Swift commands: ```bash swift build swift test ``` These commands fetch packages and run project build logic. `omg run` discovers tasks from supported project manifests, not from `Package.swift` alone; add a supported task declaration if you want to run Swift commands via `omg run`. ## Verify the signed toolchain This provider verifies a detached `.sig` for the Swift.org archive with Sequoia-OpenPGP. It refreshes the official Swift release-key cache and accepts only the signing fingerprints pinned in OMG. A cached keyring is a fallback when refresh fails, not permission to skip signature verification. A source build of OMG must enable the `pgp` feature for Swift installation. Without a verifier, installation refuses the archive. Do not work around a signature error by copying unchecked files into the versions tree. The extracted toolchain must expose `usr/bin/swift`, and a Swift version smoke check must succeed before normal activation. Host library requirements can still prevent the vendor binary from running; archive authenticity and host compatibility are separate questions. Toolchains live under `versions/swift` in the OMG data root. Inspect that root and available disk space before downloading a large toolchain: ```bash omg config get data_dir ``` ## Change or remove a release Install another known release with `omg use swift VERSION`. Resolving `latest` does not rewrite `.swift-version`. Check the project's build and tests before updating the pin; there is no separate `omg update swift` command. Switch to another installed version before running `omg use swift VERSION --uninstall`. Supply the explicit installed version. The active managed version cannot be removed. ## Troubleshoot safely | Symptom | Check | | ---------------------------- | ------------------------------------------------------------------------------------------------------- | | Unsupported distribution | Confirm `/etc/os-release` identifies Ubuntu 22.04 or 24.04; do not rename the host to bypass detection. | | Known release has no archive | Check the exact release, Ubuntu series, and architecture combination. | | PGP feature is unavailable | Use an appropriate verified release or build with the documented `pgp` feature. | | Signature verification fails | Preserve the failure and inspect release/key provenance; do not disable the check. | | Compiler cannot run | Inspect the smoke-check error and Swift.org host-library requirements for that archive. | | Another Swift wins on PATH | Compare the project pin, `omg which swift`, and `which -a swift` at a fresh prompt. | ## Continue See [installation and backend features](/docs/installation/), [runtime management](/docs/runtimes/), and [security boundaries](/docs/security/). Source: [Swift provider and signature verification](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/swift.rs), [runtime CLI](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs), and [Swift hook paths](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs). ## Sources and verification Reviewed against immutable release source. Examples are not a claim of execution on every host. - [omg-cli/omg/docs/runtimes.md](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/docs/runtimes.md) - [omg-cli/omg/src/runtimes/swift.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/swift.rs) - [omg-cli/omg/src/runtimes/common.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/runtimes/common.rs) - [omg-cli/omg/src/cli/runtimes.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/cli/runtimes.rs) - [omg-cli/omg/src/hooks/mod.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/hooks/mod.rs) - [omg-cli/omg/src/core/security/pgp.rs](https://github.com/omg-cli/omg/blob/395d1846350897945be7a5dda444f8ba3fbcad27/src/core/security/pgp.rs) --- # Manage Node.js versions with OMG Install Node.js in pure Rust without external subprocesses, verify official SHA-256 digests, switch project versions with .node-version or .nvmrc, and diagnose PATH conflicts. Canonical: https://getomg.dev/runtimes/node/ Updated: 2026-11-11 Author: OMG maintainers ## Pure Rust Node.js installation without external processes Unlike shell wrappers that spawn curl, tar, and xz subprocesses, OMG manages Node.js entirely in compiled Rust (`src/runtimes/node.rs`). It queries the official index at `nodejs.org/dist/index.json`, downloads release archives directly over HTTPS, and parses `SHASUMS256.txt` to verify the archive hash in memory before extraction. Extraction is handled by OMG’s pure-Rust `.tar.xz` streaming unpacker (`extract_tar_xz`) into an isolated temporary directory. Once the regular file at `bin/node` is verified, the installation is published atomically to `~/.local/share/omg/versions/node/`. ### Install Node.js releases and aliases ```sh omg use node lts omg use node lts/iron omg use node 22 omg list node omg which node ``` OMG resolves aliases deterministically: `lts` maps to the current active LTS release from `index.json`, `lts/` (e.g. `lts/iron` or `lts/jod`) maps to that named release, and partial version numbers like `20` or `20.1` resolve to the newest matching release. Published OMG releases target Linux x86_64 and Apple Silicon macOS. On Windows, run OMG inside WSL; Intel macOS and Linux ARM64 are not published release targets. ## Project version pin resolution order When you enter a project directory, OMG’s compiled shell hook (`src/hooks/mod.rs`) walks upward through the directory tree. The nearest directory with a Node.js pin wins. Within one directory, it checks these sources in order: 1. Explicit `.node-version` file in the project directory or any parent directory. 2. Legacy `.nvmrc` file (reused directly without configuration translation). 3. Multi-runtime `.tool-versions` file (asdf and mise compatibility). 4. `package.json` engines (`engines.node`) or Volta pin (`volta.node`). ### Verify active Node.js and npm path in your shell ```sh omg which node which -a node node --version npm --version ``` ## Runtime ownership vs package management OMG manages the Node.js executable and the `npm` and `npx` binaries bundled with that release. omg use node updates the current symlink in the versions tree. When a project pin matches an installed version, the shell hook prepends that concrete version directory to PATH. The Linux data root defaults to ~/.local/share/omg; macOS uses ~/Library/Application Support/omg. OMG does not intercept or wrap `npm install` or `pnpm install`. Dependency resolution, `node_modules`, and lockfiles (`package-lock.json`, `pnpm-lock.yaml`) remain strictly under the control of their respective package managers. > To run project tasks defined in package.json without switching tools, use OMG’s native task runner: omg run