Skip to content

CLI / REPL

The omega binary (also aliased omega-lisp) launches a REPL or executes a one-shot expression. Internally it dispatches to dist/omega-repl.mjs.

CLI flags

FlagPurpose
--cmd "<expr>"evaluate one expression and exit
--file <path>execute a .lisp file and exit
--session <name>use the named session (~/.omega-sessions/repl-<name>.json)
--profile <name>install a named profile for the run
--driver <name>force a specific inference driver
--model <name>override the model
--emacsstart in Emacs-friendly REPL mode
--no-historydisable session writing
bash
pnpm omega-fast                                            # interactive
pnpm omega-fast -- --cmd "(+ 1 2)"                         # one-shot
pnpm omega-fast -- --session mywork --cmd "(define x 42)"
pnpm omega-fast -- --file demo/lisp/ch00-instant-showcase.lisp

Sessions are saved at ~/.omega-sessions/repl-<name>.json.

Meta-commands

REPL commands begin with :. The full set is enumerated by :help. By bucket:

Help / discovery

CommandPurpose
:helpshow all commands
:help <package>tutorial for a package
:doc <fn>one-screen reference for a primitive
:apropos <pattern>search by name or description
:packageslist loaded user packages
:primitiveslist all 13 standard packages with primitive counts
:man <topic>full manual page

Session

CommandPurpose
:session save <name>save the current session as <name>
:session load <name>load and replay session <name>
:session goto <n>restore environment as of event N
:session listenumerate sessions on disk
:traceprint the current session's event log

Snapshots

CommandPurpose
:save <name>snapshot evaluator state
:restore <name>restore from a snapshot

Debugging / time travel

CommandPurpose
:debugenter the debugger
:stepstep the machine one transition
:break <pattern>set a breakpoint on op or AST pattern
:stateprint current (C, E, S, K)
:backstep backwards (replay-aware)
:goto <n>jump to event N

Agentic mode

CommandPurpose
:ask <prompt>enter agentic mode — LLM has REPL as a tool, up to 20 turns
:opr-listlist available OPR kernels
:opr-run <name> <json>run a structured OPR kernel

Utility

CommandPurpose
:quitexit
:resetreset evaluator state
:clearclear screen

Exit codes

CodeMeaning
0success — --cmd/--file ran without error
1evaluation failed — see error output
2bad CLI args

See also

Source: projects/omega-lisp/bin/omega.mjs (dispatch wrapper), projects/omega-lisp/bin/omega-repl.ts and projects/omega-lisp/bin/omega.ts (TS sources), projects/omega-lisp/src/repl/commands/ (per-command implementations). Live list: :help in the REPL.