Skip to content
Ridgun
English

omni

The package manager: one command fetches the toolchain and any library, verified before it is installed

README.md71 lines · 2.9 KBRaw
1# OMNI (`omni`) — The Ridgun GitHub-First Package & Library Manager
2
3`omni` is the official package and library manager for the **Ridgun** programming language (`v0.9.12+`), written 100% in pure Ridgun and built with `stable`.
4
5It resolves packages directly from GitHub (`https://github.com/pedrocorral/...` by default, plus arbitrary `owner/repo`, `@ref`, `#submod`, Git URLs, and local paths), compiles `.rglib` bundles and native Linux ELF64 `.so` shared libraries via `ridgunc` and `stable`, synchronizes `build.rg`, and pins exact Git commit SHAs and SHA-256 artifact digests in `omni.lock`.
6
7---
8
9## Features
10
11- **GitHub-First Resolution (Zero Registry Server Required)**:
12 - **Standard library modules** (`json`, `http`, `crypto`, `argon2id`, `jwt`, `ws`, `socket`, `posix`, `io`, `str`, `math`, `linalg`, `tensor`, `list`, `btree`, `regex`, `csv`, `ini`, `template`, `diff`, `codec`, `cli`, `path`, `glob`, `time`, `log`, `fmt`, `uuid`, `agent`, `pool`, `net_agent`, `test`) automatically resolve to `pedrocorral/ridgun-libs#<module>`.
13 - **Standalone ecosystem repositories** (`solstice`, `unix-tools`, `postgres`, `mongodb`, `mariadb`, `oauth`, `ping`, `whois`, `xml`, `omni`) resolve to `https://github.com/pedrocorral/<repo>.git`.
14 - **Explicit GitHub shorthand**: `owner/repo`, `owner/repo@v0.1.0`, `owner/repo#submod@branch`, full HTTPS/SSH Git URLs, and local paths.
15- **Seamless `stable` & `build.rg` Integration**:
16 - Automatically updates `fn :: dependencies => [String]` in `build.rg`.
17 - Compiles and installs `.rglib` bundles into `~/.omni/lib/`, `.stable/deps/`, and `target/` so `import <module>` works immediately in `stable check`, `stable test`, and `stable built`.
18 - Includes `plugins/omni.rg` so all OMNI commands are also available directly via `stable omni <cmd>`.
19- **Deterministic Lockfile (`omni.lock`)**:
20 - Pure-Ridgun lockfile recording package name, `owner/repo`, submodule, Git ref, 12-char commit SHA, 16-char SHA-256 `.rglib` digest, and artifact path.
21
22---
23
24## CLI Usage
25
26```bash
27# Initialize ~/.omni/config.rg and omni.lock
28omni init
29
30# Install standard library modules or GitHub repositories into the current project
31omni install json crypto http
32omni install solstice@main
33omni install pedrocorral/ridgun-libs#socket@v0.1.0
34
35# Synchronize all dependencies declared in build.rg
36omni install
37
38# Install Ridgun toolchain (ridgunc + stable) or all 32 standard libraries globally
39omni setup
40omni install -g ridgun
41omni install -g libs
42
43# Install an executable Ridgun package globally into ~/.local/bin
44omni install -g unix-tools
45
46# List installed project dependencies and lock hashes
47omni list
48omni freeze
49
50# Search the ridgun-libs & GitHub ecosystem catalog
51omni search json
52omni info solstice
53
54# Update packages from GitHub or remove a dependency
55omni update
56omni remove crypto
57
58# Verify toolchain & environment health
59omni doctor
60```
61
62---
63
64## Building & Testing OMNI with `stable`
65
66```bash
67stable check
68stable test
69stable built
70stable install
71```