Skip to main content

A command-line interface for interacting with Google's Gemini AI models

Project description

Piptalk CLI (Python)

A command-line interface for interacting with Google's Gemini AI models. Chat with Gemini AI directly from your terminal!

This is the Python version of the Gemini CLI tool. For the Node.js version, see @karitkeyaranjan/talk-cli.

Installation

From PyPI (when published):

pip install piptalk-cli

From source:

git clone <repository-url>
cd gemini-cli-python
pip install -e .

Setup

  1. Get your Gemini API key from Google AI Studio
  2. Set it as an environment variable:
export GEMINI_API_KEY="your-api-key-here"

Or create a .env file in your home directory:

GEMINI_API_KEY=your-api-key-here

Note: The tool comes with a default API key, but it's recommended to use your own.

Usage

Interactive Mode

Simply run the command without any arguments:

piptalk

Command Mode

Provide a prompt directly:

piptalk "Explain quantum computing in simple terms"

Select a Model

Use the --model or -m flag to choose a specific model:

piptalk --model flash "Hello world"
piptalk -m 2.0-flash "Quick question"
piptalk -m 2.5-pro "Explain machine learning"

Available Models

  • flash - ⚡ Gemini 2.5 Flash (default)
  • 2.0-flash - ⚡ Gemini 2.0 Flash
  • 2.5-pro - 🟦 Gemini 2.5 Pro
  • 1.5-pro - 🟦 Gemini Pro Latest
  • pro-latest - 🟦 Gemini Pro Latest

Help

piptalk --help
piptalk -h

Examples

# Interactive mode
piptalk

# Quick question
piptalk "What is the capital of France?"

# Use a specific model
piptalk -m 2.0-flash "Write a Python function to sort a list"
piptalk -m 2.5-pro "Explain the difference between REST and GraphQL"

# Multi-word prompts
piptalk "Explain the difference between REST and GraphQL"

Requirements

  • Python >= 3.8
  • A valid Gemini API key (optional, default key included)

Features

  • ✨ Beautiful formatted output with syntax highlighting
  • 🎨 Color-coded responses for better readability
  • 📝 Code block formatting with borders
  • 📋 List and header formatting
  • 🔄 Support for multiple Gemini models
  • 💬 Interactive and command-line modes

License

ISC

Development

To set up for development:

git clone <repository-url>
cd gemini-cli-python
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -e .

Publishing to PyPI

# Install build tools
pip install build twine

# Build the package
python -m build

# Upload to PyPI (test first with test.pypi.org)
twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piptalk_cli-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

piptalk_cli-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file piptalk_cli-1.0.0.tar.gz.

File metadata

  • Download URL: piptalk_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for piptalk_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 29d4b50c76faa26f1da8cc42b6eba57f8e0a39ea351278f456c7cf57f99d56cd
MD5 0fc245d56f97a2e29f8bffc89774f197
BLAKE2b-256 eaa9f08359c1ee728ba29c1b4b30a9c155a02c673ed0d9ed0e372a3208ac888f

See more details on using hashes here.

File details

Details for the file piptalk_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: piptalk_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for piptalk_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 253db7ea84e2906fa69d5c5aad35075a5351c1202a0333f5ca8f2ddb9d42e691
MD5 0f6424418a59f8ae4d0a092f8ae16191
BLAKE2b-256 c0e4351e7de549f7d7e0baa9885e830ed6ce9ad31886f48a53226e7588fe8aa2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page