modus
Menu

Commands of the console

The 34 commands that the console has before any module is loaded, as help() prints them. A module that the console loads adds its exports: see the modules.

CommandWhat it does
help()list the commands
programs()list the programs that run
memory()memory and kernel counters
modules()list the modules of the boot image
load(Text)load a module here: direct calls
isolate(Text)load a module in a sandboxed program
unload(Text)remove a module that load or isolate added
connect(Text)call the exports of a service that runs
start(Text)start a program, by module name
stop(Text)stop a program, by name
grants(Text)what a program has from the root service
revoke(Text, Text)end a grant of a program that runs
replace(Text, Text)give the second module where a module imports the first
replacements()list the replacement table of the machine
time() -> Integermilliseconds since boot
hash(Text) -> Textthe BLAKE3 hash of a text
length(Text) -> Integerthe number of bytes of a text
text(Integer) -> Textthe decimal text of an integer
repeat(Text, Integer) -> Texta text, several times
buffer(Integer) -> Handlea new memory object, in pages
byte(Handle, Integer) -> Integerone byte of a memory object
release(Handle)close a handle
variables()list the variables
clear()clear the console
shutdown()stop the machine
history_clear()forget the line history, in memory and in its store
measure_completion()measure one key of the completion list
where(Table, Text, Value) -> Tablethe rows of a table whose field has a value
sort(Table, Text) -> Tablethe rows of a table in the order of a field
join(Table, Table, Text) -> Tableeach pair of rows of two tables with one value of a field
columns(Table, Text) -> Tablethe rows with the fields that a text names: "a b c"
first(Table, Integer) -> Tablethe first rows of a table
rows(Table) -> Integerthe count of rows of a table
row(Table, Integer) -> Recordone row of a table, from 1

Read from programs/console/commands.odin and programs/console/tables.odin.