Go to file
AI Christianson af55602fd1 fix: wrap ASCII art in code block to preserve alignment on GitHub 2024-12-10 19:03:28 -05:00
ra_aid Initial commit 2024-12-10 19:01:20 -05:00
tests Initial commit 2024-12-10 19:01:20 -05:00
.gitignore Initial commit 2024-12-10 19:01:20 -05:00
LICENSE Initial commit 2024-12-10 19:01:20 -05:00
MANIFEST.in Initial commit 2024-12-10 19:01:20 -05:00
README.md fix: wrap ASCII art in code block to preserve alignment on GitHub 2024-12-10 19:03:28 -05:00
pyproject.toml Initial commit 2024-12-10 19:01:20 -05:00
requirements-dev.txt Initial commit 2024-12-10 19:01:20 -05:00
requirements.txt Initial commit 2024-12-10 19:01:20 -05:00

README.md


██▀███   ▄▄▄            ▄▄▄       ██▓▓█████▄ 
▓██ ▒ ██▒▒████▄         ▒████▄    ▓██▒▒██▀ ██▌
▓██ ░▄█ ▒▒██  ▀█▄       ▒██  ▀█▄  ▒██▒░██   █▌
▒██▀▀█▄  ░██▄▄▄▄██      ░██▄▄▄▄██ ░██░░▓█▄   ▌
░██▓ ▒██▒ ▓█   ▓██▒ ██▓  ▓█   ▓██▒░██░░▒████▓ 
░ ▒▓ ░▒▓░ ▒▒   ▓▒█░ ▒▓▒  ▒▒   ▓▒█░░▓   ▒▒▓  ▒ 
 ░▒ ░ ▒░  ▒   ▒▒ ░ ░▒    ▒   ▒▒ ░ ▒ ░ ░ ▒  ▒ 
 ░░   ░   ░   ▒    ░     ░   ▒    ▒ ░ ░ ░  ░ 
  ░           ░  ░  ░        ░  ░ ░     ░    
                    ░                 ░      

Python Versions License Status

RA.Aid

RA.Aid is a powerful AI-driven command-line tool designed to assist developers and researchers in executing programming and research tasks efficiently. Built on top of LangChain and LLMs, it provides an intelligent assistant that can help with research, planning, and implementation of development tasks.

Table of Contents

Features

  • Three-Stage Architecture: Implements a sophisticated workflow with Research, Planning, and Implementation stages, each powered by dedicated AI agents and toolsets.
  • Advanced AI Integration: Built on LangChain and leverages the latest LLMs for natural language understanding and generation.
  • Comprehensive Toolset:
    • Shell command execution
    • Expert querying system
    • File operations and management
    • Memory management
    • Research and planning tools
    • Code analysis capabilities
  • Interactive CLI Interface: Simple yet powerful command-line interface for seamless interaction
  • Modular Design: Structured as a Python package with specialized modules for console output, processing, text utilities, and tools
  • Git Integration: Built-in support for Git operations and repository management

Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Steps

  1. Install from PyPI:
pip install ra-aid

Or install from source:

git clone https://github.com/ai-christianson/ra-aid.git
cd ra-aid
pip install .
  1. Install additional dependencies:
pip install -r requirements.txt
  1. (Optional) Install development dependencies:
pip install -r requirements-dev.txt

Usage

RA.Aid is used via the ra-aid command. The basic usage pattern is:

ra-aid [task]

Examples

Research a topic:

ra-aid "Research best practices for Python package structure"

Plan a development task:

ra-aid "Plan the implementation of a new REST API endpoint"

Generate code or documentation:

ra-aid "Create a README.md template for my project"

Interactive Mode

For an interactive session where you can enter multiple tasks:

ra-aid

This will start an interactive prompt where you can input tasks sequentially.

Architecture

RA.Aid implements a three-stage architecture for handling development and research tasks:

  1. Research Stage:

    • Gathers information and context
    • Analyzes requirements
    • Identifies key components and dependencies
  2. Planning Stage:

    • Develops detailed implementation plans
    • Breaks down tasks into manageable steps
    • Identifies potential challenges and solutions
  3. Implementation Stage:

    • Executes planned tasks
    • Generates code or documentation
    • Performs necessary system operations

Core Components

  • Console Module (console/): Handles console output formatting and user interaction
  • Processing Module (proc/): Manages interactive processing and workflow control
  • Text Module (text/): Provides text processing and manipulation utilities
  • Tools Module (tools/): Contains various utility tools for file operations, search, and more

Dependencies

Core Dependencies

  • langchain-anthropic: LangChain integration with Anthropic's Claude
  • langgraph: Graph-based workflow management
  • rich>=13.0.0: Terminal formatting and output
  • GitPython==3.1.41: Git repository management
  • fuzzywuzzy==0.18.0: Fuzzy string matching
  • python-Levenshtein==0.23.0: Fast string matching
  • pathspec>=0.11.0: Path specification utilities

Development Dependencies

  • pytest>=7.0.0: Testing framework
  • pytest-timeout>=2.2.0: Test timeout management

Development Setup

  1. Clone the repository:
git clone https://github.com/ai-christianson/ra-aid.git
cd ra-aid
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  1. Install development dependencies:
pip install -r requirements-dev.txt
  1. Run tests:
python -m pytest

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch:
git checkout -b feature/your-feature-name
  1. Make your changes and commit:
git commit -m 'Add some feature'
  1. Push to your fork:
git push origin feature/your-feature-name
  1. Open a Pull Request

Guidelines

  • Follow PEP 8 style guidelines
  • Add tests for new features
  • Update documentation as needed
  • Keep commits focused and message clear
  • Ensure all tests pass before submitting PR

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Copyright (c) 2024 AI Christianson

Contact