CLI Reference
The tulpar binary bundles the compiler, runtime, package manager,
formatter, and language server in a single executable. This page is
the exhaustive reference; the Getting
Started guide is a friendlier introduction.
Running a program
Section titled “Running a program”tulpar <source.tpr> # AOT compile + run (native speed)tulpar is AOT-only (since v3.0.0): it runs the LLVM pipeline
(LLVM → native binary → exec) and there is no other execution path. An
AOT failure (parse, codegen, or a missing clang / runtime archive) is a
hard error — so “it ran” always means the native binary ran.
Building a standalone binary
Section titled “Building a standalone binary”tulpar build <source.tpr> [output_name]Same as the default run path, but keeps the produced binary at
output_name (or <source> without .tpr if omitted). Subsequent
tulpar build calls skip recompilation if the output is newer than
the source and the driver. Set TULPAR_AOT_NOCACHE=1 to force a
rebuild.
tulpar build hello.tpr # produces ./hello (./hello.exe on Windows)tulpar build hello.tpr myapp # produces ./myappTULPAR_AOT_NOCACHE=1 tulpar build hello.tpr # always recompileFormatter
Section titled “Formatter”tulpar fmt <source.tpr>Re-emits the source with normalised indentation and operator spacing. Idempotent (running it twice produces the same output as once). No config file — the rules are baked in.
Package manager
Section titled “Package manager”tulpar pkg init # create a new tulpar.toml in the cwdtulpar pkg add <name> # add a dependencytulpar pkg install # install everything in tulpar.tomlSee the Package Manager page for the manifest format and dependency specs.
Language server (LSP)
Section titled “Language server (LSP)”tulpar --lspSpeaks LSP over stdio — wire it into your editor (VS Code extension, Vim/Neovim LSP client, etc.) and it owns stdin/stdout for the JSON-RPC transport. Don’t run it manually except for testing.
Capabilities: completion, hover, diagnostics, go-to-definition, “did-you-mean” suggestions for typos. See Tooling — LSP / Formatter / VS Code.
Version & update
Section titled “Version & update”tulpar version # or: tulpar --version, tulpar -vtulpar update # download & install the latest releasetulpar update --check # only report whether an update is availabletulpar update shells out to the platform’s installer script
(https://tulparlang.dev/install.{ps1,sh}) and replaces the running
binary with the latest published release. On Windows it uses the
rename-then-replace dance because Windows can’t overwrite a running
.exe directly.
--check is non-destructive — it queries GitHub for the latest tag,
prints the comparison, and exits.
tulpar --help # or: tulpar -h, tulpar help, tulpar ?Prints the same command reference shown when you run tulpar with no
arguments. Output language follows the system locale (Turkish on TR
locale, English elsewhere).
Compiler flags
Section titled “Compiler flags”These modify a single tulpar / tulpar build invocation. Everything
else on the command line is the program and its arguments.
| Flag | Effect |
|---|---|
--aot | Explicit AOT compile (already the default — there is no other backend) |
--build | Emit a standalone binary instead of compile-and-run (same as the build subcommand) |
--debug / -g | Forward -g to the clang++ link so debug sections survive into the binary |
--no-typecheck | Skip the [typecheck] pre-pass for this run |
--strict | Promote type-checker warnings to hard errors |
--vm / --run | Ignored with a warning — Tulpar is AOT-only, there is no VM |
--repl / -i | Removed — prints a notice and exits (no interpreter) |
Environment variables
Section titled “Environment variables”Grouped by subsystem. Booleans treat any non-empty value as “on” unless noted.
Diagnostics & locale
Section titled “Diagnostics & locale”| Variable | Effect |
|---|---|
LANG / LC_ALL / LC_MESSAGES | CLI + diagnostic language: a value containing tr selects Turkish, anything else English (Windows falls back to the OS UI locale) |
Type checking
Section titled “Type checking”| Variable | Effect |
|---|---|
TULPAR_NO_TYPECHECK=1 | Disable the [typecheck] pre-pass on every run / build |
TULPAR_STRICT=1 | Treat type-checker warnings as errors (=0 forces it off) |
AOT / compiler
Section titled “AOT / compiler”| Variable | Effect |
|---|---|
TULPAR_AOT_NOCACHE=1 | Force tulpar build to recompile even if the output is up-to-date |
TULPAR_AOT_TIME=1 | Print a per-phase wallclock breakdown of the AOT pipeline |
TULPAR_AOT_EMIT_LL=1 | Also emit the LLVM .ll IR alongside the object file |
TULPAR_AOT_LINK_FLAGS=… | Extra flags forwarded to the final clang++ link (e.g. -fsanitize=address to leak-check against an ASan-built runtime) |
TULPAR_RUNTIME_DIR=path | Extra directory to search for libtulpar_runtime.a |
Async / HTTP runtime
Section titled “Async / HTTP runtime”| Variable | Effect |
|---|---|
TULPAR_HTTP_POOL=N | Worker-pool size for the async HTTP client (default 4) |
TULPAR_HTTP_MAX_BODY=bytes | Max inbound HTTP request body for Wings servers (default 16 MiB) |
TULPAR_HTTP_QUIET=1 | Silence HTTP client request logging |
TULPAR_WINGS_HOST=127.0.0.1 | Bind host for Wings listeners — loopback avoids LAN firewall prompts |
| Variable | Effect |
|---|---|
TULPAR_CA_BUNDLE=path | Custom CA bundle (PEM) for HTTPS certificate verification |
TULPAR_TLS_INSECURE=1 | Skip certificate verification — dev / self-signed only |
Package manager & tooling
Section titled “Package manager & tooling”| Variable | Effect |
|---|---|
TULPAR_REGISTRY=url | Override the package registry base URL |
TULPAR_PUBLISH_TOKEN=token | Auth token for tulpar pkg publish |
TULPAR_LSP_DEBUG=1 | Verbose logging from the --lsp language server |
TULPAR_INSTALL_DIR=path | Where install.sh puts the binary (default ~/.local/bin) |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Source-level failure (parse / codegen / runtime error) |
| 2 | CLI usage error (unknown flag, bad combination) |