https://github.com/bymehul/odpkg
An unofficial open-source package manager for Odin.
https://github.com/bymehul/odpkg
cli-tool dependency-management github odin odin-lang package-manager vendoring
Last synced: 13 days ago
JSON representation
An unofficial open-source package manager for Odin.
- Host: GitHub
- URL: https://github.com/bymehul/odpkg
- Owner: bymehul
- License: zlib
- Created: 2026-02-03T15:00:28.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-02-06T20:56:25.000Z (about 1 month ago)
- Last Synced: 2026-02-08T19:57:09.325Z (about 1 month ago)
- Topics: cli-tool, dependency-management, github, odin, odin-lang, package-manager, vendoring
- Language: Odin
- Homepage: https://bymehul.github.io/odpkg/
- Size: 289 KB
- Stars: 12
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
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)
```bash
git clone https://github.com/bymehul/odpkg
cd odpkg
odin build src -out:odpkg
./odpkg --help
```
## Install (Prebuilt Binary)
Linux/macOS:
```bash
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):
```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):
```bash
export PATH="$PWD:$PATH"
```
Linux/macOS (permanent):
```bash
mkdir -p "$HOME/.local/bin"
mv odpkg "$HOME/.local/bin/odpkg"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
```
Windows (PowerShell, current session):
```powershell
$env:Path = "$PWD;" + $env:Path
```
Windows (permanent, PowerShell):
```powershell
[Environment]::SetEnvironmentVariable("Path", "$env:Path;$PWD", "User")
```
## Commands
```bash
odpkg init [name]
odpkg add [alias]
odpkg add --registry [alias]
odpkg remove
odpkg install
odpkg update
odpkg list [--registry | --deps] [--refresh]
odpkg search [--refresh]
odpkg version
```
## Registry
`odpkg list --registry` fetches the public registry and caches it.
`odpkg search ` filters registry packages by name or description.
## Docs
Online docs: [docs](https://bymehul.github.io/odpkg/)
Source docs: [docs.md](docs.md)
## License
Licensed under the zlib License.