Repository navigation
Daemonized headless formatter
Run The Formatter
Basic shape:
java -jar formatter-cli/target/formatter-cli-full.jar \
--format \
--optimize-imports \
--rearrange \
--editorconfig /absolute/path/to/.editorconfig \
/absolute/path/to/File.javaDaemon Mode
By default, the formatter runs in daemon mode. On the first call, a background IntelliJ JVM is started and kept alive. Subsequent calls connect to it directly, skipping the 3–5 second startup cost.
First call (~5s): engine extracted, daemon started, file formatted
Second call (<1s): connects to running daemon, file formatted instantly
The daemon port is stored in $TMPDIR/intellij-formatter-daemon-*.port.
Daemon logs go to $TMPDIR/intellij-formatter-daemon-*.log.
Stop the daemon
java -jar formatter-cli/target/formatter-cli-full.jar --stop-daemon