You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli.md
+82-16Lines changed: 82 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,29 +28,66 @@ This means CLI flags override config file values, which override environment var
28
28
29
29
```bash
30
30
export BALATROLLM_CONFIG="config/example.yaml"
31
-
balatrollm --model openai/gpt-5
31
+
balatrollm
32
32
```
33
33
34
34
This is the **only** `BALATROLLM_*` environment variable that does not have a corresponding CLI flag — the user can simply provide the config file path as a positional argument instead.
35
35
36
36
**Precedence:** If both the `CONFIG` argument and `BALATROLLM_CONFIG` are provided, the CLI argument takes precedence and `BALATROLLM_CONFIG` is ignored.
37
37
38
+
## Configuration file (YAML)
39
+
40
+
The YAML configuration file uses the same field names as the CLI flags (minus the `--`), for example:
41
+
42
+
- CLI `--model` → YAML `model`
43
+
- CLI `--base-url` → YAML `base_url`
44
+
45
+
For a full annotated example, see [`config/example.yaml`](https://github.com/coder/balatrollm/blob/main/config/example.yaml).
46
+
47
+
### `model` (required)
48
+
49
+
`model` is required, but it can come from **any** config source (YAML config, env var, or CLI flag). If you set `model:` in your YAML file, you do not need to also pass `--model`.
50
+
51
+
```yaml
52
+
model:
53
+
- openai/gpt-4o
54
+
```
55
+
56
+
### `model_config` (advanced)
57
+
58
+
The YAML file also supports an optional `model_config` mapping for advanced provider/model request knobs. BalatroLLM deep-merges your `model_config` into built-in defaults (including nested fields like `extra_headers` and `extra_body`) and then passes the result directly to the OpenAI-compatible chat completions request.
59
+
60
+
Common examples include `temperature`, `max_tokens`, `seed`, `parallel_tool_calls`, `tool_choice`, plus provider-specific settings via `extra_body` (e.g., OpenRouter).
| `--dry-run` | - | `False` | Show tasks without executing |
87
+
88
+
!!! note "How Balatro instances are started"
89
+
90
+
`balatrollm`starts/stops Balatro instances automatically via `balatrobot`. With `--parallel N`, it spawns instances on ports `--port` through `--port + N - 1` (`port..port+parallel-1`).
54
91
55
92
!!! note "Multiple Values"
56
93
@@ -74,7 +111,7 @@ balatrollm config/example.yaml
74
111
75
112
# Run with configuration file via environment variable
76
113
export BALATROLLM_CONFIG="config/example.yaml"
77
-
balatrollm --model openai/gpt-5
114
+
balatrollm
78
115
79
116
# Run with config file and override specific options
- `task.json` / `strategy.json`: resolved task metadata and the strategy manifest used for the run.
170
+
- `requests.jsonl` / `responses.jsonl`: LLM requests and responses (JSONL, one object per line).
171
+
- `gamestates.jsonl`: game state snapshots after each action.
172
+
- `stats.json`: aggregated statistics for the run.
173
+
- `screenshots/`: screenshots captured during the run.
174
+
- `run.log`: logs captured during the run.
175
+
- `runs/latest.json`: updated each run; used by the `--views` overlays to locate the latest `task.json` and `responses.jsonl`.
176
+
111
177
## BalatroBot Configuration
112
178
113
179
BalatroBot instances spawned by BalatroLLM can be configured through `BALATROBOT_*` environment variables. These settings control how Balatro runs during automated gameplay.
|`SMODS_BOOSTER_OPENED`| Pack opening phase |`pack` (select cards or skip) |
199
199
200
+
!!! note "BLIND_SELECT and ROUND_EVAL Behavior"
201
+
202
+
The current `balatrollm` bot loop does not delegate `BLIND_SELECT` or `ROUND_EVAL` to the LLM (see `src/balatrollm/bot.py`).
203
+
204
+
- `ROUND_EVAL` always calls `cash_out`
205
+
- `BLIND_SELECT` always calls `select` (never `skip`) because Tags are not supported yet by `balatrobot`; skipping blinds would collect Tags the bot can't use
206
+
207
+
This "always play the blind" policy is a reasonable baseline for `RED` deck on `WHITE` stake.
208
+
200
209
### Common Tools
201
210
202
211
**SELECTING_HAND phase:**
@@ -219,7 +228,7 @@ Tools are organized by game state. The `TOOLS.json` file maps each state to its
219
228
**BLIND_SELECT phase:**
220
229
221
230
-`select`: Select a blind to play
222
-
-`skip`: Skip the current blind (if allowed)
231
+
-`skip`: Skip the current blind (if allowed). *(Currently not used by `balatrollm`; Tag handling isn’t supported yet.)*
223
232
224
233
## Strategy Validation
225
234
@@ -281,7 +290,7 @@ Common issues:
281
290
1. Fork the BalatroLLM repository
282
291
2. Create a feature branch: `git checkout -b feat/add-strategy-your_strategy_name`
283
292
3. Add your strategy directory with all required files
284
-
4. Commit following conventional commits: `feat: add [strategy_name] strategy`
293
+
4. Commit following conventional commits: `feat(strategy): add [strategy_name] strategy`
0 commit comments