| Crates.io | terminal-aichat |
| lib.rs | terminal-aichat |
| version | 0.4.0 |
| created_at | 2025-09-13 16:33:09.451787+00 |
| updated_at | 2025-12-27 07:01:20.675756+00 |
| description | A cli for AI/LLM chat in terminal. Extremely simple and easy to use. Using OpenAI-compatible `/v1/chat/completion` API |
| homepage | https://github.com/slow-groovin/terminal-aichat |
| repository | https://github.com/slow-groovin/terminal-aichat |
| max_upload_size | |
| id | 1837873 |
| size | 259,634 |

A CLI for AI/LLM chat in terminal
written in rust, light (6.5MB binary size), super fast.
multi platform(Windows, Linux, MacOS)
using /v1/chat/completion API
aichat <INPUT MESSAGE>
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/slow-groovin/terminal-aichat/releases/latest/download/terminal-aichat-installer.sh | sh
cargo install terminal-aichat
brew install slow-groovin/tap/terminal-aichat
npm install terminal-aichat@latest
powershell -ExecutionPolicy Bypass -c "irm https://github.com/slow-groovin/terminal-aichat/releases/latest/download/terminal-aichat-installer.ps1 | iex"
or download executable binaries directly in Release page.
Configure a model (example with OpenRouter):
aichat set model my_model_1 --model-name openai/gpt-oss-20b:free --base-url https://openrouter.ai/api/v1 --api-key <YOUR_API_KEY>
aichat use model my_model_1
# Directly send a message
aichat how to view ubuntu release version
# If your message conflicts with a subcommand, wrap it with quotes
aichat "set swap memory to 0"
# other ways
aichat "<INPUT MESSAGE>"
aichat -- <INPUT MESSAGE>
# pipe
cat input.txt | aichat
cat input.txt | aichat "explain this"
# pure mode (display for model/prompts configs and costs will be hide)
aichat --pure "Hello?"
aichat list
aichat list model
aichat list prompt
aichat set prompt <PROMPT_CONFIG_NAME> --content "your prompt content"
aichat set prompt my_prompt_1 --content "use plain text, give extremely concise output"
aichat set model my_model_1 --temperature 0.3 --model-name gpt-4o
aichat set model my_model_1 --temperature 0.3
aichat delete model sample_model_gpt
Useful for avoiding persistent API key storage or for testing. it will override API key in final request.
export OPENAI_API_KEY=sk-***************
aichat "Hello?"
On first run, the config file is automatically initialized.
Configuration file locations (cross-platform):
~/.config/terminal-aichat/config.json~/Library/Application Support/terminal-aichat/config.json%APPDATA%\terminal-aichat\config.jsonThe encryption key file is stored as aes_key.bin in the config directory (used to encrypt API keys and avoid plaintext storage).
# View config directory location
aichat list
# View config file content (Linux example)
cat ~/.config/terminal-aichat/config.json
export LOG_LEVEL=DEBUG
Equivalent to using
--verbose
--pure)Suppresses all extra messages and outputs only the response.
aichat --pure "Hello?"
--verbose)aichat --verbose "Hello?"
--disable-stream)aichat --disable-stream "Hello?"