ComAI is a Bash-powered AI assistant for your Linux terminal.
Use it to ask Linux questions, explain commands before you run them, inspect files, scan logs, and talk to local AI, Ollama, or OpenAI without leaving your shell. ComAI is the client; LocalAI is only one optional backend.
- Works from any terminal with the simple
comaicommand. - Supports LocalAI, Ollama, LM Studio, llama.cpp server, OpenAI, and other OpenAI-compatible APIs.
- Understands files and logs with
-f. - Keeps setup and provider checks visible with
comai status. - Installs as a user-space tool under
~/localcomai.
One-line install:
curl -fsSL https://hossbit.github.io/comai/install.sh | bashCustom install directory:
curl -fsSL https://hossbit.github.io/comai/install.sh | COMAI_INSTALL_DIR="$HOME/apps/comai" bashManual install:
git clone https://github.com/hossbit/comai-linux-assistant.git
cd comai-linux-assistant
chmod +x scripts/install.sh
./scripts/install.shThen run:
comai statuscomai explain chmod 755
comai how do I find files larger than 1GB?
comai do you see any error? -f application.log
comai ollama hi
comai lmstudio hi
comai gpt hiLocal mode is the default. Use comai ollama ... for Ollama,
comai lmstudio ... for LM Studio, and comai gpt ... for OpenAI.
comai setup # Configure provider, API, and model
comai ask # Ask one question
comai chat # Start an interactive conversation
comai explain # Explain a command, error, or output
comai analyze # Analyze logs, files, or piped output
comai status # Show provider status and connections
comai provider # Show active and available providers
comai models # List models from all providers
comai config # View, get, or edit settings
comai history # Show previous conversations
comai start # Start the optional LocalAI helper service
comai stop # Stop the optional LocalAI helper service
comai restart # Restart the optional LocalAI helper serviceComAI supports:
local: any OpenAI-compatible local server, defaulthttp://127.0.0.1:11435ollama: local Ollama API, defaulthttp://127.0.0.1:11434lmstudio: LM Studio local server, defaulthttp://127.0.0.1:1234openai: OpenAI API withOPENAI_API_KEYorproviders.openai.api_key
Check providers:
comai status
comai models
comai providercomai explain this script -f install.sh
comai summarize this config -f nginx.conf
comai is this service healthy? -f service.logComAI service/status logs are written under:
~/localcomai/logs/comai.logFull documentation lives in the wiki:
- Quick Start
- Installation
- Providers
- Configuration
- ComAI + LocalAI
- Local AI Service
- File and Log Analysis
- Troubleshooting
- Uninstall
bash curl jq find sort head sed awk grep wc tr readlink date systemctl
Optional:
file numfmt git


