Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The j3c Command

j3c <command> [file.j3 | project]

A path can be a .j3 file, a j3.toml, or a directory containing one. With no path, j3c uses ./j3.toml.

Projects

CommandDoes
j3c new <name>New console project (--app for a window, --template fps or --template ui)
j3c guideHow to start a project
j3c checkType-check without building. --json prints one JSON object.
j3c runBuild and run. --file f.j3 runs one file inside a project.
j3c run tool.j3s [args]Run a script’s pub fn main once
j3c buildBuild target/<name>
j3c sizeWhat is inside the binary: sections, code per module, biggest functions

Build flags

These work with run and build, and override j3.toml.

FlagEffect
--releaseSmallest binary: opt s, no debug info, stripped. Checks stay on. build also writes packages.
--fastRemoves bounds-check aborts and debug info
--opt N0, 1, 2, 3, s, or z
--emit llvm|cPick the backend

Running windowed programs headless

FlagEffect
--headlessNo window and no sound (SDL offscreen)
--frames NStop after N frames
--screenshot f.pngSave the last frame
--hotRebuild and restart when a source file changes

See Testing Headless.

Code tools

CommandDoes
j3c fmt [path]Print formatted source. --write rewrites files, --check fails if any would change.
j3c lspLanguage server over stdio
j3c doc ...Stdlib docs, guides, and recipes (see below)

Documentation

CommandShows
j3c docTasks and the list of stdlib modules
j3c doc <module>A module’s public items (--short for one screen)
j3c doc search <word>Public names containing a word
j3c doc langLanguage summary
j3c doc recipes [name]Complete example programs
j3c doc j3ui, css, testing, ship, threads, androidGuides
j3c help manifestEvery j3.toml key

Looking inside

CommandPrints
j3c dump-irThe checked IR
j3c dump-llvmLLVM IR
j3c dump-cC source
j3c dump-ui <file.j3ui>J3 generated from a UI component
j3c dump-bc <file.j3s>Script bytecode
j3c dump-syntaxA TextMate grammar for editors

Editor and assets

CommandDoes
j3c editor [project]Open the 3D scene editor
j3c -e scene <op>List, get, add, set, delete, or check scene objects
j3c -e renderDraw a scene to a PNG without a window
j3c -e genRun mesh generators in assets/gen/ that changed
j3c -e mcpMCP server, so AI agents can edit and render scenes
j3c golden <dir>Headless golden-image tests
j3c -e imgdiff a.png b.pngPixel diff two images

Version

j3c version --verbose prints the build, the stdlib source, and the binary path, which helps spot a stale j3c on your PATH.