Developer mquan has released llmao, a shell plugin that intercepts 'command not found' errors and redirects the input to AI coding agents. The tool addresses a common workflow friction point: accidentally typing natural language instructions into a terminal instead of a chat interface. By treating unrecognized commands as prompts, llmao allows users to launch agents like Claude Code or Codex directly from the current working directory without switching contexts.
Intelligent Interception and Local Classification
The plugin operates by hooking into the shell's error handling mechanism for zsh, Bash 4+, and Fish 3.6+. When a command fails to resolve, llmao first checks for typos, suggesting corrections like 'git' for 'gti' if the match is unique. If the input is not a typo, the tool classifies it locally as a natural language prompt. This local classification ensures that syntax elements like pipes or globs are still handled by the shell, while the semantic intent is passed to the agent.
Agent Selection and Configuration
llmao supports a wide array of coding agents, including Amp, Antigravity CLI, Claude Code, Codex, Gemini CLI, and GitHub Copilot CLI. The default behavior is to launch the only installed supported agent. If multiple agents are present, llmao analyzes the last 10 recognized agent launches to determine which tool the user uses most frequently. This selection can be overridden explicitly using the llmao ask command with the --agent flag, or permanently set via llmao config agent.
Explicit Prompting and Privacy Controls
For prompts containing shell syntax that might be misinterpreted, users can employ the llmao ask command with quoted strings. This ensures the entire string is treated as text rather than executable code. The tool also includes privacy features, such as --input mode, which prevents prompts from being written to the shell history. This is critical for developers handling sensitive project details who do not want their natural language queries persisted in standard log files.
Key Takeaways
- llmao bridges the gap between terminal workflows and AI agents by repurposing shell errors.
- The tool supports 15 major coding agents, including Claude, Codex, and Gemini.
- Local classification prevents llmao from interfering with standard shell syntax and typo correction.
- Installation is available via Homebrew or a standalone script, with configuration managed through a CLI interface.
The Bottom Line
llmao is a clever ergonomic fix for a pervasive developer annoyance, effectively turning the terminal into a unified entry point for the fragmented AI coding agent market. The real value here isn't just convenience; it's the standardization of how we interact with diverse agent CLIs. By abstracting the launch mechanism, llmao reduces the cognitive load of managing multiple AI tools.