Skip to content

FlintCLI

FlintCLI is a command-line tool that connects to Minecraft servers to execute Flint tests. It uses /tick freeze and /tick step commands for deterministic, tick-accurate testing.

  • Server connection - Connects as a bot to any Minecraft server (1.21.5+)
  • Deterministic execution - Freezes game time for reproducible results
  • Multiple output formats - Pretty, JSON, TAP, JUnit XML
  • Interactive mode - Run tests via in-game chat commands
  • Test recording - Record tests by playing in-game
  • Debugging - Breakpoints and step-through execution
  • Rust nightly toolchain
  • Minecraft server 1.21.5+ (vanilla, Paper, Spigot, etc.)
  • Server with online-mode=false or bot whitelisted
Terminal window
git clone https://github.com/FlintTestMC/FlintCLI
cd FlintCLI
rustup override set nightly
cargo build --release

The binary will be at target/release/flintmc.

The bot needs operator permissions:

/op flintmc_testbot

Run a single test:

Terminal window
flintmc example_tests/basic_placement.json -s localhost:25565

Run all tests in a directory:

Terminal window
flintmc example_tests/ -s localhost:25565

Run tests recursively:

Terminal window
flintmc example_tests/ -s localhost:25565 -r

Filter by tags:

Terminal window
flintmc -s localhost:25565 -t redstone -t pistons
Terminal window
# Human-readable (default)
flintmc tests/ -s localhost:25565
# JSON output
flintmc tests/ -s localhost:25565 --format json
# TAP format (CI/CD compatible)
flintmc tests/ -s localhost:25565 --format tap
# JUnit XML (Jenkins/GitHub Actions)
flintmc tests/ -s localhost:25565 --format junit > results.xml
Terminal window
# Verbose output (per-action details)
flintmc tests/ -s localhost:25565 -v
# List tests without running
flintmc tests/ --list
# Dry run (show execution plan)
flintmc tests/ --dry-run
# Pause after setup for inspection
flintmc tests/ -s localhost:25565 --break-after-setup
FlagShortDescription
--server <SERVER>-sServer address (required)
--recursive-rSearch directories recursively
--interactive-iInteractive mode
--verbose-vShow detailed output
--quiet-qSuppress progress bar
--tag <TAG>-tFilter by tag (repeatable)
--action-delay <MS>-dDelay between actions (default: 100ms)
--break-after-setupPause after test setup
--fail-fastStop after first failure
--listList tests and exit
--dry-runShow plan without connecting
--format <FORMAT>Output: pretty, json, tap, junit

Start interactive mode to control tests via in-game chat:

Terminal window
flintmc -s localhost:25565 -i

All commands are prefixed with !:

CommandDescription
!helpList available commands
!listList loaded tests
!search <pattern>Search tests by name
!run <name>Run a specific test
!run-allRun all tests
!run-tags <tag1,tag2>Run tests by tags
!reloadReload tests from disk
!record <name>Start recording a test
!stopExit interactive mode

“Bot not initialized” Check that the server is running and accessible.

“Bot needs op permissions” Run /op flintmc_testbot on the server.

Assertion failures Try increasing the tick delay with -d 200 or verify block names are correct.

Connection timeout Verify firewall settings and whitelist configuration.