Skip to content

subashc2023/ai-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TerminalGPT: Blazing Fast AI in Your Terminal

Get instant AI responses, especially terminal commands, right from your command line with TerminalGPT. Powered by the lightning-fast Groq API, TerminalGPT delivers answers in a snap, making your terminal even more powerful.

Features

  • Instant Answers: Leverage the speed of Groq for near-instant AI responses.
  • Completely Free: Groq provides a free tier, with a generous 30 rq/m and 6k t/m, making this completely free!
  • Command-Line Focused: Optimized for generating terminal commands and answering development-related questions.
  • Chat Mode: Engage in interactive conversations with TerminalGPT.
  • Configuration: Customize system prompts, models, and history limits.
  • History: сохраняет chat history (with configurable limit).
  • Timing: Optional display of API request and processing times.
  • Simple Commands: Control chat with easy commands like /clear, /time, /exit, and /quit.

Setup

Prerequisites

  • Python 3.13+

  • Groq API Key: Get your free API key from Groq Console and set it as an environment variable:

    export GROQ_API_KEY="YOUR_API_KEY"

Installation

  1. Clone the repository (or download the files):

    git clone [repository_url] # Replace with your repository URL if you have one
    cd ai-cli # Or whatever you named the directory
  2. Install dependencies:

    pip install -r requirements.txt # If you create a requirements.txt, or just install rich and requests

    (Alternatively, since this project uses script metadata, you might be able to use a tool like pipx if you package it correctly, but for now pip install -r requirements.txt is easiest)

    (If you don't have a requirements.txt, you can create one or install manually)

    pip install requests rich

Usage

Single query

python hello.py "What is the command to list all files in the current directory?"

Chat mode

python hello.py

Configuration

python hello.py /clear or /c
python hello.py /time or /t

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages