Commands and usage
Heya runs in two modes and takes a few flags. Inside an interactive session, slash commands control the model, your saved sessions, and what is loaded.
Run it
heya # an interactive session
heya "fix the failing test" # run one task and exit
heya init # set up a model, local or cloud
Attach a file or an image by writing @ and the path. With a vision model, Heya
reads a screenshot directly:
heya "what is failing here? @debug.log @error.png"
Flags
--continueresume the most recent session.--resume [id]resume a session by id, or the latest if you leave the id off.--profile <name>use a specific model profile from your config.--allow <dir>add a folder Heya may read and write in. Repeatable.--auto-approverun write and command tools without asking first. Use with care.--no-self-reviewskip the scoped self-review pass.--max-iters <n>cap the tool loop per task.--jsonone-shot only: print a single JSON object to stdout and nothing else.--versionprint the version.
JSON output
Pass --json with a task and Heya prints one JSON object to stdout on exit:
heya --json "triage this: ..." | jq .result
The object has five fields: result (the agent's answer, or null on error),
tokens ({"session": N, "weak": N}), cost (dollars, float), tools (list
of tool events that ran), and error (a string if something went wrong, else
null). Stdout carries only that object: no banner, no trace, no streamed
tokens. The exit code is non-zero on error. --json without a task is an error.
heya update
Upgrade Heya in place. It detects how Heya was installed and runs the right
upgrade: pipx upgrade heya-agent for a pipx install, or pip otherwise. A
development checkout is left alone with a note to use git. Start Heya again
afterward to use the new version.
When a newer version is on PyPI, Heya also shows a one-line notice at startup
(see the [update] config to turn it off).
Slash commands
Type these inside an interactive session. Type / and Heya completes the command
names (with a short description each); a typo like /mdl still finds /model.
Type @ to complete a file path.
/helplist the commands./modelopen the model picker: your profiles plus the live model list from the current provider. Arrow keys move, typing filters, Enter switches, Esc keeps things as they are./model <name>switches to another profile directly;/model <model-id>(for exampleclaude-sonnet-4-6) swaps just the model on the current provider, no config edit. Tab after/modelcompletes profile names and model ids./sessionslist your saved sessions./resumepick a saved session from a list (arrow keys, type to filter);/resume <id>loads one directly./save [title]save now, with an optional title./newstart a fresh session./clearreset the conversation but keep the current session./compactcompact the conversation context now./costshow the token usage so far, and the dollar cost when prices are available./skillslist the skills Heya loaded./agentslist the sub-agent roles./mcplist the tools from connected MCP servers./quitexit. Ctrl-D works too.