terminal-aichat
v0.3.5
Published
A cli for AI/LLM chat in terminal. Extremely simple and easy to use. Using OpenAI-compatible `/v1/chat/completion` API
Readme
terminal-aichat
A terminal AI/LLM chat CLI
- very simple, super fast, lightweight, and cross platform(Windows, Linux, MacOs)
- using
/v1/chat/completionAPI
aichat <INPUT MESSAGE> # chat
aichat "<INPUT MESSAGE>" # chat
aichat -- <INPUT MESSAGE> # chat
cat input.txt | aichat # chat
cat input.txt | aichat "explain this" # chatQuick Start
Installation
cargo install terminal-aichator
Download binary from Release
Prerequisites
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_1Chat
# 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"Usage Examples
View Configurations
aichat list
aichat list model
aichat list promptConfigure Prompts
aichat set prompt <PROMPT_CONFIG_NAME> --content "your prompt content"
aichat set prompt my_prompt_1 --content "use plain text, give extremely concise output"Update Model Configuration (Partial Update)
aichat set model my_model_1 --temperature 0.3 --model-name gpt-4oSet Model Temperature
aichat set model my_model_1 --temperature 0.3Delete a Configuration Item
aichat delete model sample_model_gptUse Temporary API Key via Environment Variable
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?"Configuration Files
On first run, the config file is automatically initialized.
~/.terminal-aichat/config.json— stores configuration JSON~/.terminal-aichat/aes_key.bin— stores the random encryption key for securing API keys (to avoid plaintext storage)
cat ~/.terminal-aichat/config.jsonSet Log Level
export LOG_LEVEL=DEBUGEquivalent to using
--verbose
Pure Mode (--pure)
Suppresses all extra messages and outputs only the response.
aichat --pure "Hello?"Verbose Logging (--verbose)
aichat --verbose "Hello?"Disable Streaming Mode (--disable-stream)
aichat --disable-stream "Hello?"