gorged flags¶
gorged reads its flags with Go's standard flag package (server/gorged, serveFlags). It has no
config file and no environment variables of its own. gorged -h prints the same list with the bot-policy
options added. Single and double dashes both work (-addr or --addr), and a boolean is switched off with
-name=false.
Defaults worth knowing:
-addrdefaults to:8080, every interface, and that stays the default. Examples here use127.0.0.1:8090to keep a trial server on loopback; pick any free port (8090-8099).-dirdefaults togorged-data. Give each server its own directory, such as/tmp/gorge-try. Two servers sharing one corrupt each other (Troubleshooting).-prewarmis on, so a fresh server fetches card art for every dealt deck at start. Pass-prewarm=falseoffline.
The table below is generated from the flag set of the cmd/gorged binary. TestFlagsDocIsCurrent fails when it
differs, so it cannot fall behind. A binary that links a trained-network bot adds a -<policy>-net family of flags
for it. make deploy-demo serves the demo (deploy/demo.env.example). The guides explain the flags in use: Play in the browser,
Draft events, Serving dirac.
scripts/deploy-demo.sh can serve a binary other than cmd/gorged. Set SERVER_MAIN in deploy/demo.env to a directory holding a main.go that wraps gorged.Main; the script builds it against this checkout and serves it, passing SERVER_EXTRA_ARGS on every server's command line and filling card art for SERVER_EXTRA_DECKS first. scripts/deploy-demo.sh --dry-run prints the resolved configuration, the build commands and each server's command line without building or starting anything.
| Flag | Default | Meaning |
|---|---|---|
-addr |
:8080 |
listen address |
-allow-decklist-bots |
false |
let the server's own bot-only tables run a bot policy that reads every seat's real decklist; such a policy never seats against a human |
-art-dir |
none | durable card-art cache directory (default |
-auto-mana |
true |
enable automatic mana payment plans and controls for human seats (disable with -auto-mana=false for the legacy manual path) |
-bot-auto-mana |
true |
have hosted bots and human-seat caretakers cast through offered automatic mana payment plans |
-bot-common-sense |
false |
wrap hosted bots and human-seat caretakers in the bots/sanity CommonSense guard (drop hostile self-removal from the option list, answer the London mulligan by the constructed policy); opt-in, default off |
-bot-config |
none | read a bot policy's options from a JSON object file: |
-bot-opt |
none | set a bot policy option: |
-bot-policies |
none | comma-separated set of bot policies this server OFFERS (the /api/bot-policies listing and accepted POST /api/games names); empty offers every registered entry that does not read opponents' decklists (a decklist-reading policy can never be offered: vs-bot always seats a human) |
-bot-policy |
lethal-pressure |
default hosted bot policy for a vs-bot request that omits bot_policy; must be registered, offered, and support both formats (registered: az-redeal, az-redeal-maxn, bot, cast-profile, forge-heuristic, forge-heuristic-hold, lethal-pressure, sb-first, sb-heuristic, sb-search-lite-atk, sb-tactical, sb-uniform, search) |
-bot-search-parallelism |
1 |
goroutines within one searched decision (latency only, never an answer; >= 1) |
-bot-search-slots |
max(1, GOMAXPROCS/2) |
maximum concurrent searched bot decisions across the process; decisions queue, never degrade (>= 1; default max(1, GOMAXPROCS/2)) |
-cards |
.cards |
corpus directory (ir.gob.gz / cardsfolder) |
-commander-ratings |
none | card value file for Commander-draft events ({"Card": {" |
-commander-ratings-field |
blended |
which field of -commander-ratings to rate by |
-commander-seats |
0 |
seats per commander table; 0 = -seats |
-cooldown |
5s |
pause between matches on a perpetual table |
-decks directory |
testkit/testutil/decks |
directory of deck JSON files; with -engine dirac the default is the first -dirac-sets set's bench decks |
-dir |
gorged-data |
persistence directory |
-dirac-sets |
fdn |
with -engine dirac: comma-separated card sets, tried in order for each game (built by make dirac-tables) |
-engine |
gorge |
the engine this server's tables and vs-bot games run on; one this binary does not link fails at startup, naming those it does |
-events |
false |
host 4-seat draft events under /api/events (eventhost; persistence under |
-events-bot-policy |
none | default game policy of draft-event bot seats that name none; empty uses -bot-policy. Must be registered and offered to events (not a decklist reader), so it may be constructed-only |
-feedback |
feedback |
directory player bug reports are written to (kept OUT of -dir, which deploys wipe) |
-format |
constructed |
comma-separated table formats (constructed, commander); table i uses formats[i-1 mod n], e.g. -format commander,constructed runs one of each |
-humans |
none | comma-separated slots of table t1 that are real people (e.g. 0,2); t2..tN stay bot tables |
-manabrew |
false |
mount the ManaBrew protocol adapter (server/host/manabrewhttp) on the main listener; requires -humans or -vsbot |
-manabrew-addr |
none | serve the ManaBrew routes on a separate listen address instead of the main one (implies -manabrew) |
-manabrew-think |
0s |
override the human-seat think timeout while -manabrew is on (0 = inherit the server default) |
-max-events |
4 |
maximum draft events not yet COMPLETE |
-max-on-demand-tables |
32 |
maximum retained private play-vs-bot tables per process (0 = unlimited) |
-max-search-tables |
8 |
maximum live on-demand tables whose policy is a search entry (0 = unlimited) |
-mulligans |
7 |
London mulligans per player before turn 1; 0 disables the pre-game round |
-pace |
50ms |
sleep after every decision; 0 = as fast as possible |
-paired-bot |
none | let a human player ask a bot to evaluate the decision in front of them: az-closed, or the name of a closed-list search policy. It only advises, and it never sees hidden cards or an opponent's deck list. Off when empty or off |
-paired-bot-decks |
none | with -paired-bot az-closed: directory of the decks the bot guesses an opponent's list from (default -decks) |
-paired-bot-searches |
2 |
with -paired-bot: maximum paired-bot searches at once across the server; further requests wait (>= 1) |
-paired-bot-shared |
false |
with -paired-bot: also offer it at a table with more than one human (t1 under -humans), where every seat is told it is on |
-paired-bot-sims |
100 |
with -paired-bot az-closed: simulations per request |
-perpetual |
true |
start a new match when one ends |
-pod-bot-decks |
none | enable the az-closed-maxn bot policy: the directory of deck JSON files (e.g. draftsim -decks-out) it guesses an opponent's list from. A closed-list max^n search for Commander pods of up to four seats, offered to tables, draft events (-events-bot-policy) and as a paired bot; it never reads an opponent's real list. Off when empty |
-pod-bot-sims |
64 |
with -pod-bot-decks: simulations per searched decision of az-closed-maxn (>= 1) |
-pprof |
false |
serve Go runtime profiles at /debug/pprof/ on the main listener; refused unless -addr is loopback, and anything proxied to that port can reach them |
-prewarm |
true |
prewarm the card-art cache for every card in every dealt deck at startup (disable with -prewarm=false) |
-prewarm-art-budget |
0s |
with -prewarm-art-only: stop the fill after this much wall-clock time and exit non-zero (0 = no limit) |
-prewarm-art-max-consecutive-failures |
0 |
with -prewarm-art-only: stop the fill once this many names in a row have failed and exit non-zero (0 = no limit) |
-prewarm-art-only |
false |
fill the card-art cache from -decks (into -art-dir) and exit; no server is started. Exits non-zero if any name failed |
-sb-agent |
none | register a SpellBench v2 stdio agent as a bot policy: name=/path/to/agent (repeatable; name matches ^[a-z0-9-]+$) |
-sbv2 |
false |
mount the SpellBench v2 human-seat HTTP routes (server/host/sbv2http) on the main listener; requires -humans or -vsbot |
-seat-token |
none | fixed bearer token for the first human slot (tests and local use only; default mints a random token per slot) |
-seats |
4 |
seats per table |
-seed |
1 |
seed of table 1; table i uses seed+i-1 |
-spectator |
public |
spectator visibility: public (default, every hand hidden) or omniscient (every hand visible) |
-tables |
4 |
number of tables |
-vsbot |
false |
arm the on-demand play-vs-bot flow (landing page seats a human against a bot via POST /api/games) |
-vsbot-spectator |
public |
spectator visibility of on-demand play-vs-bot tables: public or omniscient |