Skip to content

bymehul/odpkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

odpkg

An unofficial open-source package manager for Odin. It is vendor-first and keeps installs local to vendor/.

Current versions:

  • odpkg: v0.6.1
  • Odin used for build/tests: dev-2026-01:f7901cffc

Principles:

  • GitHub-only (v0.1)
  • Vendoring-first
  • Records odin_version on odpkg init and warns on mismatch during add/install/update

Patch Notes (v0.6.1)

  • Fixed a startup crash in some Linux environments (segmentation fault on --help / normal launch) caused by incorrect temporary string cleanup in update-check formatting.
  • odpkg init now records the Odin compiler version in odpkg.toml as odin_version.
  • odpkg add, odpkg install, and odpkg update now show a soft warning if your current Odin version differs from the project's odin_version.
  • odpkg install now also shows a soft warning when an installed package's own odpkg.toml declares a different odin_version.
  • odpkg now checks for newer releases on startup and shows a soft "update available" notice when a newer version exists.

Quick Start

odpkg init
odpkg add github.com/owner/repo@v1.0.0
odpkg install

Requirements

  • git in PATH
  • libcurl installed (and TLS deps like mbedtls) for registry list/search and odpkg add --registry

Security Notes

  • Dependency names are validated and must be simple (no path separators).
  • Installs are restricted to the configured vendor_dir.
  • Lockfile commits are validated and verified after checkout.
  • HTTPS registry fetch uses libcurl with certificate verification enabled.

Install (Build From Source)

git clone https://github.com/bymehul/odpkg
cd odpkg
odin build src -out:odpkg
./odpkg --help

Install (Prebuilt Binary)

Linux/macOS:

VERSION=v0.6.1
ASSET=odpkg-ubuntu-latest
curl -L -o odpkg "https://github.com/bymehul/odpkg/releases/download/${VERSION}/${ASSET}"
chmod +x odpkg
./odpkg --help

Windows (PowerShell):

$version = "v0.6.1"
$asset = "odpkg-windows-latest.exe"
Invoke-WebRequest -Uri "https://github.com/bymehul/odpkg/releases/download/$version/$asset" -OutFile "odpkg.exe"
.\odpkg.exe --help

Add To PATH

Linux/macOS (current session):

export PATH="$PWD:$PATH"

Linux/macOS (permanent):

mkdir -p "$HOME/.local/bin"
mv odpkg "$HOME/.local/bin/odpkg"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

Windows (PowerShell, current session):

$env:Path = "$PWD;" + $env:Path

Windows (permanent, PowerShell):

[Environment]::SetEnvironmentVariable("Path", "$env:Path;$PWD", "User")

Commands

odpkg init [name]
odpkg add <repo[@ref]> [alias]
odpkg add --registry <slug> [alias]
odpkg remove <alias>
odpkg install
odpkg update
odpkg list [--registry | --deps] [--refresh]
odpkg search <query> [--refresh]
odpkg version

Registry

odpkg list --registry fetches the public registry and caches it. odpkg search <query> filters registry packages by name or description.

Docs

Online docs: docs
Source docs: docs.md

License

Licensed under the zlib License.