xscapes site   github  

Manual

Install

macOS or Linux, with or without Go. The script downloads the release binary into ~/.local/bin and, if that folder is not on your PATH, adds one line to your shell's rc file. It is short, so read it first if you like.

curl -fsSL https://donlucasx.github.io/xscapes/install.sh | sh

With Go you can build it yourself. Point GOBIN at a folder on your PATH, because ~/go/bin is on no Mac's PATH by default.

GOBIN=~/.local/bin go install github.com/donlucasx/xscapes@latest

Windows is not supported natively, because the agent runs on a Unix pseudo-terminal. WSL should work like any Linux box, but nobody has tested it yet.

Run it

Install the hooks for your agent once, then start the agent through xscapes from whatever project you are working in. The agent takes the top of the window and the scape fills the rest.

xscapes install claude --apply && xscapes claude    # Claude Code
xscapes install kimi --apply   && xscapes kimi      # Kimi Code CLI
hermes plugins install xscapes --enable && xscapes hermes    # Hermes Agent

Anything else that runs in a terminal can live in the scape too. Without hooks xscapes watches the output instead, so it sees work and prompts but not tool names, questions or subagents.

xscapes inside <any command>

Arguments after -- go to the agent, for example to resume a session:

xscapes claude -- --continue

xscapes claude -print shows how the window will be split and what will run in it, and changes nothing.

Hooks

The hooks are how xscapes hears your agent. install without --apply prints the plan and writes nothing. With --apply it backs up your config first, then adds its lines. uninstall removes exactly what it wrote.

Claude Code~/.claude/settings.json
Kimi Code CLI~/.kimi-code/config.toml
Hermes Agent~/.hermes/config.yaml (or none: use the plugin)

For Hermes Agent, the plugin is the better route: hermes plugins install xscapes --enable. It also passes on questions, password prompts and each model call's token use, which the shell hooks cannot. Use the plugin or the hooks, not both, or every event arrives twice.

xscapes install claude              # show the plan
xscapes install claude --apply      # write it
xscapes uninstall claude --apply    # take it out again

The launcher refuses to start when the hooks are missing or only partly there, and prints the install line instead. Hooks you wrote by hand count. To run without hooks anyway, use xscapes claude -watch=on.

The context moon

For Claude Code, the moon shows how much of the context window is left. It reads that from Claude Code's status line, which install leaves alone because you may already have one. Set your statusLine command in ~/.claude/settings.json to:

xscapes statusline -- <your existing statusline command>

If you have no status line, xscapes statusline on its own works and leaves the bar empty.

Scapes and companions

Three scapes ship: the mountain vista with the owl, which is the default, the shore with the crab, and the harbour with the cat. A running scape switches on its next frame. The crab is the default companion on the shore, and the cat is the other choice.

xscapes scape harbour     # or: vista, shore
xscapes companion cat     # or: crab
xscapes scape             # show the current choice

To try one for a single run without saving it, set XSCAPES_SCAPE=shore or XSCAPES_COMPANION=cat in front of the command.

Sound

xscapes makes three sounds and nothing else: one when the agent needs you, one when it finishes, and a third when it finishes with something still broken. It stays silent while the agent works.

xscapes notify            # hear all three
xscapes notify ask        # or: done, worried
XSCAPES_SILENT=1 xscapes claude   # mute

Layout

-scape 24give the scape 24 rows (the default is eight fifteenths of the window, at most 28)
-fps 8animate at 8 frames a second
-besidethe older layout: the agent in its own tmux pane, the scape in the next one (needs tmux)
-history=falsestop copying the transcript into your terminal's scrollback
-alt=falserun on the main screen; a window resize can then push the agent out of place

Use them after the agent name, for example xscapes claude -scape 24.

Debugging

xscapes -infocolour profile, window size and sound player
xscapes -livethe scape alone in this terminal; Ctrl-C quits
xscapes emit <kind>send one event by hand, for example xscapes emit done
xscapes replay <file>feed a recorded event log to a running scape
XSCAPES_HOOKLOG=1log every raw hook payload to ~/.config/xscapes/hooks.jsonl
XSCAPES_EVENTLOG=1log every event the scape applied to ~/.config/xscapes/events.jsonl

The hook log keeps every payload as it arrived, which includes your prompts, commands and file paths. Delete it when you are done.

Troubleshooting

command not foundOpen a new terminal, or run ~/.local/bin/xscapes. The install script prints the full path for the window you ran it in.
the launcher refuses to startThe hooks are missing or incomplete. Run the install line it prints.
nothing moves while the agent worksCheck the hooks with xscapes install claude, which lists each one. Then try xscapes emit prompt in another window.
no moonWire the status line, see the context moon.
an update did not show upA running scape keeps the binary it started with. Quit the agent and start xscapes claude again.
no soundRun xscapes -info to see which player it found, and check that XSCAPES_SILENT is not set.

Update and remove

To update, run the install line again. It fetches the latest release.

curl -fsSL https://donlucasx.github.io/xscapes/install.sh | sh

To remove xscapes, take the hooks out first, then delete the binary and its settings folder.

xscapes uninstall claude --apply     # and kimi, hermes if you used them
rm ~/.local/bin/xscapes
rm -rf ~/.config/xscapes