Skip to content

netteNz/cli-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemini Zsh Copilot

A context-aware terminal assistant for macOS/Linux (Zsh) providing explanations, automation, and error diagnostics using Gemini 2.0 Flash.

Core Modes

  • ask: General Q&A.
  • do: Task execution with interactive confirmation.
  • explain: Diagnostic tool for piped logs or syntax errors.

Components

  • 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.

Setup

1. Prerequisites

  • Python 3.10+
  • Gemini API Key (GOOGLE_API_KEY in environment)

2. Shell Configuration (~/.zshrc)

# 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"

Features

  • 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.sh before execution.

About

context-aware terminal assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages