Ask in plain words
Describe what you need and get a command you can read before it runs. This one includes hidden folders and lists the biggest first.
Type what you need. Press your shortcut.
Review the command. Hit Enter when ready.
Works with Claude Code, Codex CLI or Gemini CLI
hey-shell never runs the suggested command. What the agent itself can do while answering depends on which one you pick.
Describe what you need in plain language at your shell prompt.
Ctrl+G by default. Choose your key during installation.
The risk and a failure check show under the command. Read or edit it, then press Enter. Nothing runs automatically.
Seven everyday requests, with what hey-shell actually returned.
Describe what you need and get a command you can read before it runs. This one includes hidden folders and lists the biggest first.
Risky commands are rated MEDIUM or HIGH, with the reason, so you see the risk before you press Enter.
Not quite right? Add a # note after the command and press your shortcut again. The command changes instead of starting over.
Run hsf right after a command fails. You get a corrected version on your next prompt, with what was wrong. Nothing is re-run.
*.log was expanded by the shell into matching filenames before find ran, so find received extra arguments and exited with status 1. Quoting the pattern passes the literal *.log to find, which does the matching itself.-delete permanently removes matching files older than 7 days under the current directory, and there is no undo.Ask with hse to get the command with a short explanation of what it does and what to watch out for. The command is then left on your next prompt.
Got a command from somewhere? hsc looks for known reasons it would fail: syntax errors, missing programs, no git repo, no tmux server. It never runs the command. Here, from a shell with no tmux running.
Found a command in a README, a forum or an AI chat? hsw explains what it does before you run it. It never runs it itself.
Real output with the default agent (Claude Code, Haiku model). bash, zsh and fish work the same way, and so do Codex CLI and Gemini CLI; answers vary by agent and model. Nothing runs until you press Enter.
None of this is needed for the main flow. It is there when a command is not quite right, or fails.
Not quite right? Add # only .ts files after the command and press your shortcut again. It changes the command instead of starting over.
Run hsf right after a command fails. You get a corrected version on your next prompt, with what was wrong. Nothing is re-run.
hse <request> adds a short explanation, and hsw "<command>" explains a command you found somewhere, before you run it.
The agent is told which tools you have (rg, fd, jq…) and what the project is (pnpm, Makefile targets, compose). Names only, never file contents.
Deletes, force-pushes, overwrites, cloud deletes and download-and-run (curl … | /bin/bash) are flagged in amber or red. Anything else shows Risk: none recognized: no known pattern matched, which is not the same as safe.
Missing programs, syntax errors and wrong context (no git repo, no tmux server) show as Check: LIKELY FAIL. It never runs the command.
Your request goes to the agent you picked, with your OS, shell and folder (as ~/project, without your user name). Also tool names, project type and git branch, which HEY_SHELL_CONTEXT=0 turns off. No file contents. Nothing is logged on your machine unless you turn history on.
The same shortcut and commands in all three, with commands written for your shell: set -gx in fish, export in bash and zsh.
hey-shell asks the AI agent CLI you already use and are logged in to, and never runs what comes back. Agents can use their own tools while they answer, so here is exactly what hey-shell restricts for each:
Text only. No tools, no MCP servers, no saved session.
No writes. A read-only sandbox your Codex config cannot loosen. It may read files in the folder while answering.
Not restricted by hey-shell. Gemini CLI has no documented way to turn its tools off, so this relies on its own defaults.
Your terminal. Your shortcut.
~/hey-shell/install.sh --key alt+o
One line. It downloads the newest release and asks for your key and short aliases. Then open a new terminal.
Add bash -s -- --agent codex (or gemini) to use those instead of Claude Code.
The script is about 60 lines, or install by hand: git clone https://github.com/alparslanpolat/hey-shell ~/hey-shell && ~/hey-shell/install.sh
hse how to free up disk space for the command with an explanation, or hsc "<command>" to check one before you run it.
Generated commands are only placed on your prompt, never executed. Always read them before pressing Enter.