Quickstart
odpkg is an unofficial Odin package manager focused on simplicity and vendoring. Get up and running in under a minute.
Current version: odpkg v0.6.4 |
Odin used for build/tests: dev-2026-06:6fdaedf18
$ odpkg init
$ odpkg add github.com/owner/repo@v1.0.0
$ odpkg install
That's it! Your dependencies are now in vendor/ and tracked in
odpkg.lock.
Patch Notes (v0.6.4)
- Refactored
[ignore]configuration to use valid TOML arrays instead of raw strings (Fixes #6). - Added support for parent projects to override and declare ignore rules for their dependencies.
- Added
self = [...]key in[ignore]for self-pruning behavior. - Added support for
[ignore]section inodpkg.tomlallowing.gitignore-style glob rules to prune unwanted files from downloaded packages (Fixes #4). Automatically injects.gitignorecontaining*into the vendor dir to prevent accidental commits.
Installation
Download the latest binary for your platform:
VERSION=v0.6.4
ASSET=odpkg-ubuntu-latest
curl -L -o odpkg "https://github.com/bymehul/odpkg/releases/download/${VERSION}/${ASSET}"
chmod +x odpkg
./odpkg --help
$version = "v0.6.4"
$asset = "odpkg-windows-latest.exe"
Invoke-WebRequest -Uri "https://github.com/bymehul/odpkg/releases/download/$version/$asset" -OutFile "odpkg.exe"
.\odpkg.exe --help
Requirements
odpkg uses native HTTP for plain HTTP and libcurl (with TLS deps like mbedtls) for HTTPS registry fetches.
gitin PATHlibcurlinstalled (with TLS deps likembedtls)
odpkg init
Initialize a new project with odpkg.toml.
$ odpkg init [name]
Creates a configuration file in the current directory:
[odpkg]
name = "my-project"
version = "0.1.0"
odin_version = "dev-2026-06:6fdaedf18"
vendor_dir = "vendor"
[dependencies]
odpkg add
Add a dependency to your project.
From Repository
$ odpkg add github.com/owner/repo@v1.0.0 [alias]
$ odpkg add owner/repo # shorthand
From Registry
$ odpkg add --registry tempo # looks up slug in registry
$ odpkg add --registry raylib rl # with custom alias
odpkg search to find package slugs!
odpkg remove
Remove a dependency by its alias name.
$ odpkg remove raylib
odpkg install
Install all dependencies into vendor/.
$ odpkg install
- Uses
odpkg.lockif present (reproducible builds) - Otherwise resolves from
odpkg.toml - Automatically installs transitive dependencies
- Shows a soft warning when recorded
odin_versiondoes not match your current Odin version - Verifies SHA256 hashes for integrity
odpkg update
Re-resolve refs and update odpkg.lock.
$ odpkg update
Use this when you want to pull the latest commits for dependencies.
odpkg list
List dependencies or browse the registry.
$ odpkg list # local deps or registry
$ odpkg list --deps # force local deps
$ odpkg list --registry # browse registry
$ odpkg list --registry --refresh # re-fetch
odpkg search
Search the package registry by name, slug, or description.
$ odpkg search json
$ odpkg search template --refresh
odpkg version
Print the current version of odpkg.
$ odpkg version
odpkg 0.6.3.1
Also available as odpkg -v or odpkg --version.
odpkg help
Show usage information and available commands.
$ odpkg help
odpkg - Unofficial Odin package manager
Usage:
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
Also available as odpkg -h or odpkg --help.
odpkg.toml
The configuration file defines your project and dependencies.
[odpkg]
name = "my-game"
version = "1.0.0"
odin_version = "dev-2026-06:6fdaedf18"
vendor_dir = "vendor"
[dependencies]
raylib = { repo = "raysan5/raylib", ref = "v5.0" }
tempo = { repo = "kalsprite/tempo", ref = "main" }
[ignore]
self = ["*_test.odin", "benchmark/*", "*.bmp"]
raylib = ["examples/*", "tests/*"]
The [ignore] section allows you to define glob patterns (similar to .gitignore) as standard TOML arrays mapping to dependency names. This helps keep your vendor/ directory clean. If you want a package to clean up files from its own repository when someone else downloads it, use the special key self = [...]. If you want to force ignore rules on a dependency you pull, use its name (e.g. raylib = [...]). Note that odpkg also automatically creates a .gitignore inside the vendor directory containing *, preventing you from accidentally committing downloaded packages.
odpkg.lock
The lockfile records exact commit hashes and SHA256 hashes for reproducible builds.
The lockfile is auto-generated. Commit it to version control.
Dependency Syntax
Structured (preferred)
raylib = { repo = "raysan5/raylib", ref = "v5.0" }
Short form
raylib = "github.com/raysan5/raylib@v5.0"
| Field | Description |
|---|---|
repo |
owner/repo, github.com/owner/repo, or full URL |
ref |
Tag, branch, or commit hash |
Package Registry
odpkg fetches packages from the official Odin registry:
https://api.pkg-odin.org/packages
Registry data is cached locally:
- Linux:
~/.cache/odpkg/packages.json - macOS:
~/Library/Caches/odpkg/packages.json - Windows:
%LOCALAPPDATA%\odpkg\packages.json
Transitive Dependencies
odpkg automatically installs nested dependencies!
If a package you install has its own odpkg.toml, those dependencies are installed
too.
Integrity Verification
odpkg computes SHA256 hashes of installed packages and stores them in odpkg.lock.
On subsequent installs, hashes are verified to detect corruption or tampering.
[[deps]]
name = "raylib"
repo = "raysan5/raylib"
ref = "v5.0"
commit = "abc123..."
hash = "sha256:e3b0c44298fc1c149..."
Security Notes
- Dependency names are validated (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.