Metadata-Version: 2.1
Name: redsage
Version: 0.1.0
Summary: A minimal terminal pair programmer
Author-email: Warren Chisasa <warrenchisasa@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Warren Chisasa
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE. 
        
Project-URL: Homepage, https://github.com/chisasaw/redsage
Project-URL: Repository, https://github.com/chisasaw/redsage
Keywords: ai,pair-programming,llm,coding-assistant
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: watchdog>=2.1.6
Requires-Dist: click>=8.0.0
Requires-Dist: anthropic>=0.3.0
Requires-Dist: openai>=1.0.0
Requires-Dist: pyyaml>=5.4.1
Requires-Dist: gitpython>=3.1.0
Requires-Dist: prompt_toolkit>=3.0.0

```markdown
# RedSage: Minimal Terminal Pair Programmer

**Author:** Warren Chisasa  

RedSage is a lightweight, terminal-based coding assistant that connects to LLM APIs (e.g., Claude, OpenAI) to provide real-time pair programming capabilities. Designed for developers seeking a simple yet powerful coding companion, RedSage focuses on **simplicity**, **ease of setup**, and **intuitive functionality**. 

---

## 🚀 **Overview**

RedSage empowers developers to write, analyze, and improve code directly from the terminal. Whether you're debugging, writing new functions, or collaborating with AI, RedSage is your go-to lightweight coding assistant.

---

## ✨ **Features**

- 🤖 **Multi-LLM Support**: Integrates with Claude or OpenAI APIs.
- 📂 **Intelligent File Watching**: Tracks changes in your codebase in real-time.
- 🔗 **Seamless Git Integration**: Easily manage branches and commits.
- 🖥️ **Minimal Configuration Requirements**: Simple YAML-based setup.
- 💬 **Intuitive Command-Line Interface**: Easy-to-use CLI with rich features.
- 🌐 **Multi-Language Programming Support**: Write and analyze code in various languages.

---

## 🛠️ **Installation**

### **Prerequisites**
Ensure the following are installed on your system:
- Python 3.8+
- `pip` (Python Package Manager)
- `git`

### **Install via pip**
```bash
pip install redsage
```

---

## ⚡ **Quick Setup**

### **1. Initialize Configuration**
Run the following command to initialize Redsage:
```bash
redsage init
```

### **2. Set API Key**
Export your API key securely using environment variables:
```bash
export REDSAGE_API_KEY=your_api_key
```

Or update the `redsage.yaml` file with your API key:
```yaml
llm:
  provider: "openai"
  api_key: "your_api_key_here"
```

---

## 📖 **Usage**

### **Start RedSage**
```bash
redsage start
```

### **Available Commands**
- `/help` - Show available commands.
- `/context` - Display conversation context.
- `/suggest` - Get code improvement suggestions.
- `/explain` - Explain selected code.
- `/diff` - Show current changes.
- `/save` - Save changes to a git branch.
- `/undo` - Revert the last change.
- `/switch` - Switch LLM provider.
- `/quit` - Exit RedSage.

---

## ⚙️ **Configuration**

Create a `redsage.yaml` file in your project root for fine-tuned settings:
```yaml
llm:
  provider: "openai"  # or "claude"
  api_key: "${REDSAGE_API_KEY}"

watch:
  paths: ["./src"]
  ignore: ["*.pyc", "__pycache__"]

git:
  enabled: true
  branch_prefix: "redsage/"
```

---

## 🔒 **Security Considerations**

- **API Keys**: Stored securely in environment variables or YAML files.
- **Local File Access Only**: Redsage doesn’t transmit local code to external servers unless specified by the user.
- **Git Confirmation**: Git operations require user confirmation.
- **Sanitized Input Handling**: Redsage validates all inputs to prevent injection attacks.

---

## 🧩 **Dependencies**

- `watchdog`
- `click`
- `anthropic`
- `openai`
- `pyyaml`
- `gitpython`
- `prompt_toolkit`

---

## 🤝 **Contributing**

We welcome contributions! Follow these steps:
1. Fork the repository.
2. Create your feature branch:
   ```bash
   git checkout -b feature/AmazingFeature
   ```
3. Commit your changes:
   ```bash
   git commit -m 'Add some AmazingFeature'
   ```
4. Push to the branch:
   ```bash
   git push origin feature/AmazingFeature
   ```
5. Open a Pull Request.

---

## 🗺️ **Roadmap**

- 🧠 Enhanced context management.
- 🌍 Support for more LLM providers.
- 📊 Advanced code analysis capabilities.
- ⚡ Performance optimizations.

---

## 📜 **License**

Distributed under the MIT License. See `LICENSE` for more information.

---

## 📬 **Contact**

Warren Chisasa  
📧 Email: [warrenchisasa@gmail.com](mailto:warrenchisasa@gmail.com)  
🔗 Project Link: [GitHub Repository](https://github.com/chisasaw/redsage) 
```
