Skip to content

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.

Terminal window
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.

Terminal window
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.

Terminal window
tulpar build hello.tpr # produces ./hello (./hello.exe on Windows)
tulpar build hello.tpr myapp # produces ./myapp
TULPAR_AOT_NOCACHE=1 tulpar build hello.tpr # always recompile
Terminal window
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.

Terminal window
tulpar pkg init # create a new tulpar.toml in the cwd
tulpar pkg add <name> # add a dependency
tulpar pkg install # install everything in tulpar.toml

See the Package Manager page for the manifest format and dependency specs.

Terminal window
tulpar --lsp

Speaks 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.

Terminal window
tulpar version # or: tulpar --version, tulpar -v
tulpar update # download & install the latest release
tulpar update --check # only report whether an update is available

tulpar 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.

Terminal window
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).

These modify a single tulpar / tulpar build invocation. Everything else on the command line is the program and its arguments.

FlagEffect
--aotExplicit AOT compile (already the default — there is no other backend)
--buildEmit a standalone binary instead of compile-and-run (same as the build subcommand)
--debug / -gForward -g to the clang++ link so debug sections survive into the binary
--no-typecheckSkip the [typecheck] pre-pass for this run
--strictPromote type-checker warnings to hard errors
--vm / --runIgnored with a warning — Tulpar is AOT-only, there is no VM
--repl / -iRemoved — prints a notice and exits (no interpreter)

Grouped by subsystem. Booleans treat any non-empty value as “on” unless noted.

VariableEffect
LANG / LC_ALL / LC_MESSAGESCLI + diagnostic language: a value containing tr selects Turkish, anything else English (Windows falls back to the OS UI locale)
VariableEffect
TULPAR_NO_TYPECHECK=1Disable the [typecheck] pre-pass on every run / build
TULPAR_STRICT=1Treat type-checker warnings as errors (=0 forces it off)
VariableEffect
TULPAR_AOT_NOCACHE=1Force tulpar build to recompile even if the output is up-to-date
TULPAR_AOT_TIME=1Print a per-phase wallclock breakdown of the AOT pipeline
TULPAR_AOT_EMIT_LL=1Also 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=pathExtra directory to search for libtulpar_runtime.a
VariableEffect
TULPAR_HTTP_POOL=NWorker-pool size for the async HTTP client (default 4)
TULPAR_HTTP_MAX_BODY=bytesMax inbound HTTP request body for Wings servers (default 16 MiB)
TULPAR_HTTP_QUIET=1Silence HTTP client request logging
TULPAR_WINGS_HOST=127.0.0.1Bind host for Wings listeners — loopback avoids LAN firewall prompts
VariableEffect
TULPAR_CA_BUNDLE=pathCustom CA bundle (PEM) for HTTPS certificate verification
TULPAR_TLS_INSECURE=1Skip certificate verification — dev / self-signed only
VariableEffect
TULPAR_REGISTRY=urlOverride the package registry base URL
TULPAR_PUBLISH_TOKEN=tokenAuth token for tulpar pkg publish
TULPAR_LSP_DEBUG=1Verbose logging from the --lsp language server
TULPAR_INSTALL_DIR=pathWhere install.sh puts the binary (default ~/.local/bin)
CodeMeaning
0Success
1Source-level failure (parse / codegen / runtime error)
2CLI usage error (unknown flag, bad combination)