Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/bin/
/dist/
/build/
/stuff/

# Go test and profiling output
*.test
Expand Down
2 changes: 2 additions & 0 deletions AGENTS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ Update documentation when changing:
* supported platforms;
* security or privacy behavior;
* package contents.
* ONLY update the README.md when the issue states it OR when an already there documented thing changes. Keep the README.md small and focused on the user experience. Use AGENTS.md for technical details.
* The full documentation belongs in the manpage, which is generated from the Markdown source in `docs/sidequest.1.md`. The manpage must be kept in sync with the Markdown source. Do not edit the manpage directly.

Examples in documentation must use the `--` separator.

Expand Down
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You also get noticed when the command finishes. By default, command-pane output
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Gameplay](#gameplay)
- [FAQ / Known Issues](#faq--known-issues)

## Installation

Expand Down Expand Up @@ -43,6 +44,8 @@ packages for manual installation.
sidequest -- ssh deploy@example.com
sidequest -- sh -c 'sudo du -xh /var /usr /home 2>/dev/null | sort -h'
sidequest --no-history -- ssh production.example.com
sidequest --no-color -- make test
sidequest --aug -- make test
sidequest --mode quest -- make test
sidequest -- codex
sidequest -- claude "Run the test suite, fix any failures, and summarize the changes."
Expand All @@ -51,7 +54,7 @@ sidequest -- claude "Run the test suite, fix any failures, and summarize the cha
Try it with a harmless demo workload:

```bash
sidequest -- bash -c 'for i in {1..60}; do printf "working step %02d/60\n" "$i"; sleep 1; done'
sidequest --aug -- bash -c 'for i in {1..60}; do printf "working step %02d/60\n" "$i"; sleep 1; done'
```

## Gameplay
Expand All @@ -61,26 +64,54 @@ sidequest -- bash -c 'for i in {1..60}; do printf "working step %02d/60\n" "$i";
- `F12` switches between Snake and the command pane.
- Snake focus-pauses while the command pane is active and resumes when the game
pane is active again, unless you paused manually.
- In the command pane, `Page Up` and `Page Down` scroll pages; arrow up and
arrow down scroll line by line. Scrolling back to the bottom resumes live
command output.
- `F10` detaches back to your shell. If the command is still running, Sidequest
prints the `sidequest attach <id>` command.
- `R` restarts Snake after a round over while the command keeps running.
- After the command finishes, `C` continues the current round and `Q` finalizes
and quits.
- After the command finishes, `C` continues the current round. Use `F10` to
return to your shell.

Classic mode keeps Snake simple and adds Command Heat: the longer you actively
play, the faster Snake gets and the more food is worth. Time spent in the
command pane or on pause does not raise Heat. After the command has finished,
Heat stays frozen at the reached level while the round can continue.
command pane, on pause, or in the command-finished choice does not raise Heat.
If you press `C` after the command finishes, the same round continues and Heat
resumes increasing only during active gameplay.

Quest mode adds combo scoring, one mission per command, Golden Bytes, random
arena pickups and other stuff.
Quest mode adds combo scoring, one mission per command, Golden Bytes that grow
Snake by two cells, random arena pickups and other stuff.

Use `--aug` to show the latest command output line centered in the game pane
while the original command pane stays unchanged.

Use `--no-color` or a non-empty `NO_COLOR` environment variable for monochrome
Sidequest game/UI rendering. Wrapped command output is left untouched.

For complete controls and behavior details, use:

```bash
man sidequest
```

## FAQ / Known Issues

### Snake graphics look wrong in MobaXterm or older SSH terminals

Some terminals render block characters differently. Sidequest keeps rich block
graphics by default, but can use a safer ASCII fallback:

```bash
SIDEQUEST_GRAPHICS=ascii sidequest -- <command>
```

If Sidequest detects a fallback but your terminal renders rich graphics
correctly, force the default style:

```bash
SIDEQUEST_GRAPHICS=rich sidequest -- <command>
```

## Sessions and History

Runtime sessions:
Expand Down
42 changes: 23 additions & 19 deletions docs/man/sidequest.1
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ sidequest \- play a tiny terminal game while waiting for a command
runs a command in one tmux pane and opens a small terminal game in another.
The game pane is focused first and starts on the first move. When the command
finishes during a playable round, Sidequest pauses Snake and asks whether to
continue the current round or quit. Quitting finalizes the score and shows the
command state, exit code or signal, runtime, final score, and the local TOP 5.
continue the current round. Finished-command screens show the command state,
exit code or signal, runtime, current score, and the local TOP 5.
.PP
Snake uses Command Heat. Heat rises with accumulated active Snake playtime,
speeds up Snake movement, increases the food score multiplier, and is capped at
the maximum Heat level. Time spent before the first move, paused, detached,
after round over, after command completion, or focused in the command pane does
not raise Heat. If the player continues after command completion, the reached
Heat level still controls Snake speed and food value.
after round over, in the command-finished choice, or focused in the command pane
does not raise Heat. If the player continues after command completion, the same
round resumes and Heat increases again only during active gameplay.
.PP
.B F9
hides or restores the Sidequest UI by zooming the command pane inside the
Expand Down Expand Up @@ -85,6 +85,17 @@ bonuses and local game statistics.
Do not capture or persist command-pane output when the Sidequest session is
closed. No stored run metadata or output file is created for that run. The live
tmux pane scrollback remains visible until the session is closed.
.TP
.B \-\-no-color
Disable colors in Sidequest's own game and UI rendering. The wrapped command's
output is not modified. A non-empty
.B NO_COLOR
environment variable enables the same behavior.
.TP
.B \-\-aug
Enable augmented game HUD context. Sidequest shows the latest non-empty command
output line centered in the game pane while leaving the original command pane
unchanged.
.SH COMMANDS
.TP
.B list
Expand Down Expand Up @@ -117,6 +128,11 @@ Switch between the game pane and the command pane. Snake focus-pauses while the
command pane is active and resumes when the game pane is active again, unless it
was manually paused.
.TP
.B Page Up, Page Down, arrow up, arrow down
Scroll the command pane when the command pane is active. In the game pane, arrow
keys continue to control Snake. Scrolling back to the bottom resumes live
command output.
.TP
.B F10
Detach from the Sidequest tmux session and return to the shell. The session stays
listed for later attach. If the command is still running, Sidequest prints the
Expand All @@ -130,23 +146,11 @@ Toggle manual pause. Manual pause is separate from command-pane focus pause.
.TP
.B C
Continue the same Snake round when the wrapped command has finished and the
round is still playable. The command is not run again, and Command Heat remains
frozen at the level reached when the command ended.
round is still playable. The command is not run again. Heat resumes increasing
only during active gameplay after the player continues.
.TP
.B R
Restart Snake after a round over while the command is still running.
.TP
.B Q
Finalize and quit after the wrapped command has reached a terminal state. During
a playable round, the command-finished modal offers
.B C
to continue or
.B Q
to finalize. During a running command, use
.B F9
to hide Sidequest or
.B F10
to detach.
.SH HIGHSCORES
Sidequest keeps at most five scores per mode. Scores are sorted descending and
equal scores keep deterministic insertion order. The result panel marks the
Expand Down
Loading