Repository navigation
Command Line Setup
Use the command line when you want a model other than DeepSeek, run on Linux, attach to a dedicated server or script the setup. On Windows the tools are in the release package; on Linux, build them from source (Building and Releasing).
The command-line output is currently in Chinese. Every command accepts
--help.
fai setupfai setup finds Factorio, installs and enables the factorio_ai_bridge mod, creates server/config.toml and an
RCON password file server/rcon.pw, and prints an MCP config you can paste into a client.
| Option | Effect |
|---|---|
-y, --yes
|
Non-interactive: accept every detected default |
--factorio-dir <dir>, --mods-dir <dir>
|
Point at the game or mods folder when detection fails |
--copy |
Copy the mod instead of linking it |
--config <path>, --force-config
|
Write the config elsewhere, or overwrite an existing one |
--host, --port
|
RCON address written to the config (default 127.0.0.1:27015) |
--mode |
Default build mode: ghost, character, character_free or instant
|
--transport |
fai-command (default, keeps achievements) or silent-command
|
--enable-client-rcon |
Turn on local RCON in the game client's config.ini (a backup is made) |
--write-mcp claude-desktop or cursor
|
Merge the MCP server into that client's config file |
Example that does everything without questions:
fai setup -y --enable-client-rcon --write-mcp claude-desktop- Playing yourself: with client RCON enabled, open Multiplayer → Host saved game in Factorio. RCON only listens while you host a save.
-
Dedicated server:
scripts/start_factorio_rcon.sh <save.zip> [rcon port=27015] [game port=34197]on Linux and macOS, orscripts\start_factorio_rcon.batwith the same arguments on Windows. If the script cannot find the game, setFACTORIO_BIN(the game executable,.sh) orFACTORIO_DIR(the install folder,.bat). The password comes fromserver/rcon.pworFAI_RCON_PASSWORD_FILEand is created if missing. RCON listens on127.0.0.1only; players join on the game UDP port. The scripts do not install the mod, so runfai setupon that machine first or copymod/factorio_ai_bridgeinto the server's mods folder.
fai doctor # add --json for machine-readable outputIt checks the solver, the mod source, the installed and enabled mod, the config, the RCON password, the RCON connection, and the mod version running in the game. Each failed check prints the command that fixes it; see Troubleshooting.
fai agentThe agent watches game chat and answers every message that starts with @ai. It also reacts to events such as
power shortages and attacks unless you pass --chat-only.
| Option | Effect |
|---|---|
--provider, --model, --base-url, --api-key
|
Choose the model; see Model Providers |
--max-rounds <n> |
Maximum tool-call rounds per request |
--chat-only |
Only answer chat and finished background tasks |
--no-greeting |
Skip the online message in chat |
--once "<request>" |
Run one request from the terminal and exit |
--repl |
Talk to the agent from the terminal |
-v, --verbose
|
Debug logging |
--config <path> |
Use another config file |
fai-setup, fai-agent, fai-mcp and fai-rcon are standalone executables for the same entry points.
fai-rcon is an RCON self-test.
Next: Model Providers · Using MCP Clients · Configuration.
Repository · Releases · Issues · MIT licence · Factorio is a trademark of Wube Software Ltd. This project is not affiliated with Wube Software.
Getting started
Playing
Developing
中文