Skip to content

CLI Reference

CLI Reference

thagc is now focused on compile/run flows. Project/dependency/update flows are handled by drago.

Usage

Terminal window
thagc <command> [options]
thagc <file.tg> [options] # shorthand for build

Commands

build

Terminal window
thagc build <input.tg> -o <output> [options]
FlagDescription
-o <path>Output binary path
--target=<triple>Compile for target triple
--emit-llvmEmit LLVM IR (.ll) only
--include-path=<dir> / -I<dir>Additional import root (typically passed by drago)
--link-lib=<name>Extra link library
--link-dir=<path>Extra link directory
--link-arg=<arg>Raw linker arg

run

Terminal window
thagc run <input.tg> [build-options]

Builds then executes the produced binary.

check

Terminal window
thagc check <input.tg> [--target=<triple>] [--include-path=<dir>]

Performs parse/type/lowering/codegen validation without final link step.

fmt

Terminal window
thagc fmt <input.tg>

Normalizes indentation and trailing whitespace in-place.

migrate

Terminal window
thagc migrate [--force]

Migrates legacy project files to drago.toml / drago.lock.

Managed by drago

  • drago add/install/update/remove
  • drago build/run/test
  • Registry interaction and lock resolution