Reference

Configuration

Environment variables, exit codes, and JSON output — everything you need to wire anybranch into a script, CI job, or agent.

Environment variables

VariableMeaning
ANYBRANCH_SERVERServer base URL the client submits jobs to. Required — the client fails without it.
ANYBRANCH_TOKENAdmin token, sent as Authorization: Bearer.
ANYBRANCH_HOMEServer storage directory (default ~/.anybranch). Put it on a reflink-capable volume.
ANYBRANCH_IDLE_MINUTESIdle timeout before a branch suspends (default 5; 0 never suspends).

Exit codes

CodeMeaning
0Success.
1Something failed while running — network, engine, timeout.
2The command was wrong, or preflight did not pass.

JSON and scripting