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

CLI Reference

Flint’s CLI is the primary interface for all engine operations. Below is a reference of available commands.

Commands

CommandDescription
flint init <name>Initialize a new project
flint entity createCreate an entity in a scene
flint entity deleteDelete an entity from a scene
flint scene createCreate a new scene file
flint scene listList scene files
flint scene infoShow scene metadata and entity count
flint query "<query>"Query entities with the Flint query language
flint schema <name>Inspect a component or archetype schema
flint validate <scene>Validate a scene against constraints
flint asset importImport a file into the asset store
flint asset listList assets in the catalog
flint asset infoShow details for a specific asset
flint asset resolveCheck asset references in a scene
flint asset generateGenerate an asset using AI providers
flint asset validateValidate a generated model against style constraints
flint asset manifestGenerate a build manifest of all generated assets
flint asset regenerateRegenerate an existing asset with new parameters
flint asset job statusCheck status of an async generation job
flint asset job listList all generation jobs
flint edit <file>Unified interactive editor (auto-detects file type)
flint play <scene>Play a scene with first-person controls and physics
flint render <scene>Render a scene to PNG (headless)
flint gen <spec>Run a procedural generation spec to produce meshes or textures
flint prefab view <template>Preview a prefab template in the viewer

The play Command

Launch a scene as an interactive first-person experience with physics:

flint play demo/phase4_runtime.scene.toml
flint play levels/tavern.scene.toml --schemas schemas --fullscreen
FlagDescription
--schemas <path>Path to schemas directory (repeatable; later paths override earlier). Default: schemas
--fullscreenLaunch in fullscreen mode
--input-config <path>Input config overlay path (highest priority, overrides all other layers)

Player Controls (Defaults)

These are the built-in defaults. Games can override any binding via input config files (see Physics and Runtime: Input System).

InputAction
WASDMove
MouseLook around
Left ClickFire (weapon)
SpaceJump
ShiftSprint
EInteract with nearby object
RReload
1 / 2Select weapon slot
EscapeRelease cursor / Exit
F1Cycle debug rendering mode (PBR → Wireframe → Normals → Depth → UV → Unlit → Metal/Rough)
F4Toggle shadows
F5Toggle bloom
F6Toggle post-processing pipeline
F11Toggle fullscreen

Gamepad controllers are also supported when connected. Bindings for gamepad buttons and axes can be configured in input config TOML files.

The play command requires the scene to have a player archetype entity with a character_controller component. Physics colliders on other entities define the walkable geometry.

Game Project Pattern

Games that define their own schemas, scripts, and assets use multiple --schemas paths. Game projects typically live in their own repositories with the engine included as a git subtree at engine/. The engine schemas come first, then the game-specific schemas overlay on top:

# From a game project root (engine at engine/)
cargo run --manifest-path engine/Cargo.toml --bin flint-player -- \
  scenes/level_1.scene.toml \
  --schemas engine/schemas \
  --schemas schemas

This loads the engine’s built-in components (transform, material, rigidbody, etc.) from engine/schemas/, then adds game-specific components (health, weapon, enemy AI) from the game’s own schemas/. See Schemas: Game Project Schemas for directory structure details and Building a Game Project for the full workflow.

Standalone Player Binary

The player is also available as a standalone binary for distribution:

cargo run --bin flint-player -- demo/phase4_runtime.scene.toml --schemas schemas

# With game project schemas (from a game repo with engine subtree)
cargo run --manifest-path engine/Cargo.toml --bin flint-player -- \
  scenes/level_1.scene.toml --schemas engine/schemas --schemas schemas

The render Command

Render a scene to a PNG image without opening a window:

flint render demo/phase3_showcase.scene.toml --output hero.png --schemas schemas
flint render scene.toml -o shot.png --distance 20 --pitch 30 --yaw 45 --target 0,1,0 --no-grid
FlagDefaultDescription
--output <path> / -orender.pngOutput file path
--width <px>1920Image width
--height <px>1080Image height
--distance <f32>(auto)Camera distance from target
--yaw <deg>(auto)Horizontal camera angle
--pitch <deg>(auto)Vertical camera angle
--target <x,y,z>(auto)Camera look-at point
--fov <deg>(auto)Field of view
--no-gridfalseDisable ground grid
--debug-mode <mode>(none)wireframe, normals, depth, uv, unlit, metalrough
--wireframe-overlayfalseWireframe edges on solid geometry
--show-normalsfalseNormal direction arrows
--no-tonemappingfalseRaw linear output
--no-shadowsfalseDisable shadow mapping
--shadow-resolution <px>1024Shadow map resolution per cascade
--no-postprocessfalseDisable post-processing
--bloom-intensity <f32>0.04Bloom strength
--bloom-threshold <f32>1.0Bloom brightness threshold
--exposure <f32>1.0Exposure multiplier
--ssao-radius <f32>0.5SSAO sample radius
--ssao-intensity <f32>1.0SSAO intensity (0 = disabled)
--fog-density <f32>0.02Fog density (0 = disabled)
--fog-color <r,g,b>0.7,0.75,0.82Fog color
--fog-height-falloff <f32>0.1Fog height falloff
--schemas <path>schemasSchemas directory (repeatable)

The edit Command

Unified interactive editor that auto-detects file type and opens the appropriate tool:

flint edit levels/demo.scene.toml              # Scene viewer (hot-reload)
flint edit levels/demo.scene.toml --spline     # Spline/track editor
flint edit models/character.glb                # Model previewer (orbit camera)
flint edit models/character.glb --watch        # Model previewer with file watching
flint edit specs/oak_tree.procgen.toml         # Procgen previewer (mesh/texture)
flint edit specs/stone_wall.procgen.toml       # Texture pipeline editor (if pipeline pattern)
flint edit terrain.terrain.toml                # Terrain editor

File Type Detection

ExtensionToolDescription
.scene.toml, .chunk.tomlScene viewerHot-reload, egui inspector, gizmos
.procgen.toml (pipeline pattern)Texture pipeline editorNode graph for texture specs
.procgen.toml (other)Procgen previewerLive preview of generated mesh/texture
.terrain.tomlTerrain editorHeightmap terrain editing
.glb, .gltfModel previewerOrbit camera, animation playback

Common Flags

FlagDefaultDescription
--schemas <path>schemasSchemas directory (repeatable)
--width <px>(auto)Window width
--height <px>(auto)Window height
--no-gridfalseDisable ground grid
--watchfalseWatch for file changes
--seed <u64>(auto)Override seed (procgen)
--no-inspectorfalseHide egui inspector (scene)
--auto-orbitfalseAuto-orbit camera (model/procgen)

Model Previewer Flags

FlagDefaultDescription
--distance <f32>(auto)Camera orbit distance
--yaw <deg>(auto)Horizontal camera angle
--pitch <deg>(auto)Vertical camera angle
--target <x,y,z>(auto)Camera look-at point
--fov <deg>(auto)Field of view
--no-animatefalseDisable animation playback
--clip <name>(none)Start with a specific animation clip
--anim-speed <f32>1.0Animation playback speed multiplier
--render <path>(none)Render to PNG instead of opening a window

Scene Viewer Controls

InputAction
Left-clickSelect entity / pick gizmo axis
Left-dragOrbit camera (or drag gizmo if axis selected)
Right-dragPan camera
ScrollZoom
Ctrl+SSave scene to disk
Ctrl+ZUndo position change
Ctrl+Shift+ZRedo position change
EscapeCancel gizmo drag
F1Cycle debug mode
F2Toggle wireframe overlay
F3Toggle normal arrows
F4Toggle shadows

When an entity is selected, a translate gizmo appears with colored axis arrows (red = X, green = Y, blue = Z) and plane handles. Click and drag an axis or plane to move the entity. Position changes can be undone/redone and saved back to the scene file.

Spline Editor Controls (--spline)

InputAction
Left-clickSelect control point
Left-dragMove control point on constraint plane
Alt + dragMove control point vertically (Y axis)
Middle-dragOrbit camera
Right-dragPan camera
ScrollZoom
Tab / Shift+TabCycle through control points
IInsert a new control point after selected
DeleteRemove selected control point
Ctrl+SSave spline to disk
Ctrl+ZUndo

Legacy aliases: flint serve, flint preview, flint gen-preview, flint tex-edit, flint terrain-edit, and flint spline-edit still work but route through flint edit.

The asset generate Command

Generate assets using AI providers:

flint asset generate texture -d "rough stone wall" --style medieval_tavern
flint asset generate model -d "wooden chair" --provider meshy --seed 42
flint asset generate audio -d "tavern ambient noise" --duration 10.0
FlagDescription
-d, --descriptionGeneration prompt (required)
--nameAsset name (derived from description if omitted)
--providerProvider to use: flux, meshy, elevenlabs, mock
--styleStyle guide name (e.g., medieval_tavern)
--width, --heightImage dimensions for textures (default: 1024x1024)
--seedRandom seed for reproducibility
--tagsComma-separated tags
--outputOutput directory (default: .flint/generated)
--durationAudio duration in seconds (default: 3.0)

Generated assets are automatically stored in content-addressed storage and registered in the asset catalog with a .asset.toml sidecar. Models are validated against style constraints after generation.

The gen Command

Run a procedural generation spec to produce meshes (GLB) or textures (PNG):

flint gen specs/oak_tree.procgen.toml -o tree.glb
flint gen specs/stone_wall.procgen.toml -o wall.png
flint gen specs/oak_tree.procgen.toml --dry-run
flint gen specs/oak_tree.procgen.toml --seed 42 -o tree.glb
flint gen specs/oak_tree.procgen.toml --batch 10 --seed-start 0
FlagDefaultDescription
-o, --output <path>(derived from spec)Output file or directory
--seed <u64>(from spec)Override the spec’s seed
--dry-runfalsePrint estimated cost without generating
--format <fmt>(auto)Force output format: glb or png
--batch <N>(none)Generate N variants with sequential seeds
--seed-start <u64>0Starting seed for batch generation
--registerfalseStore output in content store with provenance
--forcefalseRegenerate even if cached
--validatefalseValidate output after generation
--strictfalseTreat warnings as failures
--style-guide <path>(none)Style guide TOML for validation constraints

The prefab view Command

Preview a prefab template in the interactive viewer:

flint prefab view prefabs/kart.prefab.toml --schemas engine/schemas --schemas schemas
FlagDefaultDescription
--prefix <string>"preview"Prefix for ${PREFIX} substitution
--schemas <path>schemasSchemas directory (repeatable)

This command loads the .prefab.toml template, performs variable substitution, builds a synthetic scene from the expanded entities, and launches the viewer for visual inspection. Useful for verifying prefab structure and appearance without creating a full scene.

Common Flags

FlagDescription
--scene <path>Path to scene file
--schemas <path>Path to schemas directory (repeatable for multi-schema layering; default: schemas)
--format <fmt>Output format: json, toml, or text
--fixApply auto-fixes (with validate)
--dry-runPreview changes without applying

Usage

# Get help
flint --help
flint <command> --help

# Examples
flint init my-game
flint edit levels/tavern.scene.toml              # Interactive scene viewer
flint edit models/character.glb --watch           # Model previewer
flint play levels/tavern.scene.toml
flint render levels/tavern.scene.toml -o shot.png
flint gen specs/oak_tree.procgen.toml -o tree.glb
flint query "entities where archetype == 'door'" --scene levels/tavern.scene.toml