alash
Your shell. Your AI. No API keys.
Ask questions, understand failures and generate commands directly from your terminal.
# 1. get the binary (needs Rust's cargo)
cargo install --git https://github.com/hmedkouri/alash
# 2. add this line to ~/.zshrc (bash: alash init bash, in ~/.bashrc)
eval "$(alash init zsh)"
# 3. open a new shell
ask --doctor
ask how do I list listening ports
why
alash needs Claude Code or the Codex CLI installed and logged in.
What it is
ask, why and a command-line key binding for zsh and bash, answered by the AI CLI you
are already logged in to. No API key: alash runs claude or codex for one answer, with
the model's tools switched off.
Alash is "why" in Moroccan Darija.
Use
$ ask how do I list listening ports
$ make |& ask why does this fail
$ ask @codex what does set -o pipefail do
$ tar xf missing.tar
tar: missing.tar: Cannot open: No such file or directory
$ why
$ five biggest files here▌ # press Ctrl-X Ctrl-A
$ find . -type f -printf '%s\t%p\n' | sort -rn | head -5▌
The key binding replaces what you typed with one command and stops. It never runs it.
why sees the command you ran, not what it printed. To include the output, pipe it:
cmd |& ask why does this fail.
What it will not do
- Give the model tools. Each harness is started so the model cannot run a command or write a file. If alash cannot do that for the installed version, it refuses to run it. The arguments and the proofs are in docs/tools-off.md.
- Run what the model returns. The key binding places a reply on the command line only when it is a single line that does not end in a question mark. Anything else is shown as a message. It warns when the first word is not an installed command.
- Capture or log. It sends your question, what you pipe in, the previous command line
for
why, and the typed text for the key binding. It writes nothing to disk.
Limits
- codex keeps your
~/.codex/config.toml, so your model provider and login are used. Its MCP servers are switched off by name for each call; if alash cannot read the list of servers, it refuses to run codex. - A model may still talk as if it had tools. Asked to change something, it can
answer "Done" or print a tool call as text. Nothing was changed: alash never lets it.
Every
askandwhyquestion tells the model it has no tools, which stopped both in testing, but a model can ignore that. - codex still applies a global
~/.codex/AGENTS.md. No option removes it. The doctor warns when the file exists. - codex is still offered a file-patch tool with gpt-5 models. The read-only sandbox rejects it.
- Windows is experimental. A binary is built, but there is no PowerShell integration and it has not been run on Windows.
- Answers are printed when complete, not streamed, and each question is independent: there are no follow-ups yet.