redsage


Nameredsage JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA minimal terminal pair programmer
upload_time2024-12-08 13:18:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT 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.
keywords ai pair-programming llm coding-assistant
VCS
bugtrack_url
requirements anthropic openai pyyaml gitpython prompt_toolkit watchdog python-dotenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.
- `/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:
```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)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "redsage",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ai, pair-programming, llm, coding-assistant",
    "author": null,
    "author_email": "Warren Chisasa <warrenchisasa@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c9/32/6b4aac364cec48125134036ffd149a2a1deb4d3ef88f71c7f17208399052/redsage-0.1.1.tar.gz",
    "platform": null,
    "description": "# RedSage: Minimal Terminal Pair Programmer\r\n\r\n**Author:** Warren Chisasa  \r\n\r\nRedSage 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**. \r\n\r\n---\r\n\r\n## \ud83d\ude80 Overview\r\n\r\nRedSage 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.\r\n\r\n---\r\n\r\n## \u2728 Features\r\n\r\n- \ud83e\udd16 **Multi-LLM Support**: Integrates with Claude or OpenAI APIs.\r\n- \ud83d\udcc2 **Intelligent File Watching**: Tracks changes in your codebase in real-time.\r\n- \ud83d\udd17 **Seamless Git Integration**: Easily manage branches and commits.\r\n- \ud83d\udda5\ufe0f **Minimal Configuration Requirements**: Simple YAML-based setup.\r\n- \ud83d\udcac **Intuitive Command-Line Interface**: Easy-to-use CLI with rich features.\r\n- \ud83c\udf10 **Multi-Language Programming Support**: Write and analyze code in various languages.\r\n\r\n---\r\n\r\n## \ud83d\udee0\ufe0f Installation\r\n\r\n### Prerequisites\r\nEnsure the following are installed on your system:\r\n- Python 3.8+\r\n- `pip` (Python Package Manager)\r\n- `git`\r\n\r\n### Install via pip\r\n```bash\r\npip install redsage\r\n```\r\n\r\n---\r\n\r\n## \u26a1 Quick Setup\r\n\r\n### 1. Initialize Configuration\r\nRun the following command to initialize Redsage:\r\n```bash\r\nredsage init\r\n```\r\n\r\n### 2. Set API Key\r\nExport your API key securely using environment variables:\r\n```bash\r\nexport REDSAGE_API_KEY=your_api_key\r\n```\r\n\r\nOr update the `redsage.yaml` file with your API key:\r\n```yaml\r\nllm:\r\n  provider: \"openai\"\r\n  api_key: \"your_api_key_here\"\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcd6 Usage\r\n\r\n### Start RedSage\r\n```bash\r\nredsage start\r\n```\r\n\r\n### Available Commands\r\n- `/help` - Show available commands.\r\n- `/context` - Display conversation context.\r\n- `/suggest` - Get code improvement suggestions.\r\n- `/explain` - Explain selected code.\r\n- `/diff` - Show current changes.\r\n- `/save` - Save changes to a git branch.\r\n- `/undo` - Revert the last change.\r\n- `/switch` - Switch LLM provider.\r\n- `/quit` - Exit RedSage.\r\n- `/paste` - Paste code for further queries.\r\n- `/ask` - Ask questions about pasted content. \r\n\r\n\r\n---\r\n\r\n## \u2699\ufe0f Configuration\r\n\r\nCreate a `redsage.yaml` file in your project root for fine-tuned settings:\r\n```yaml\r\nllm:\r\n  provider: \"openai\"  # or \"claude\"\r\n  api_key: \"${REDSAGE_API_KEY}\"\r\n\r\nwatch:\r\n  paths: [\"./src\"]\r\n  ignore: [\"*.pyc\", \"__pycache__\"]\r\n\r\ngit:\r\n  enabled: true\r\n  branch_prefix: \"redsage/\"\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udd12 Security Considerations\r\n\r\n- **API Keys**: Stored securely in environment variables or YAML files.\r\n- **Local File Access Only**: Redsage doesn't transmit local code to external servers unless specified by the user.\r\n- **Git Confirmation**: Git operations require user confirmation.\r\n- **Sanitized Input Handling**: Redsage validates all inputs to prevent injection attacks.\r\n\r\n---\r\n\r\n## \ud83e\udde9 Dependencies\r\n\r\n- `watchdog`\r\n- `click`\r\n- `anthropic`\r\n- `openai`\r\n- `pyyaml`\r\n- `gitpython`\r\n- `prompt_toolkit`\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWe welcome contributions! Follow these steps:\r\n1. Fork the repository.\r\n2. Create your feature branch:\r\n   ```bash\r\n   git checkout -b feature/AmazingFeature\r\n   ```\r\n3. Commit your changes:\r\n   ```bash\r\n   git commit -m 'Add some AmazingFeature'\r\n   ```\r\n4. Push to the branch:\r\n   ```bash\r\n   git push origin feature/AmazingFeature\r\n   ```\r\n5. Open a Pull Request.\r\n\r\n---\r\n\r\n## \ud83d\uddfa\ufe0f Roadmap\r\n\r\n- \ud83e\udde0 Enhanced context management.\r\n- \ud83c\udf0d Support for more LLM providers.\r\n- \ud83d\udcca Advanced code analysis capabilities.\r\n- \u26a1 Performance optimizations.\r\n\r\n---\r\n\r\n## \ud83d\udcdc License\r\n\r\nDistributed under the MIT License. See `LICENSE` for more information.\r\n\r\n---\r\n\r\n## \ud83d\udcec Contact\r\n\r\nWarren Chisasa  \r\n\ud83d\udce7 Email: [warrenchisasa@gmail.com](mailto:warrenchisasa@gmail.com)  \r\n\ud83d\udd17 Project Link: [GitHub Repository](https://github.com/chisasaw/redsage)\r\n",
    "bugtrack_url": null,
    "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. ",
    "summary": "A minimal terminal pair programmer",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/chisasaw/redsage",
        "Repository": "https://github.com/chisasaw/redsage"
    },
    "split_keywords": [
        "ai",
        " pair-programming",
        " llm",
        " coding-assistant"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "35a8696c3246c2c164e7ef9b109083250103d21e64a5f9b9aebebbd54cbf8dc7",
                "md5": "9da69e7725a4f3cd16a69a90305a0f5c",
                "sha256": "3fde61f8616c7adf70fed48dd0de91b3a42c464250bdf35623a81e6b220c0c63"
            },
            "downloads": -1,
            "filename": "redsage-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9da69e7725a4f3cd16a69a90305a0f5c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 51696,
            "upload_time": "2024-12-08T13:18:18",
            "upload_time_iso_8601": "2024-12-08T13:18:18.600786Z",
            "url": "https://files.pythonhosted.org/packages/35/a8/696c3246c2c164e7ef9b109083250103d21e64a5f9b9aebebbd54cbf8dc7/redsage-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c9326b4aac364cec48125134036ffd149a2a1deb4d3ef88f71c7f17208399052",
                "md5": "ee606774f10e9ec8fd38e5418ca51481",
                "sha256": "68e8f67e2d9012b80a5a783e0b66ecb487175ed814a1cda511163bc22846e518"
            },
            "downloads": -1,
            "filename": "redsage-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ee606774f10e9ec8fd38e5418ca51481",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 41655,
            "upload_time": "2024-12-08T13:18:20",
            "upload_time_iso_8601": "2024-12-08T13:18:20.534330Z",
            "url": "https://files.pythonhosted.org/packages/c9/32/6b4aac364cec48125134036ffd149a2a1deb4d3ef88f71c7f17208399052/redsage-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-08 13:18:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chisasaw",
    "github_project": "redsage",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "anthropic",
            "specs": [
                [
                    ">=",
                    "0.3.0"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    ">=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pyyaml",
            "specs": [
                [
                    ">=",
                    "5.4.1"
                ]
            ]
        },
        {
            "name": "gitpython",
            "specs": [
                [
                    ">=",
                    "3.1.0"
                ]
            ]
        },
        {
            "name": "prompt_toolkit",
            "specs": [
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "watchdog",
            "specs": [
                [
                    ">=",
                    "2.1.6"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "1.0.1"
                ]
            ]
        }
    ],
    "lcname": "redsage"
}
        
Elapsed time: 3.78261s