Quick-GPT: A Fast and Simple CLI LLM Calling Function
Quick-GPT: A Fast and Easy-to-use CLI command
All the code is open-sourced in GitHub.
README
A fast, user-friendly CLI tool for multi-turn conversations with OpenAI and Google Gemini models.
Supports conversation history, system prompts, and easy model switching.
Run powerful AI conversations from your terminal in a single command!
Installation
1 |
|
API Key Configuration
Quick-GPT requires API keys for OpenAI and/or Google Gemini.
You can provide them via a .env
file in your project root, or as environment variables. You can also export these variables in your shell profile (~/.bashrc
, ~/.zshrc
, etc).
Example .env
file:
1 |
|
Quick Start
After installation and API configuration, use the CLI as follows:
1 |
|
Example:
1 |
|
- The tool auto-selects the model based on your configuration and input.
- Conversation history is saved in the
history/
directory with a timestamped filename. - View the full conversation history after each session.
- Use
@exit
or@quit
to quit, and@history
to display previous outputs.
Advanced Usage
Switch models:
1 |
|
Add a system prompt:
1 |
|
- You can also customize system prompts and initial messages in your Python code if using Quick-GPT as a module.
Code
这是笔者第一次尝试中小型项目的多文件编程 (对于Python来说)。
项目结构:
1 |
|
Code is available on GitHub!
https://github.com/xiyuanyang-code/Quick-GPT
Todo List
这个项目本身的设计是因为笔者每次在输入命令行命令的时候(现在真的是离不开命令行了),总是需要一些References的AI辅助,尝试过cursor的命令行帮手,很好用,以及Gemini CLI,但是都觉得太花里胡哨,并且响应时间太长,又是我只是不想切屏去查资料,一个开箱即用的AI CLI助手是我迫切需要的。
后续项目可能不会再添加新功能,因为这个项目就是我正好需要的功能,再加反而难以维护。但是笔者在八月份会将开发的重心转移到设计模式的学习和BLOGing-AI的开发上。