gem-cli is a command-line AI assistant powered by Google Gemini.

Follow these steps to install gem-cli on your system.
curl -LO https://raw.githubusercontent.com/jorexdeveloper/gemini-cli/main/gem-cli
chmod +x gem-cli
PATH:
sudo mv gem-cli /usr/local/bin/
Configure gem-cli to work with your Google Gemini API key and preferences.
Set your Gemini API key via environment variable or file.
Get free API key here
Environment Variable:
export GEMINI_API_KEY="your_api_key_here"
Key File (~/.gemini.key):
echo "your_api_key_here" > ~/.gemini.key
~/.local/share/gem-cli/history/chat.json by default.~/.local/share/gem-cli/responses/ when enabled.-L (0–5).Invoke gem-cli with options and an optional prompt.
gem-cli [OPTIONS] [PROMPT]
| Flag | Description |
|---|---|
-m NAME | Set the API model (e.g., gemini-2.5-flash). |
-i | Force interactive mode. |
-c | Print current chat history. |
-n | Backup and start a new chat. |
-N | Start new chat without backup. |
-p | Private chat (disable history & response saving). |
-d | Disable chat history. |
-s | Show separator between messages. |
-r | Prefer raw output (no pretty printing). |
-R | Prefer raw input (disable slash commands). |
-j | JSON output (implies raw output). |
-q | Quiet mode (suppress startup messages). |
-Q | Quiet + raw output. |
-l | List supported API models. |
-L INT | Set log level (0=NONE to 5=DEBUG). |
-v | Print version and exit. |
-h | Print help and exit. |
Launch a REPL chat session. Omit a prompt or use -i to force interactive mode.
gem-cli
Key commands in session:
/help – Show available commands./model NAME – Switch API model./raw – Toggle raw output mode./clear – Clear current chat./list – List supported models./exit – End the session.Send a single prompt and exit.
gem-cli "Explain quantum computing in simple terms."
Combine with flags:
gem-cli -j -m gemini-2.5-flash "Generate a meal plan for a vegetarian."
Manage conversation logs and responses with ease.
gem-cli -c
gem-cli -n
gem-cli -N
Fetch and display models supported for generation.
gem-cli -l
Add -j for a JSON list or use -ll to print simple model list.
gem-cli is licensed under GPL v3+. © 2025 Jore – GitHub/jorexdeveloper/gemini-cli
No reviews yet. Be the first to rate this tool.
Sign in to leave a review.