Direct query

June 29, 2025 ยท View on GitHub

CarthageAI Multi-provider AI terminal assistant

Python 3.8+ License: MIT GitHub last commit

๐Ÿš€ Features

AI-Powered Assistance

โœ” Multi-Provider Support - (OpenAI/DeepSeek)

โœ” File Analysis - Reference files with @file.txt for context-aware responses

โœ” Session Persistence - Save/load conversations with !save and !load

โœ” Rich Markdown Rendering

Terminal Productivity

โŒจ Interactive CLI - Natural language queries or commands

๐Ÿ“‚ File Integration - Supports .py, .json, .txt, and 10+ file types

โฑ Real-Time Processing - Loading spinners and timeout handling

Sysadmin Toolkit (Built-in Commands)

๐Ÿ”Œ Test open ports | ๐Ÿ“ถ Network connectivity check

๐Ÿ’ฝ Disk usage summary | ๐Ÿ” Find running processes

๐Ÿ›ก Audit sudo users | ๐Ÿ” SSH config analyzer

๐Ÿ“ฆ Installation

# Clone the repository
git clone https://github.com/alaadotcom/CarthageAI.git
cd CarthageAI

# Install dependencies
pip install -r requirements.txt

๐Ÿ–ฅ๏ธ Usage
Basic Commands:
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Command      โ”‚ Description                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ !help        โ”‚ Show help menu                          โ”‚
โ”‚ !model       โ”‚ Switch AI models                        โ”‚
โ”‚ @file.txt    โ”‚ Analyze file content                    โ”‚
โ”‚ !save        โ”‚ Save current conversation               โ”‚
โ”‚ !load <id>   โ”‚ Load previous session                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Examples:

# Direct query
python carthage_ai.py "Explain Python decorators"

# File analysis
python carthage_ai.py "Fix this code" @broken_script.py

# Interactive mode:
python carthage_ai.py
> @config.json What's wrong with this configuration?

๐Ÿ› ๏ธ Sysadmin Tools

  _________________________________________
 / Port Check | Disk Space | Process Find  \
| SSH Audit   | Ping Test  | Sudo Check    |
 \________________________________________/

 Example:

!portcheck example.com 80
!diskspace
!findproc nginx

API keys stored locally in config.json