Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mleidel/gptcom
A command line AI client for Linux written in C using the OpenAI API
https://github.com/mleidel/gptcom
c command-line curl-library json-api linux-app openai-api
Last synced: about 1 month ago
JSON representation
A command line AI client for Linux written in C using the OpenAI API
- Host: GitHub
- URL: https://github.com/mleidel/gptcom
- Owner: MLeidel
- License: gpl-3.0
- Created: 2023-11-27T19:42:56.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-26T21:55:01.000Z (9 months ago)
- Last Synced: 2024-10-13T02:22:32.549Z (about 1 month ago)
- Topics: c, command-line, curl-library, json-api, linux-app, openai-api
- Language: C
- Homepage:
- Size: 103 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gptcom
__A command line AI client for Linux written C using the OpenAI API__gptcom is a small, one file, command-line executable that accepts Gpt prompts and prints
text responses to in the terminal.All arguments typed after the command are input as the one prompt.
When executed with no arguments a GUI text input box opens to accept your prompt.
A running text log is kept: /$HOME/gptcom.log
---
gptcom uses three environment variables:
- GPTKEY=your OpenAI API key
- GPTMOD=the OpenAI Gpt model name to use
- HOME=your Linux user home directoryexample:
```bash
export GPTMOD="gpt-4"
```
---
__zenity__ must be installed on your system:
```bash
sudo apt install zenity
```
To compile the source:
```bash
gcc -o gptcom gptcom.c -O1 -w JSON/cJSON.c -lm -l curl
```The curl library for c is also used:
```bash
sudo apt-get install libcurl4-openssl-dev
```
or download the library files from the cURL website.---
bash file:>`gptcom "$@"`
Save as '$'
Execute at command line:
>`$ hello gpt ...`