1
0
Fork 0
forked from fun/fun

Holiday is over, now I have fun again. No code changes. (0.38.11)

This commit is contained in:
Johannes Findeisen 2026-02-18 17:39:10 +01:00
commit f896e1d3bf
13 changed files with 329 additions and 0 deletions

38
docs/cli.md Normal file
View file

@ -0,0 +1,38 @@
# Fun CLI
Reference for the `fun` command-line interface.
## Synopsis
```
fun [options] <script.fun> [-- args...]
```
If no script is supplied and interactive mode is available, `fun` starts a REPL (see `docs/repl.md`).
## Common options
- `-i`, `--repl` — start an interactive REPL
- `-v`, `--version` — print version and exit
- `-h`, `--help` — show help and exit
Options may vary between versions; run `fun --help` to see what your build supports.
## Exit codes
- `0` — success
- non-zero — error during parse, compile, or runtime
## Includes and library paths
- `FUN_LIB_DIR` — environment variable that points to the stdlib location; when running from the repo, set this to `./lib`.
- `DEFAULT_LIB_DIR` — compiled-in fallback path determined at build/install time.
See also: `docs/includes.md` for namespaced includes and search order.
## Examples
Run a script:
```
FUN_LIB_DIR=./lib ./build_debug/fun examples/hello.fun
```
Start the REPL:
```
./build_debug/fun -i
```