Documentation

All guidesReference

Shell reference

The executable command set in Odete, its useful flags, and shell syntax.

7 min read

A project shell

The shell starts in the project folder: absolute paths and ~ are interpreted from that root. help lists only registered internal commands; use which to query command resolution.

Use project paths and do not treat external paths or traversal as a supported workflow. It accepts single and double quotes, $NAME variables, pipes, >, >>, <, 2>, 2>&1, &&, ||, ;, and background jobs with &. Backtick substitution is not implemented; treat it as a deliberate command set, not a full Unix terminal.

pwd
export APP_ENV=dev
echo $APP_ENV
grep -rn "TODO" src | head -n 20
CommandExampleBehavior, flags, and limits
helphelplists registered internal commands; not aliases or dynamic bins
pwdpwdshows the current folder relative to the project
cdcd srcchanges the working directory to the requested path
echoecho "hi"prints arguments; do not use as a Unix flag manual
catcat package.jsonshows UTF-8 files or pipe input
headhead -n 5 README.mdfirst lines; accepts -n N or -N
tailtail -n 20 log.txtlast lines; accepts -n N or -N
wcwc -l src/main.tscounts lines, words, bytes; -l, -w, -c
whichwhich npmresolves an Odete command or node_modules/.bin path

Files and text

ls supports -a and -l; head and tail support -n N or -N; grep supports -i, -n and -r; find understands -name with * and ?; mkdir supports -p. For recursive search, grep and find skip node_modules, .git, .odete, and dist.

rm protects the project root, but removing files or directories with rm -r is still irreversible. Check pwd and ls before writing operations.

CommandExampleBehavior, flags, and limits
lsls -lalists; only -a and -l have an effect
mkdirmkdir -p src/uicreates directories; -p creates parents
touchtouch src/ui/Card.tsxcreates empty file or updates its date
rmrm -rf distremoves; -r for folders, -f ignores absence; root is blocked
cpcp -r public distcopies files or folders; -r is accepted but copying is already recursive
mvmv old.ts new.tsmoves or renames; replaces an existing destination
grepgrep -rin "TODO" srctext search; -i, -n, -r; not full regex
findfind src -name "*.t?"recursive listing; -name accepts * and ? wildcards

Environment, jobs, and output

env lists variables and export NAME=value defines them. history shows prior commands; clear clears the screen; date, sleep, true, and false are available for short scripts.

A server or background command appears in jobs. Stop it with kill %1 or kill all; Ctrl+C cancels the current command. open recognizes ports in local 127.0.0.1 or localhost URLs; serve or http-server starts a static server in the requested directory.

npm run dev &
jobs
kill %1
serve dist
CommandExampleBehavior, flags, and limits
envenvlists the session environment
exportexport MODE=devonly NAME=value assignments
clearclearclears the terminal screen
historyhistorylists saved history
swiftswiftexplains there is no Swift compiler and exits 1
datedatedevice date and time
sleepsleep 2waits N seconds
truetrueexits with code 0
falsefalseexits with code 1
jobsjobslists jobs and local ports
killkill %1stops a job; kill all stops all
openopen http://127.0.0.1:5173asks Preview to open that server
gitgit statusstatus, add, reset/restore, commit, log/show/diff, branch, checkout/switch, merge, stash, remote, fetch/pull/push, rev-parse
npmnpm run devinstall/i/add, uninstall/remove/rm/un, ls, init, run, start/dev/build/test/preview/lint, exec/x/dlx, version, cache
nodenode -e "console.log(1)"runs JS/TS/JSX/TSX; -e/--eval, -p/--print, -v
npxnpx viteruns a local binary or built-in substitute; native binary fails on iPad
pnpm / yarn / bunpnpm installnpm aliases, not independent implementations