CLI Reference
Why This Matters
This is the operational contract for day-to-day Arden development and CI.
Base Usage
arden <command> [options]
Command Map
| Command | Purpose |
|---|---|
new |
create a project scaffold |
build |
build current project |
run |
build + run project or single file |
compile |
compile single file |
check |
parse + type + borrow checks |
info |
print resolved project settings |
test |
discover/run @Test suites |
fmt |
format source |
lint |
report static findings |
fix |
apply safe fixes + format |
lex |
print lexer tokens |
parse |
print parsed AST |
bench |
measure end-to-end runtime |
profile |
one-run timing summary |
bindgen |
generate Arden extern bindings from C header |
lsp |
start language server |
New User Starter Set
Learn these first:
runcheckinfotestfmt
Practical Recipes
Single file:
arden check examples/single_file/basics/01_hello/01_hello.arden
arden run examples/single_file/basics/01_hello/01_hello.arden
Project mode:
arden new app
cd app
arden info
arden check
arden run
Program args passthrough:
arden run app.arden -- --mode ci --limit 10
Quality loop:
arden test
arden fmt
arden lint
Detailed Options
arden new
arden new <NAME> [--path <DIR>]
namerequired--pathoptional output directory (default./<NAME>)
arden build
arden build [--release] [--emit-llvm] [--no-check] [--timings]
--releaseoptimized codegen--emit-llvmwrite LLVM IR instead of final artifact--no-checkskip type/borrow checks--timingsprint internal phase timings
arden run
arden run [FILE] [--release] [--no-check] [--timings] [-- <PROGRAM_ARGS...>]
- optional
FILE; if omitted, runs current project - trailing
-- ...passes args to compiled program
arden compile
arden compile <FILE> [-o <OUT>] [--opt-level <L>] [--target <TRIPLE>] [--emit-llvm] [--no-check]
-o, --outputoutput path--opt-levelone of:0,1,2,3,s,z,fast--targetbackend target triple--emit-llvmwrite LLVM IR--no-checkskip type/borrow checks
arden check
arden check [FILE] [--timings]
- optional file; otherwise project entry point
--timingstiming breakdown in project mode
arden info
arden info
Prints resolved project configuration (entry, files, output, optimization and related settings). Use this first when build/run behavior looks unexpected.
Advanced Build Knobs (Project Mode)
These knobs are useful when you profile large project builds.
ARDEN_OBJECT_SHARD_THRESHOLD=1 ARDEN_OBJECT_SHARD_SIZE=2 arden build --timings
ARDEN_OBJECT_SHARD_THRESHOLDminimum active-file count before object sharding is enabledARDEN_OBJECT_SHARD_SIZEmax files per object-codegen shard
Defaults in current compiler:
ARDEN_OBJECT_SHARD_THRESHOLD=256ARDEN_OBJECT_SHARD_SIZE=4
Important:
- these are advanced performance tuning env vars
- they affect build cache/codegen behavior, not language semantics
- treat them as implementation-level controls, not stable language guarantees
Host CPU Native Codegen (Advanced)
By default, Arden emits code for a stable baseline CPU (x86-64 or generic)
to keep outputs portable across machines/CI runners.
To opt into host-specific tuning for local builds/runs:
ARDEN_CODEGEN_NATIVE_CPU=1 arden run file.arden
Notes:
- this is intended for local performance experiments
- avoid enabling it in shared CI/release pipelines unless you fully control runtime CPUs
- explicit
--targetbuilds keep target-driven behavior
Platform Linker Overrides (Advanced Troubleshooting)
Use only when diagnosing platform linker/toolchain setup issues.
ARDEN_LLVM_REAL_PREFIX- override LLVM prefix lookup used by linker/toolchain discovery
- mainly relevant on custom/local LLVM installs
ARDEN_WINDOWS_BUILTINS_LIB(Windows)- explicit path to
clang_rt.builtins-x86_64.libwhen auto-detection fails
- explicit path to
Example (Windows PowerShell):
$env:ARDEN_WINDOWS_BUILTINS_LIB = "C:\\llvm\\lib\\clang\\22\\lib\\windows\\clang_rt.builtins-x86_64.lib"
arden build --release
Tooling / CI Environment Variables
These are useful for repository tooling and diagnostics.
ARDEN_COMPILER_PATH- override compiler binary path in smoke scripts (for example, debug build vs release build)
CI_SKIP_COMPILER_BUILD=1- skip rebuilding compiler in smoke scripts before execution
ARDEN_FAILURE_SOURCEARDEN_FAILURE_SOURCESARDEN_FAILURE_CONTEXTARDEN_FAILURE_OUTPUT_ROOT- control CI crash artifact dump scripts (
scripts/ci/*emit_codegen_artifacts*)
- control CI crash artifact dump scripts (
Internal test-only markers (not user-facing CLI settings):
ARDEN_BAD_UTF8_ENV__ARDEN_TEST_START____ARDEN_TEST_PASS____ARDEN_TEST_SKIP____ARDEN_TEST_SKIP_REASON__
arden test
arden test [--path <PATH>] [--list] [--filter <PATTERN>]
--pathfile or directory target--listlist discovered tests without execution--filterrun only tests with matching name substring
arden fmt
arden fmt [PATH] [--check]
- format file/directory
--checkvalidates formatting without writing
arden lint
arden lint [PATH]
arden fix
arden fix [PATH]
arden lex
arden lex <FILE>
arden parse
arden parse <FILE>
arden bindgen
arden bindgen <HEADER> [-o <OUT_FILE>]
arden bench
arden bench [FILE] [--iterations <N>]
- default iterations:
5
arden profile
arden profile [FILE]
arden lsp
arden lsp