A shell with its own syntax.
No cd. No ls. No |. ONIX replaces every piece of UNIX shell syntax
with its own, deliberately non-colliding vocabulary -- enterdir,
list, pipe, save >, run -- so a command you type is never
ambiguous between "builtin" and "whatever happens to be on $PATH".
Typed cd out of habit? ONIX tells you to use enterdir (or run
translate cd to find out), instead of guessing.
onix ~/projects ⌥ main ▸ list pipe look ".rs" pipe count
onix ~/projects ⌥ main ▸ createfile notes.txt and view notes.txt
onix ~/projects ⌥ main ▸ run-bg cargo watch
[1] 41213
onix ~/projects ⌥ main ▸ showjobs
[1] running pgid=41213 cargo watch
- Its own grammar, not UNIX's. Pipes are the word
pipe, redirection issave >/append >>/read <, logic isand/or, external programs need an explicitrun. See docs/user-guide.md for the full reference and the reasoning. - A real polyglot architecture, each language doing the part it's best at -- see Architecture below and docs/architecture.md for the details, including the flat text protocol the Go parser and C runtime speak instead of JSON.
- Actual job control:
run-bg,showjobs,foreground,background,killjob, process groups,tcsetpgrp-- not a toy. - Scripting with real control flow:
if/loop/while/functionand$VARinterpolation, on top of ordinary Onix command lines. Seeexamples/scripts/. - A plugin system in three languages: native (C/Rust,
dlopen'd in process) and Python (subprocess) plugins, side by side. See docs/plugin-api.md. - Config as code:
~/.onixrcis a Python script that prints the Onix commands to run at startup -- conditionals, environment lookups, computed aliases, whatever you want. - Fast: ~2ms process startup on Apple Silicon (target: <100ms), a
Rust-implemented builtin dispatch table, and goroutine-parallel parsing
for large
.onixscripts. - Memory-safety where it counts: every builtin lives in Rust behind
catch_unwind, so a bug in one command can't take the whole shell down; the small amount of manual C memory management in the process/job layer is covered bytests/leak_check.sh.
Go parser → flat text AST → C runtime (REPL, terminal, jobs, signals)
│ ▲
▼ │
Rust builtins ─────────┘
(prompt, history, autocomplete)
│
▼
Python (~/.onixrc, .py plugins)
Full diagram and rationale: docs/architecture.md.
git clone https://github.com/butaraul/ONIX-Shell onix && cd onix
make build
./build/onixSee INSTALL.md for prerequisites, a system-wide install, and how to set ONIX as your login shell.
Requires Go 1.21+, Rust (stable), a C11 compiler, and Python 3 on your
$PATH.
make build # builds the Go parser lib, Rust builtins lib, and links onix
make test # cargo test + go test + the shell's own integration suite
make run # build, then launch it
make install # install to /usr/local (override with PREFIX=...)
make cleanonix> createfile todo.txt
onix> view todo.txt
onix> list pipe look ".md"
onix> list save > files.txt
onix> set NAME = world
onix> get NAME
onix> alias ll = list-all
onix> ll
onix> run-bg sleep 30
onix> showjobs
onix> translate grep
grep -> look
onix> explain pipe
Chains stage output into the next stage's input, like '|' in Unix shells.
Run a script:
onix examples/scripts/greet.onixonix> plugins
onix> plugin load greetc
onix> greetc world
Three complete, working examples (C, Rust, Python) live in
examples/plugins/. Full API: docs/plugin-api.md.
cp examples/.onixrc ~/.onixrc~/.onixrc is a Python script -- see the example for aliases, variables,
and platform-conditional setup. reload inside Onix re-runs it.
See CONTRIBUTING.md for the bug report / feature request / PR process and coding standards across all four languages.