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

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.
  • /paste - Paste code for further queries.
  • /ask - Ask questions about pasted content.

⚙️ 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.1.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.1-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: redsage-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 68e8f67e2d9012b80a5a783e0b66ecb487175ed814a1cda511163bc22846e518
MD5 ee606774f10e9ec8fd38e5418ca51481
BLAKE2b-256 c9326b4aac364cec48125134036ffd149a2a1deb4d3ef88f71c7f17208399052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: redsage-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fde61f8616c7adf70fed48dd0de91b3a42c464250bdf35623a81e6b220c0c63
MD5 9da69e7725a4f3cd16a69a90305a0f5c
BLAKE2b-256 35a8696c3246c2c164e7ef9b109083250103d21e64a5f9b9aebebbd54cbf8dc7

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