FLI Reference
FLI (fli.exe) is the FCS Language Interpreter command-line tool. It is one of the most important tools for inspecting models, evaluating expressions, generating outputs, and supporting AI-assisted workflows.
This guide ranks the available modes by usefulness for iterative development and agent-driven exploration.
Recommended Usage Order
--i-jsonREPL — best for iterative work--list-members— best for quick discovery- 2-arg mode — best for simple one-off evaluation
- 3-arg mode — best for evaluation with overrides
- Interactive console — useful, but requires a real TTY
- Output generation — for producing scene/image/report artifacts
1. --i-json REPL (Best for Iterative Work)
fli.exe --i-json model.fcs
This is the most powerful mode for repeated inspection because it keeps a persistent session open and accepts JSON commands line by line.
Why it is best
- avoids repeated startup cost
- supports iterative probing
- works well for automation and AI agents
- can reload files without restarting the process
Supported JSON commands
{"ls":""}
List all members.
{"ls":"subexpr"}
List members of a sub-expression.
{"expr":"<expression>"}
Evaluate an expression.
{"expr":"...","updater":"{param=val}"}
Evaluate with an override/updater.
{"reload":true}
Reload files from disk.
Typical session flow
fli.exe --i-json model.fcs
Then send JSON lines such as:
{"ls":""}
{"expr":"width"}
{"expr":"area"}
{"expr":"roofHeight","updater":"{span=12}"}
{"reload":true}
Gotcha: first line may not be JSON
The first line can be a non-JSON engine warning. If you are scripting against this mode, filter out lines that do not start with {.
Practical tip: when building wrappers around
--i-json, treat each output line independently and ignore banner/warning text before parsing JSON.
2. --list-members (Quick Discovery)
fli.exe --list-members model.fcs
This returns JSON describing the available members, values, and types in the model.
Best use cases
- discover what a model exposes
- inspect top-level parameters quickly
- seed further evaluation steps in
--i-jsonor 2-arg mode
Strengths
- non-interactive
- machine-readable
- fast for inventory-style inspection
Limitation
It is a snapshot, not a persistent session.
Practical tip: start with
--list-memberswhen you inherit an unfamiliar.fcsfile and want to know what names are available before evaluating expressions.
3. 2-Arg Mode (Simple Evaluation)
fli.exe model.fcs "expression"
This is the easiest way to evaluate a single expression.
Example
fli.exe model.fcs "area"
fli.exe bridge.fcs "mainSpan"
Characteristics
- non-interactive
- returns plain text
- easy to use in scripts and quick checks
Best use cases
- simple value checks
- quick validation of one member
- shell-friendly automation when JSON is unnecessary
4. 3-Arg Mode (Evaluation with Updater → Proxy JSON)
fli.exe model.fcs "expression" "{param=value}"
This mode evaluates an expression using an updater override and returns a proxy JSON object.
Example
fli.exe model.fcs "area" "{width=12,height=8}"
Return shape
{"Content":...,"Exception":...}
Best use cases
- test parametric behavior without editing the source file
- compare outputs under alternate parameter sets
- automation that wants a structured success/error envelope
Practical tip: prefer this mode over manual file edits when exploring "what if" scenarios.
5. Interactive Console
fli.exe model.fcs
This launches the classic interactive console.
Important limitation
It requires a real TTY and fails in non-interactive shells.
That makes it less reliable for automation, CI, and many agent environments.
Common commands
?— helplsor space — list members.— evaluate allcd member— move into a member..— move upreload— reload files
When to use it
Use this mode when you are working directly in a local terminal and want a human-driven interactive experience.
When not to use it
Avoid it in wrappers, background processes, or non-interactive environments. Prefer --i-json instead.
6. Output Generation
FLI can generate outputs from expressions.
fli.exe model.fcs "expr" --t 3JS --o scene.json # HiScene JSON (3D)
fli.exe model.fcs "expr" --t PNG --o image.png # Image
fli.exe model.fcs "expr" --t HTML --o report.html # Report
fli.exe --dump-scene model.fcs --o scene.json # Scene dump
Common output scenarios
- generate a scene for visualization
- produce a PNG from a renderable expression
- create HTML reports
- dump a scene for downstream tooling
Practical tip
Use an explicit output filename with --o so downstream tools know exactly where to find the generated artifact.
Common Flags
--td Warning
Show diagnostics at warning level.
fli.exe --td Warning model.fcs "area"
Use this when you want visibility into warnings without switching to a noisier diagnostic level.
--fcs <path>
Use an absolute path.
fli.exe --fcs "D:\Models\sample.fcs" "area"
Gotcha
Relative paths can trigger a path-doubling bug. Prefer absolute paths consistently.
--i-json
Enables JSON REPL mode.
fli.exe --i-json model.fcs
Example Workflows
Workflow: discover then evaluate
fli.exe --list-members model.fcs
fli.exe model.fcs "mainSpan"
fli.exe model.fcs "roofArea"
Workflow: iterate with reload
fli.exe --i-json model.fcs
Then:
{"ls":""}
{"expr":"mainSpan"}
{"reload":true}
{"expr":"mainSpan"}
Workflow: test overrides safely
fli.exe model.fcs "roofHeight" "{span=18,pitch=30}"
Workflow: generate a scene artifact
fli.exe model.fcs "building" --t 3JS --o scene.json
AI-Agent Practical Guidance
If you are scripting FLI or driving it from an agent:
- prefer
--i-jsonfor repeated inspections - use
--list-membersfor initial discovery - use 2-arg mode for single-value checks
- use 3-arg mode for parameter overrides
- avoid the classic interactive console unless a real TTY is guaranteed
- filter non-JSON banner/warning lines in JSON REPL mode
- pass absolute paths whenever possible
Common Gotchas
- Non-JSON first line in
--i-jsoncan break naive parsers. - Relative
--fcspath may trigger path-doubling behavior. - Interactive console requires TTY and may fail in automation.
- Using non-persistent modes repeatedly can be much slower than keeping one JSON REPL alive.
Quick Reference
# Best iterative mode
fli.exe --i-json model.fcs
# List members
fli.exe --list-members model.fcs
# Evaluate one expression
fli.exe model.fcs "expr"
# Evaluate with updater
fli.exe model.fcs "expr" "{param=value}"
# Generate output
fli.exe model.fcs "expr" --t 3JS --o scene.json
fli.exe model.fcs "expr" --t PNG --o image.png
fli.exe model.fcs "expr" --t HTML --o report.html
# Dump scene
fli.exe --dump-scene model.fcs --o scene.json
Final Recommendation
For most onboarding, debugging, and agent-assisted work, start with:
--list-membersto discover the model surface--i-jsonto inspect and iterate quickly- 3-arg mode when you need controlled parameter overrides