CLI Reference
The wysna CLI provides an all-in-one toolchain for building, running, type-checking, and formatting Wysna code.
Command Overview
Section titled “Command Overview”wysna [SUBCOMMAND] [OPTIONS]Core Subcommands
Section titled “Core Subcommands”| Subcommand | Description |
|---|---|
wysna run <file> |
Compiles and executes a file or project in memory/temp workspace |
wysna build [file] |
Compiles the source into a native binary or C99 translation unit |
wysna check [file] |
Performs lexing, parsing, and type-checking without emitting code |
wysna emit-mir <file> |
Lowers code to Mid-Level IR (MIR) and outputs the IR graph |
wysna init [name] |
Scaffolds a new Wysna project with standard directory structure |
wysna fmt [files] |
Formats source files according to Wysna style conventions |
wysna env |
Displays compiler version, host architecture, and C backend info |
Common Options
Section titled “Common Options”wysna build
Section titled “wysna build”# Basic build producing executable `app`wysna build src/main.wysna -o app
# Release build with optimizations enabled (passed to Clang/GCC)wysna build src/main.wysna -o app --opt-level 3
# Emit C99 source file instead of running the C compilerwysna build src/main.wysna --emit-c -o output.c
# Target WASI (WebAssembly System Interface)wysna build src/main.wysna --target wasi -o app.wasmwysna check
Section titled “wysna check”Fast feedback loop for IDEs and CI workflows:
wysna check src/main.wysnaReturns exit code 0 if all types and exhaustive match checks pass, or prints structured diagnostic spans with file and line coordinates upon failure.