% racket -help
usage: racket [<option> ...] <argument> ...
File and expression options:
-e <exprs>, --eval <exprs>
Evaluate <exprs>, print results
-f <file>, --load <file>
Like -e '(load "<file>")' without printing
-t <file>, --require <file>
Like -e '(require (file "<file>"))' [*]
-l <path>, --lib <path>
Like -e '(require (lib "<path>"))' [*]
-p <package>
Like -e '(require (planet "<package>")' [*]
-r <file>, --script <file>
Same as -f <file> -N <file> --
-u <file>, --require-script <file>
Same as -t <file> -N <file> --
-k <n> <m> <p>
Load executable-embedded code from offset <n> to <p>
-Y <file> <n> <m> <p>
Like -k <n> <m> <p>, but from <file>
-m, --main
Call `main` with command-line arguments, print results
[*] Also `require`s a `main` submodule, if any
Interaction options:
-i, --repl
Run interactive read-eval-print loop; implies -v
-n, --no-lib
Skip `(require (lib "<init-lib>"))` for -i/-e/-f/-r
-v, --version
Show version
-V, --no-yield
Skip `((executable-yield-handler) <status>)` on exit
Configuration options:
-y, --make
Yes, enable automatic update of compiled files
-c, --no-compiled
Disable loading of compiled files
-q, --no-init-file
Skip load of racketrc.rktl for -i
-I <path>
Set <init-lib> to <path> (sets language)
-X <dir>, --collects <dir>
Main collects at <dir> (or "" disables all)
-S <dir>, --search <dir>
More collects at <dir> (after main collects)
-G <dir>, --config <dir>
Main configuration directory at <dir>
-A <dir>, --addon <dir>
Addon directory at <dir>
-U, --no-user-path
Ignore user-specific collects, etc.
-R <paths>, --compiled <paths>
Set compiled-file search roots to <paths>
-C, --cross
Cross-build mode; save current collects and config
as host
-N <file>, --name <file>
Sets `(find-system-path 'run-file)` to <file>
-E <file>, --exec <file>
Sets `(find-system-path 'exec-file)` to <file>
-j, --no-jit
No effect, since there is no just-in-time compiler
-M, --compile-any
Compile to machine-independent form
-d, --no-delay
Disable on-demand loading of syntax and code
-b, --binary
No effect, since stdin and stdout/stderr are
always binary
-W <levels>, --warn <levels>
Set stderr logging to <levels>
-O <levels>, --stdout <levels>
Set stdout logging to <levels>
-L <levels>, --syslog <levels>
Set syslog logging to <levels>
--compile-machine <machine>
Compile for <machine>
--cross-compiler <machine> <plugin-dir>
Use compiler plugin for <machine>
--cross-server <mach> <comp> <lib>
Drive cross-compiler (as only option)
Meta options:
--
No argument following this switch is used as a switch
-Z
Ignore the argument following this switch
-h, --help
Show this information and exits, ignoring other options
Default options:
* If only configuration options are provided, -i is added
* If only configuration options are before the first
argument, -u is added
* If -t/-l/-p/-u appears before the first -i/-e/-f/-r,
-n is added
* <init-lib> defaults to racket/init
Switch syntax:
Multiple single-letter switches can be collapsed, with
arguments placed after the collapsed switches; the first
collapsed switch cannot be --
For example,
-ifve file expr
is the same as
-i -f file -v -e expr
Start-up sequence:
1. Set `current-library-collection-paths`
2. Require `(lib "<init-lib>")` [when -i/-e/-f/-r, unless -n]
3. Evaluate/load expressions/files in order, until first error
4. Load "racketrc.rktl" [when -i]
5. Run read-eval-print loop [when -i]