Terminal client for the Google Gemini API with markdown rendering.
Installed as ask.
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.
ask [--model NAME] <text>ask "explain bash syntax"
ask --model gemini-2.5-pro "review this diff"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
git clone https://github.com/rebootless/prompt-cli
cd prompt-cli
chmod +x install.sh
./install.sh
source ~/.bashrc
ask --setupinstall.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).
- Open Google AI Studio
- Sign in with a Google account
- Create an API key (free tier is available)
- Run:
ask --setupPaste the key when prompted. It is stored at ~/.config/prompt-cli/keys.env with mode 600.
To replace the key later:
ask --resetchmod +x uninstall.sh
./uninstall.shRemoves the installed files and PATH block. Asks separately before deleting
~/.config/prompt-cli (your stored API key), since that step is irreversible.
- API key is stored at
~/.config/prompt-cli/keys.env,chmod 600. askresolves its own real path at runtime, solib/is always found relative to whereverinstall.shcopied it — no hardcoded paths.promptis already taken by oh-my-bash.
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.