A context-aware terminal assistant for macOS/Linux (Zsh) providing explanations, automation, and error diagnostics using Gemini 2.0 Flash.
- ask: General Q&A.
- do: Task execution with interactive confirmation.
- explain: Diagnostic tool for piped logs or syntax errors.
gemini_cli.py: Core logic with multi-mode operation and context awareness.review_and_run.sh: Safety staging script for AI-generated commands.Rich: CLI interface for structured, color-coded output.
- Python 3.10+
- Gemini API Key (
GOOGLE_API_KEYin environment)
# Update paths to your local installation
export AGENT_VENV="$HOME/Projects/agentic-dev/cli-agent/gemini-env/bin/python3"
export AGENT_SCRIPT="$HOME/Projects/agentic-dev/cli-agent/gemini_cli.py"
alias ask="GEMINI_MODE=ask $AGENT_VENV $AGENT_SCRIPT"
alias do="GEMINI_MODE=do $AGENT_VENV $AGENT_SCRIPT"
alias explain="GEMINI_MODE=explain $AGENT_VENV $AGENT_SCRIPT"- Context Awareness: Automatically captures CWD, OS, and Git branch.
- Piping Support:
command 2>&1 | explain "debug this error". - Safety: Generated commands are written to
review_and_run.shbefore execution.