Skip to content

Command reference

The CLI/HTTP shell runs the commands below against the selected disk, with qjs supplied by the isolated JavaScript runtime. File paths refer to the virtual filesystem; KV namespaces and SQL databases use logical names. Supported flags are listed explicitly; other GNU/Linux utility options may return errors.

wabesql database list, wabesql database create NAME and wabesql query NAME [SQL] manage named SQLite databases and execute SQL from an argument or stdin. Query results stream as NDJSON. Use --help for names, transactions and output. See SQL commands.

Command Supported form and behavior
cat Files and - stdin; -n, -b, -s, -E, -T, -v, -A, -e, -t, -u and corresponding long flags. Plain output preserves bytes.
put PATH Replace a file with stdin through EOF. Parent directory must exist.
ls -1, -a, -A, -d, -p, -F, -R, -l, -h. -l shows virtual kind and size.
mkdir [-p] PATH... Create directories; -p creates parents.
rm PATH... Remove files or empty directories. Recursive flags are unavailable.
find Roots; -name, -iname, -path, -ipath, -wholename, -type, -empty, -size, -mindepth, -maxdepth, boolean groups/and/or/not, final -print or -print0.

Find patterns and escaped grouping arguments belong to the command. -exec, -prune, time/owner predicates and action interleaving are unavailable. Metadata is virtual; symlinks and native ownership/modes are absent.

Command Supported options
grep -r, -n, -F, -i, -m COUNT, -e; pattern and paths or stdin.
rg -n, -N, -e, -g, --files, --hidden, --no-ignore, -u, -F, -i, -s, -S, -o, -v, -l, --files-without-match, -c, --count-matches, -q, -H, -I, -w, -x, -0, -m, -A, -B, -C, --max-depth, -a.

Search uses Rust regex syntax. PCRE2, multiline search, preprocessing, encoding conversion and ripgrep JSON output are unavailable. NUL-containing input requires rg -a to search as text.

rg PATTERN searches virtual / by default. A shell pipe or input redirect selects stdin; use rg PATTERN - for the outer invocation’s stdin. Ignore handling is described in search.

Command Supported options and behavior
head Lines/bytes with -n, -c, compact/legacy numeric counts, negative counts, multiple files, -q, -v. No K/M suffixes.
tail Lines/bytes, +N, legacy counts, multiple files, -q, -v. No follow mode or count suffixes.
nl -b, -h, -f numbering styles and BRE patterns; -v, -i, -w, -n, -s, -d, -l, -p. One input file.
sed -n, -e, -E, -r, -s, -i[SUFFIX]; number/$/regex/range addresses, !, p, d, q[CODE], s with capture replacements, occurrence and g/p/i.
sort Byte ordering, -n, -h, -r, -u, -s, -f, -b, -z, -o and common long aliases.
wc Line, byte and ASCII-word counts. Output uses wabe Disk’s concise format.
printf Format reuse; %s, %c, %b, %d, %i, %u, %x, %X, %o, %%; width, precision, signs, padding and escapes.
echo [-n] Literal arguments separated by spaces; optional final newline suppression.
true, false Status 0 or 1.

Sed hold space, branches, script files, host e/r/w commands, regex backreferences and case-conversion escapes are unavailable. Sort has no field/key selection, version sort, locale collation or parallel mode. Printf has no float, %q or dynamic * formatting.

cat, head, tail, nl, sed and sort accept stdin and - file operands. Negative head counts, tail, in-place transforms, large sorts and before-context can use local scratch storage. Text records default to a 1 MiB line limit.

Terminal window
kv put app theme dark
kv get app theme
kv exists app theme
kv delete app theme
kv scan app --prefix user: --after user:100 --limit 50 --reverse

kv put NS KEY [VALUE] [--json|--bytes] defaults to text. Without a value argument, it consumes stdin. kv get emits raw payload with no added newline and returns status 1 for an absent key. Exists uses 0 for present and 1 for absent. Delete is idempotent.

wabe Disk shell source
printf '{"enabled":true}' | kv put app feature --json
kv batch app <<'JSON'
[
{"op":"put","key":"theme","value":{"type":"text","value":"dark"}},
{"op":"delete","key":"oldTheme"}
]
JSON

Scan emits NDJSON entries. Batch reads an array of typed mutations from stdin. Key/value/batch limits match the KV contract. JSON/base64 scan lines can exceed the line limit of a downstream text command.

redis [--namespace NAME] [--raw|--json] [-e] [-x|--pipe] [COMMAND ARG...] runs the supported Redis commands on the current disk. redis-cli is an alias. Without a command argument, it reads quoted command lines from stdin; --pipe reads RESP arrays. The Redis SDK and CLI reference describes output, error status and MULTI/EXEC behavior.

git add, commit, status, diff, log, show, branch, restore --staged, reset, merge and linear rebase operate on the selected branch. HTTP Bash requests require branch=NAME or an explicit git --branch NAME on each Git command. See the supported forms and conflict workflow.

qjs FILE|- [ARG...] loads source from the disk or stdin. qjs -e SCRIPT [ARG...] uses an inline async function body. It prints stdout/stderr and returns execution status; it does not print the returned JS value. See JavaScript execution.

mv [--] SOURCE DESTINATION moves a file or directory without rewriting descendants. An existing directory destination receives the source basename. Overwriting a directory requires an empty destination; moving into itself fails.