Skip to main content

Binary distribution for omnidist

Project description

omnidist

Go Report Card lint test codecov version npm PyPI license

Run your Go CLI everywhere with npx and uvx, without requiring Go on end-user machines.

omnidist turns one Go project into cross-platform npm and uv distributions with prebuilt binaries, then stages, verifies, and publishes them in a deterministic release flow.

Release flow: build -> stage -> verify -> publish so users can run your tool from JavaScript and Python ecosystems out of the box.

For project background, packaging model details, migration notes, and contributor-oriented repo layout, see CONTRIBUTING.md.

Requirements

  • Go 1.25+
  • Node.js + npm (for npm distribution commands)
  • uv (for uv distribution commands)
  • git (when version.source: git-tag)
  • NPM_PUBLISH_TOKEN for npm publish (unless --dry-run)
  • UV_PUBLISH_TOKEN (or --token) for uv publish (unless --dry-run)

Installation

Run without installation first:

npx @omnidist/omnidist --help
uvx omnidist --help

Install globally with npm:

npm i -g @omnidist/omnidist
omnidist --help

Install with Go toolchain:

go install github.com/metalagman/omnidist/cmd/omnidist@latest
omnidist --help

Build locally from source:

go build -o ./bin/omnidist ./cmd/omnidist
./bin/omnidist --help

Or run directly:

go run ./cmd/omnidist --help

Quick Start

  1. Print repo-tailored onboarding/release commands:
omnidist quickstart
  1. Initialize config and distribution folder structure:
omnidist init

This creates:

  • .omnidist/omnidist.yaml
  • .omnidist/ workspace directories
  • .omnidist/.gitignore for generated artifacts
  1. Build binaries for configured targets:
omnidist build

This also writes the resolved build version to .omnidist/dist/VERSION.

  1. Stage and verify artifacts:
omnidist stage
omnidist verify

omnidist uv stage converts the resolved version to PEP 440 and writes .omnidist/uv/pyproject.toml with that version. It also recreates .omnidist/uv/dist to prevent stale wheel artifacts from previous runs.

  1. Publish when verification passes:
omnidist publish
  1. Generate tag-triggered release workflow:
omnidist ci

Common Commands

# Build binaries for configured targets and persist build version
omnidist build

# Print a quickstart command sequence for this repo
omnidist quickstart

# Show runtime version/build metadata
omnidist version

# Stage and verify both distributions (npm -> uv)
omnidist stage
omnidist verify

# Stage dev/pre-release artifacts
omnidist stage --dev

# Publish both distributions (fail-fast, npm -> uv)
omnidist publish

# Generate GitHub Actions workflow for tagged releases
omnidist ci

# Limit orchestration to one distribution
omnidist stage --only npm
omnidist verify --only uv

# Distribution-specific publishing options
omnidist npm publish --tag next --otp <6-digit-code>
omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <pypi-token>

Environment Variables and .env

omnidist loads .env automatically at startup (via godotenv) if present.

Supported variables:

  • OMNIDIST_VERSION: used when version.source: env; also expanded in build.ldflags templates (for example ${OMNIDIST_VERSION}). VERSION is not used.
  • OMNIDIST_GIT_COMMIT: optional ldflags template variable for build metadata; populated automatically by omnidist build when git metadata is available.
  • OMNIDIST_BUILD_DATE: optional ldflags template variable for build metadata; populated automatically by omnidist build as UTC RFC3339.
  • NPM_PUBLISH_TOKEN: required for npm publish commands when not using --dry-run
  • UV_PUBLISH_TOKEN: used by uv publish when --token is not provided

Example .env:

OMNIDIST_VERSION=1.2.3
NPM_PUBLISH_TOKEN=npm_xxx
UV_PUBLISH_TOKEN=pypi-xxx

Configuration

.omnidist/omnidist.yaml:

tool:
  name: omnidist
  main: ./cmd/omnidist

version:
  source: git-tag # git-tag | file | env

targets:
  - os: darwin
    arch: amd64
  - os: darwin
    arch: arm64
  - os: linux
    arch: amd64
  - os: linux
    arch: arm64
  - os: windows
    arch: amd64

build:
  ldflags: -s -w
  tags: []
  cgo: false

distributions:
  npm:
    package: "@omnidist/omnidist"
    registry: https://registry.npmjs.org
    access: public # public | restricted
    include-readme: true # include project README.md in staged packages when present

  uv:
    package: omnidist
    index-url: https://upload.pypi.org/legacy/
    linux-tag: manylinux2014 # manylinux2014 | musllinux_1_2
    include-readme: true # include project README.md in staged wheels when present

targets use Go values (GOOS/GOARCH). Distribution workflows map them as needed (for example windows/amd64 -> npm win32/x64).

For appkit version injection, configure build.ldflags in your project config:

build:
  ldflags: -s -w -X github.com/metalagman/appkit/version.version=${OMNIDIST_VERSION} -X github.com/metalagman/appkit/version.gitCommit=${OMNIDIST_GIT_COMMIT} -X github.com/metalagman/appkit/version.buildDate=${OMNIDIST_BUILD_DATE}

With version.source: git-tag, release workflows require HEAD to be on an exact SemVer tag (vX.Y.Z or X.Y.Z).

Command Reference

Top-level:

  • omnidist init
  • omnidist build
  • omnidist quickstart
  • omnidist version
  • omnidist ci [--force]
  • omnidist stage [--dev] [--only npm|uv|npm,uv]
  • omnidist verify [--only npm|uv|npm,uv]
  • omnidist publish [--dry-run] [--only npm|uv|npm,uv]
  • omnidist npm
  • omnidist uv

NPM subcommands:

  • omnidist npm stage [--dev]
  • omnidist npm verify
  • omnidist npm publish [--dry-run] [--tag <tag>] [--registry <url>] [--otp <code>]

UV subcommands:

  • omnidist uv stage [--dev]
  • omnidist uv verify
  • omnidist uv publish [--dry-run] [--publish-url <url>] [--token <pypi-token>]

Usage Patterns

Local development loop

Use this when iterating on the CLI binary and validating artifact generation locally:

omnidist build
omnidist stage
omnidist verify

Dev pre-release artifacts

Generate prerelease versions from git describe data:

omnidist stage --dev

Unified multi-distribution orchestration

Top-level stage, verify, and publish run distributions in deterministic order: npm first, then uv, and stop on first failure.

Select a subset with --only:

omnidist stage --only uv
omnidist verify --only npm
omnidist publish --dry-run --only npm,uv

CI bootstrap for tag releases

Generate .github/workflows/omnidist-release.yml:

omnidist ci

The generated workflow triggers on v* tag pushes and runs: build -> stage -> verify -> publish.

If workflow already exists:

omnidist ci --force

npm publishing flow with custom options

omnidist npm publish --dry-run --tag next --registry https://registry.npmjs.org

Before npm commands run, omnidist writes .omnidist/.npmrc from distributions.npm.registry using: //<registry>/:_authToken=${NPM_PUBLISH_TOKEN}. If staged package version contains a -dev prerelease and --tag is not provided, omnidist auto-publishes with --tag dev.

If your npm account requires 2FA for publish operations:

omnidist npm publish --otp <6-digit-code>

uv publishing flow with custom index/auth

omnidist uv publish --publish-url https://upload.pypi.org/legacy/ --token <pypi-token>

omnidist uv publish uses token authentication.
Provide token via --token or UV_PUBLISH_TOKEN (required for non-dry-run). omnidist uv verify and omnidist uv publish use the staged version from .omnidist/uv/pyproject.toml when present. For PyPI/TestPyPI, omnidist uv verify fails if the staged version contains local metadata (+...), since those indexes reject local versions.

TestPyPI dry-run style validation:

omnidist uv publish --dry-run --publish-url https://test.pypi.org/legacy/

Usage Examples

npm release path

git tag v1.2.0
omnidist build
omnidist npm stage
omnidist npm verify
omnidist npm publish

uv release path

git tag v1.2.0
omnidist build
omnidist uv stage
omnidist uv verify
omnidist uv publish --publish-url https://upload.pypi.org/legacy/

uv dry-run publish

omnidist uv publish --dry-run --publish-url https://test.pypi.org/legacy/

version from environment

version:
  source: env
export OMNIDIST_VERSION=2.0.0
omnidist npm stage
omnidist uv stage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

omnidist-0.1.20-py3-none-win_amd64.whl (5.7 MB view details)

Uploaded Python 3Windows x86-64

omnidist-0.1.20-py3-none-manylinux2014_x86_64.whl (5.4 MB view details)

Uploaded Python 3

omnidist-0.1.20-py3-none-manylinux2014_aarch64.whl (5.1 MB view details)

Uploaded Python 3

omnidist-0.1.20-py3-none-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

omnidist-0.1.20-py3-none-macosx_10_13_x86_64.whl (5.4 MB view details)

Uploaded Python 3macOS 10.13+ x86-64

File details

Details for the file omnidist-0.1.20-py3-none-win_amd64.whl.

File metadata

  • Download URL: omnidist-0.1.20-py3-none-win_amd64.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omnidist-0.1.20-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 86c6218dbcdc26ef4c64cc57aa1142a782a8919d8c7a3f751326f929d685e9c7
MD5 8c2db55b8e7d56ff236189997f6be205
BLAKE2b-256 234014a90bc926dc6b3a4ec6672c6f924246d83bf9c14e00e3a9c16a8b42c5cb

See more details on using hashes here.

File details

Details for the file omnidist-0.1.20-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: omnidist-0.1.20-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omnidist-0.1.20-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c3781af1bb7684da09a67dc1192ec82343d43b92df86fe5d9c1917caa69475f6
MD5 d00894570dfa0d5ed8ba9546d2141db3
BLAKE2b-256 da2441d07a5aaf6c1de51aafdf35c8d62a7354709a630302c97e65fbfe507d5e

See more details on using hashes here.

File details

Details for the file omnidist-0.1.20-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: omnidist-0.1.20-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 5.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omnidist-0.1.20-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 09fb4db7e5fa0f0d5481b97154c1c11061f0e18bae5862a22011978f888d63f9
MD5 4b038b324a94086aee135202234ac2a3
BLAKE2b-256 2b8901ae7ae32250190e69a5dde36c79c966f77f82fa9c7f25a64067def0ce99

See more details on using hashes here.

File details

Details for the file omnidist-0.1.20-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: omnidist-0.1.20-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 5.2 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omnidist-0.1.20-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 66fa1af06c6316810b170b3a87725dff8efecd9910dc75fe4a1b37bd36e8f456
MD5 5b93aa23fd577237c5f88ed95a15feac
BLAKE2b-256 6362753326aac630d53946bad65dbee3bb44a2f817d9e16dbd410c9bafc2dc16

See more details on using hashes here.

File details

Details for the file omnidist-0.1.20-py3-none-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: omnidist-0.1.20-py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for omnidist-0.1.20-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fc5d87f514111d9aca5fa83b467758fcfb163fe4080438c8caec4351d0c4268a
MD5 0fd27428c82a6656b60a09b29419e007
BLAKE2b-256 de8e93bfbe50e263005cf15fcd8437fe18b5e2bd2d172d3233a0c4b7b101e76f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page