Skip to main content

AI-powered CLI troubleshooting assistant using ReAct pattern with LLM backends (Gemini/Ollama)

Project description

RabbitAI 🐰

An intelligent CLI troubleshooting assistant powered by LLMs using the ReAct (Reasoning + Acting) pattern.

RabbitAI helps you diagnose and troubleshoot system issues by autonomously running diagnostic commands, analyzing the results, and providing helpful answers - all through a simple conversational interface.

Installation

Prerequisites

  • Python 3.8+ (Python 3.9 or later recommended)
  • pip (Python package manager)
  • LLM Provider (choose one):
    • Gemini API: Get a free API key from Google AI Studio
    • Ollama: Install from ollama.ai and pull a model (e.g., ollama pull llama3)

Install from GitHub

Option 1: Install with pip (Recommended)

# Clone the repository
git clone https://github.com/yourusername/rabbitai.git
cd rabbitai

# Install the package
pip install -e .

Option 2: Install from URL

# Install directly from GitHub
pip install git+https://github.com/yourusername/rabbitai.git

Initial Setup

After installation, run the setup wizard:

rabbit setup

The setup wizard will ask you to:

  1. Choose your LLM provider (Gemini or Ollama)
  2. Enter your API key (for Gemini) or model name (for Ollama)
  3. Configure safety settings

Quick Start

Basic Usage

# Start RabbitAI
rabbit

# Example interaction
rabbit> what directory am I in?

The agent will:

  1. Analyze your query
  2. Run diagnostic commands (e.g., pwd)
  3. Provide a clear answer based on the output

Example Queries

System Diagnostics:

rabbit> why is my disk full?
rabbit> what processes are using the most memory?
rabbit> check system uptime and load

Network Troubleshooting:

rabbit> can I reach google.com?
rabbit> what's my IP address?
rabbit> check if port 8080 is open

Service Management:

rabbit> is nginx running?
rabbit> what services are listening on port 80?
rabbit> check docker containers

File Operations:

rabbit> what are the largest files in this directory?
rabbit> find all .log files modified today
rabbit> show me hidden files

Exit

rabbit> exit
# or press Ctrl+C

Troubleshooting

Common Issues

1. "No configuration found"

# Run setup first
rabbit setup

2. "Gemini API key not configured"

# Re-run setup and enter your API key
rabbit setup

3. "Ollama connection error"

# Make sure Ollama is running
ollama serve

# Pull a model if you haven't
ollama pull llama3

4. "rabbit command not found"

After installation, the rabbit command may not be in your PATH. Add the scripts directory to your PATH:

macOS:

# Add to ~/.zshrc or ~/.bash_profile
export PATH="$HOME/Library/Python/3.9/bin:$PATH" # Replace the python version as per your current version
source ~/.zshrc

Linux:

# Add to ~/.bashrc or ~/.profile
export PATH="$HOME/.local/bin:$PATH"
source ~/.bashrc

Windows:

# Add to PowerShell profile or Environment Variables
$env:PATH += ";$env:APPDATA\Python\Python39\Scripts" # Replace the python version as per your current version

Alternative: Run directly without PATH setup

python3 -m rabbitai.cli  # macOS/Linux
python -m rabbitai.cli   # Windows

License

MIT License - see LICENSE file for details


Made with ❤️ for CLI enthusiasts and system administrators

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rabbitai-0.1.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rabbitai-0.1.0-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file rabbitai-0.1.0.tar.gz.

File metadata

  • Download URL: rabbitai-0.1.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for rabbitai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e86ea279bc16077670734b6a2a23cecef03c8f1bcb6fd77cd6c2e16417e93dd8
MD5 c01c8322f8f5cfebbdc1dfe11689169d
BLAKE2b-256 72f609898f9000a3c3499f52a79110b279899c8fabe2d778991709878f724c35

See more details on using hashes here.

File details

Details for the file rabbitai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rabbitai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for rabbitai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efedc03ce52c2021bed32220c26e92875978ed5db31a4885f84e9be53e94d828
MD5 9b7d2c8c9b136f194aae7d9e1634fedc
BLAKE2b-256 faa4abaf5b44441d51848e2820b56fb9952bfc176139a3496e9628687463db71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page