The ibf command

Every command, from its own parser. ibf <command> --help prints the same.

ibf setup

install the framework into a game folder (what setup-game.ps1 does)

Argument
folder the game folder: made if missing, the game's files taken from Steam or --source
--source SOURCE a folder that already holds the game's files (a depot or an install)
--payload PAYLOAD the game-side files to install (default: this package's)
--retake drop the game's own files and take them again (ibf\ kept)
--force install on an unknown build of the game (signatures only)
--harness also the scripting harness: command pipe, dev mode
--reset-config replace ibf\ibf.toml with the default one
--no-deploy the game's files and the patch only
--no-smoke-test do not start the game at the end
--steam-minutes STEAM_MINUTES how long to wait for the Steam download (default: 20.0)
--uninstall put the game back as it was (ibf\ is kept)
--purge with --uninstall: remove ibf\ (logs, config) too

ibf launch

start the game in its folder and wait for the framework

Argument
--game-dir GAME_DIR the game folder (default: IBF_GAME_DIR, then ibf setup's)
--wait S wait this long for the framework (default: 60.0)
--no-wait start it and return

ibf doctor

check the install and the running game, with a fix for each problem

Argument
--game-dir GAME_DIR the game folder (default: IBF_GAME_DIR, then ibf setup's)
--instance PID the host's process ID
--in-game drive the running game through design 14.4's checklist
--json also print the checks as JSON

ibf new

start a bot from a template

Argument
name the bot's name: a letter, then letters, digits or _
--lang LANG (one of: python, cpp) (default: python)
--dir DIR where to write it (default: here)
--force overwrite files that exist

ibf state

print the live snapshot

Argument
--instance PID the host's process ID (default: newest)
--wait S wait this long for a host to appear
--url URL tcp://host:port for a host over TCP (default: IBF_URL, then this machine's shared memory)
--token TOKEN the host's TCP token (default: IBF_TOKEN)
--json the snapshot as JSON (the same as the console's state.dump -)
--watch keep printing, every --interval seconds
--interval S (default: 0.5)
--timeout S wait this long for the first snapshot (default: 2.0)

ibf logs

print the host's log

Argument
--instance PID the host's process ID (default: newest)
--wait S wait this long for a host to appear
--url URL tcp://host:port for a host over TCP (default: IBF_URL, then this machine's shared memory)
--token TOKEN the host's TCP token (default: IBF_TOKEN)
-f, --follow keep printing new records
-n, --lines N only the last N held (default: all)
--source SOURCE only sources starting with this, e.g. host.bridge or bot: (default: )
--level LEVEL only this level and above (one of: trace, debug, info, warn, error) (default: trace)

ibf bench

measure the SDK's per-tick overhead and the wake-up latency

Argument
--instance PID the host's process ID (default: newest)
--wait S wait this long for a host to appear
--url URL tcp://host:port for a host over TCP (default: IBF_URL, then this machine's shared memory)
--token TOKEN the host's TCP token (default: IBF_TOKEN)
--seconds SECONDS (default: 10.0)
--spin-us SPIN_US the spin window, as a bot's default (1000); 0 sleeps (see ibf.Client)

ibf cmd

run a console command on the host, e.g. ibf cmd pad.list

Argument
--instance PID the host's process ID (default: newest)
--wait S wait this long for a host to appear
--url URL tcp://host:port for a host over TCP (default: IBF_URL, then this machine's shared memory)
--token TOKEN the host's TCP token (default: IBF_TOKEN)
line ... the command and its arguments
--timeout S (default: 30.0)

ibf run

play a bot: the Bot subclass a .py file defines, or a native bot's .exe

Argument
--instance PID the host's process ID (default: newest)
--wait S wait this long for a host to appear
--url URL tcp://host:port for a host over TCP (default: IBF_URL, then this machine's shared memory)
--token TOKEN the host's TCP token (default: IBF_TOKEN)
bot the bot: a .py file, a native bot's .exe, or an example's name (hunter)
--pad PAD the bot pad to play, 0-3, or none to watch (default 0)
--force take the pad from the client that has it
--class CLASS_NAME which Bot subclass, when the file has several
--name NAME the name it shows in the game (default: its class's)
--watch restart the bot whenever its file changes
--log-level LOG_LEVEL (one of: debug, info, warn, error) (default: info)

ibf match

play matches between bots through the Navigator, and write the results

Argument
--instance PID the host's process ID (default: newest)
--wait S wait this long for a host to appear
--url URL tcp://host:port for a host over TCP (default: IBF_URL, then this machine's shared memory)
--token TOKEN the host's TCP token (default: IBF_TOKEN)
bots ... bot files (.py or .exe), one per pad from pad 0 (example names work too: idle); tcp:[/
--mode MODE (one of: versus, arcade) (default: versus)
--players PLAYERS versus: 1 (one versus one) or 2 (two versus two); arcade: 1 or 2 players (one of: 1, 2) (default: 1)
--map MAP the map select's number (default 0)
--matches MATCHES matches to play (each first to three rounds in versus) (default: 1)
--timeout S give up on a match after this long (default: 600.0)
--max-seconds S arcade: end a run after this long in play; it counts, with its score then (default: until game over)
--remote-wait S how long the tcp: bots have to connect and take their pads (default 60)
--watch-token TOKEN let a spectator watch over TCP with this token while the matches play (again for more) (default: [])
--max-late SHARE a bot late for more than this share of the game's polls is marked too_slow (default 0.5)
--out OUT where the results JSON goes (default results)
--quit back to the main menu at the end
--lockstep the game waits for every bot's answer to each tick (design 4.5)
--lockstep-timeout MS lockstep's wait per tick (default: 1000)
--lockstep-miss LOCKSTEP_MISS a bot that misses a tick: neutral until it catches up, or hold its last input for that tick (one of: neutral, hold) (default: neutral)
--record record each match to an .ibfrec next to the results

ibf replay

play a recording to a bot, and compare its answers with the recorded ones

Argument
recording the .ibfrec file
bot the bot's .py file (example names work too)
--pad PAD the recorded pad the bot plays and is compared with (default 0)
--class CLASS_NAME which Bot subclass, when the file has several
--speed SPEED 1 plays 60 ticks a second; 0 (default) as fast as it answers
--from-tick N
--to-tick N
--round K only round K (from the recording's marks)
--report REPORT write the JSON report here (default: next to the recording)
--min-same SHARE exit 1 below this share of same answers
--fakehost FAKEHOST ibf_fakehost.exe (default: IBF_FAKEHOST, then the package's)

ibf instances

list the running hosts