Skip to main content

A minimal terminal pair programmer

Project description

# 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:

redsage init

2. Set API Key

Export your API key securely using environment variables:

export REDSAGE_API_KEY=your_api_key

Or update the redsage.yaml file with your API key:

llm:
  provider: "openai"
  api_key: "your_api_key_here"

📖 Usage

Start RedSage

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:

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:
    git checkout -b feature/AmazingFeature
    
  3. Commit your changes:
    git commit -m 'Add some AmazingFeature'
    
  4. Push to the branch:
    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
🔗 Project Link: GitHub Repository

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

redsage-0.1.0.tar.gz (41.7 kB view details)

Uploaded Source

Built Distribution

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

redsage-0.1.0-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: redsage-0.1.0.tar.gz
  • Upload date:
  • Size: 41.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for redsage-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18b9197ba614fe1d6bb6e34bbe101d8d2d9a79815306a2b492e982f756ab9ae2
MD5 3ac0873e19a97a28379e12cb0c5b3baa
BLAKE2b-256 0d5b99b4c1c6f744281a2d4b1e383624a1bbf9820b9d9b26e0d5f58515555016

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redsage-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for redsage-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0462e9cf3a1262f84e6c643bf4d811ed250a18617c4d143f1d7f69cf2f56457
MD5 545f4a256de410dd055789fcb5966ce3
BLAKE2b-256 05663f8ef33e7da91712e9506ef6e7dd617ae864f8794592b94cac473478174b

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