gpt-cli  by kharvd

CLI tool for interacting with chat LLMs (ChatGPT, Claude, Gemini, etc.)

created 2 years ago
711 stars

Top 49.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a command-line interface for interacting with various large language models, including OpenAI's ChatGPT, Anthropic's Claude, and Google's Gemini. It's designed for developers and power users who want to integrate AI chat capabilities directly into their terminal workflows, offering features like model customization, usage tracking, and flexible configuration.

How It Works

The CLI leverages Python and interacts with LLM APIs through environment variables or a YAML configuration file. Users can define multiple "assistants" with specific system prompts, model parameters (temperature, top_p), and API keys. This allows for tailored interactions, such as a dedicated "dev" assistant for coding or a "bash" assistant for generating shell commands. The tool supports streaming responses, multi-line input, and an "execute" mode for directly running generated shell commands.

Quick Start & Requirements

  • Install via pip: pip install gpt-command-line
  • Requires Python and pip.
  • API keys for desired providers (OpenAI, Anthropic, Google, Cohere) are necessary.
  • Configuration can be managed via ~/.config/gpt-cli/gpt.yml.
  • More info: https://github.com/kharvd/gpt-cli

Highlighted Details

  • Supports OpenAI, Anthropic (including Claude 3.7 extended thinking), Google Gemini, Cohere, and OpenAI-compatible APIs (e.g., Together, OpenRouter, local models).
  • Customizable assistants with predefined messages and model parameters.
  • "Execute" mode allows editing and running generated shell commands.
  • Tracks token usage and estimated costs.
  • Supports !include directive for loading context from files.

Maintenance & Community

  • Project appears actively maintained by kharvd.
  • No explicit community links (Discord/Slack) are provided in the README.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

  • The license is not specified, which may impact commercial use or integration into closed-source projects.
  • Extended thinking mode is specific to Claude 3.7 models.
Health Check
Last commit

3 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
28 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.