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
  • 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.1.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.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: piptalk_cli-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 92aba4ae006eea6615ebf2dfe6e086748dca49f952a61a103e603b80ba8d40fe
MD5 457a96b83e586d6dc2e3654fc7be3222
BLAKE2b-256 5a19fa9ee74605a7307c98d98a2eb883560017f73c6ab92c5b5b95fa302f450b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: piptalk_cli-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37e4bd7f77e44ddff9223a21ef5a5ba875354ad06a02e424a502f9e38f31e707
MD5 651295a6817bf476153a2c5b6ba5e8b3
BLAKE2b-256 46f110b15d7cae4552363f7d204b29b0ffe05f271fbdb84c0b7827b9e0419405

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