Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prompt-CLI

Terminal client for the Google Gemini API with markdown rendering. Installed as ask.

License: GPL v3 Bash Debian Ubuntu

Why This Exists

A minimal way to query Google Gemini from the terminal without installing Node.js or a full agent.

  • One command → one answer
  • Free tier via Google AI Studio (no card required to start)
  • Markdown rendered as ANSI in the terminal
  • No conversation history, no tools, no file access — by design

If you need an agent that edits files, runs shell commands, or keeps chat context, use the official Gemini CLI instead.

Usage

Syntax

ask [--model NAME] <text>

Examples

ask "explain bash syntax"
ask --model gemini-2.5-pro "review this diff"

Structure

prompt-cli/
├── ask            # entry point: argument parsing + orchestration only
├── install.sh     # copies files into place, sets up PATH, installs deps
├── uninstall.sh   # reverses install.sh
├── lib/
│   ├── paths.sh   # shared path/config constants (sourced by all three scripts above)
│   ├── ui.sh      # colors, box-drawing helpers
│   ├── config.sh  # API key setup/reset
│   ├── api.sh     # Gemini request + timing
│   └── render.py  # markdown -> ANSI renderer
└── README.md

Install

git clone https://github.com/rebootless/prompt-cli
cd prompt-cli
chmod +x install.sh
./install.sh
source ~/.bashrc
ask --setup

install.sh installs python3, jq, curl via apt-get if missing, copies ask and lib/ to ~/.local/lib/prompt-cli/, symlinks ~/.local/bin/ask, and adds ~/.local/bin to PATH in .bashrc (idempotent marker block).

Getting an API Key

  1. Open Google AI Studio
  2. Sign in with a Google account
  3. Create an API key (free tier is available)
  4. Run:
ask --setup

Paste the key when prompted. It is stored at ~/.config/prompt-cli/keys.env with mode 600.

To replace the key later:

ask --reset

Uninstall

chmod +x uninstall.sh
./uninstall.sh

Removes the installed files and PATH block. Asks separately before deleting ~/.config/prompt-cli (your stored API key), since that step is irreversible.

Notes

  • API key is stored at ~/.config/prompt-cli/keys.env, chmod 600.
  • ask resolves its own real path at runtime, so lib/ is always found relative to wherever install.sh copied it — no hardcoded paths.
  • prompt is already taken by oh-my-bash.

License

This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.

About

Terminal client for the Google Gemini API with markdown rendering.

Resources

Stars

Watchers

Forks

Contributors

Languages