Skip to content

hossbit/comai-linux-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComAI - Linux Terminal AI Assistant

ComAI local AI assistant for Linux

Linux Bash Local AI Ollama LM Studio OpenAI License Wiki

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.

Why Use It

  • Works from any terminal with the simple comai command.
  • 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.

Demo

ComAI terminal demo

Install

One-line install:

curl -fsSL https://hossbit.github.io/comai/install.sh | bash

Custom install directory:

curl -fsSL https://hossbit.github.io/comai/install.sh | COMAI_INSTALL_DIR="$HOME/apps/comai" bash

Manual install:

git clone https://github.com/hossbit/comai-linux-assistant.git
cd comai-linux-assistant
chmod +x scripts/install.sh
./scripts/install.sh

Then run:

comai status

First Commands

comai 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 hi

Local mode is the default. Use comai ollama ... for Ollama, comai lmstudio ... for LM Studio, and comai gpt ... for OpenAI.

Main Commands

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 service

Providers

ComAI supports:

  • local: any OpenAI-compatible local server, default http://127.0.0.1:11435
  • ollama: local Ollama API, default http://127.0.0.1:11434
  • lmstudio: LM Studio local server, default http://127.0.0.1:1234
  • openai: OpenAI API with OPENAI_API_KEY or providers.openai.api_key
Local AI Server
hossbit/local-ai-server

OpenAI-compatible Linux local AI backend for the local provider.

Check providers:

comai status
comai models
comai provider

Files And Logs

comai explain this script -f install.sh
comai summarize this config -f nginx.conf
comai is this service healthy? -f service.log

ComAI service/status logs are written under:

~/localcomai/logs/comai.log

Documentation

Full documentation lives in the wiki:

Requirements

bash curl jq find sort head sed awk grep wc tr readlink date systemctl

Optional:

file numfmt git

Support

If this repo helped you, give it a star