CLI Vitte
Use :
vitte [command] [options] <input>
Commands (recommended):
helpShow help and common tasksinit [dir]Create a minimal project skeletonexplain <code>Explain a diagnosis (e.g.E0001)doctorCheck toolchain prerequisitesparseParser only (without backend)checkParse + resolve + IR (without backend)emitOnly emit Vitte (without compilation)buildComplete build (default)profileComplete construction with summary of times/memory per stepreduceReduce a failed file to a minimal reproducerclean-cacheDelete stage cache files.vitte-cachemod graphDisplay the import graph, cycles and module weights (LOC/exports/imports)mod doctorCheck the hygiene of imports (unused, aliases, canonical paths, collisions)mod contract-diffCompare the exported contract of a module between 2 entries (--old/--new)
Options:
--lang <code>Language of diagnostics (e.g.en,fr). By defaultLANG/LC_ALL, thenen.--explain <code>Explain a diagnosis (e.g.E0001).--stage <name>Stop atparse|resolve|ir|backend.--diag-jsonIssue diagnostics in JSON.--diag-json-prettyIssue readable JSON diagnostics (includesdiag_schema).--diag-code-onlyIssue compact diagnostics (file:line:col CODE), useful for CI.--deterministicStable output order for diagnostics and tools.--cache-reportShow cache hit/miss ratio parse/resolve/ir.--runtime-profile <name>Restrict runtime/stdlib imports:core|system|desktop|arduino.--allow-experimentalAllow imports from modulesexperimental/....--warn-experimentalDegrade an experimental import refusal to a warning (migration mode).--deny-internalEnforce confidentiality of internal modules (default behavior).--allow-internalDisable internal module privacy checking.--strict-modulesProhibit glob imports and impose a strict form of module imports.--dump-stdlib-mapShow resolved map stdlib module -> exported symbols (history option name).--dump-module-indexExport the full JSON of the module index (modules,imports,exports,loc).--jsonFormod graph: emit the JSON payload of the graph.--from <module>Formod graph: limit the view to the subgraph reachable from the module.--dump-astExport the AST after parsing.--dump-irExport IR (--dump-miras alias).--strict-typesReject compatibility aliases (integer,uint32, etc.) and enforce canonical names.--strict-importsRequire explicit import aliases, reject unused aliases, and disallow relative paths.--fixFormod doctor: Show concrete rewrite suggestions.--max-imports <N>Formod doctor: report modules whose fan-out exceedsN.--old <file>/--new <file>Formod contract-diff.--strict-bridgeAlias of--strict-importsfor the binding policy.--fail-on-warningTreat warnings as errors.--stdoutOutput Vitte to standard output (impliesemit).--emit-vitteEmit a Vitte artifact only.--reproEnable reproducible output.--repro-strictImpose a strictly deterministic order for IR lowering.--parse-modulesParse + load modules (without resolution/lowering).--parse-silentDelete parse-only mode information logs.- Diagnostics include stable error codes (e.g.
error[E0001]: ...).
Examples:
vitte help
vitte init
vitte init app
vitte explain E0001
vitte doctor
vitte parse --lang=fr src/main.vit
Error codes:
- Diagnostics use stable prefixes per layer:
E000x: parse/grammarE100x: resolutionE1007: invalid signed/unsigned castE1010..E1020: module/stdlib import contractE200x: IR/loweringE300x: backend/toolchain- Codes are defined in
src/compiler/frontend/diagnostics_messages.vitl. .ftllocalization files can translate by code (preferred) or by message key.
Stdlib:
- See
docs/book/stdlib.htmlfor stdlib modules and examples. - Contract and ABI surface:
docs/book/compiler-stdlib-contract.html,docs/book/stdlib_abi_surface_v1.txt.
Historical options (still supported):
mod api-diff(akamod contract-diff)--stdlib-profile(historical alias of--runtime-profile)- correspondence:
minimal->core,kernel->system,full->desktop --parse-only--resolve-only--hir-only--mir-only--emit-vitte--strict-parse
Notes:
- The commands set a default mode, but explicit options take precedence.
- For strict analysis, use
parse --strict-parse <file>. - For the JSON of the graph in CI:
vitte mod graph --json --from __root__ <file>.