lyrebird-cli


Namelyrebird-cli JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
Summary🐦 Lyrebird CLI: AI-Powered Coding Assistant in Your Terminal
upload_time2025-07-22 22:42:14
maintainerNone
docs_urlNone
authorMuneeb Mahfooz Abbasi
requires_python>=3.8
licenseApache-2.0
keywords cli ai coding assistant llm openai deepseek
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🐦 Lyrebird CLI

An AI-powered coding assistant that brings advanced code generation, debugging, refactoring, and explanation capabilities directly to your terminal. Like Google's Gemini CLI and Anthropic's Claude Code, but open-source and flexible.

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## ✨ Features

* **🌟 Code Generation**: Generate code from natural language prompts with context awareness
* **🐛 Bug Fixing**: Automatically detect and fix syntax errors, logical bugs, and code issues
* **♻️ Code Refactoring**: Improve code quality, readability, performance, and maintainability
* **📚 Code Explanation**: Get detailed explanations of code functionality, algorithms, and patterns
* **🏗️ Codebase Analysis**: Summarize project architecture, structure, and design patterns
* **🔌 Multiple Providers**: Support for OpenRouter (GPT-4, Claude, etc.) and DeepSeek APIs
* **🎨 Rich Output**: Beautiful syntax highlighting, progress indicators, and formatted display
* **📁 Flexible Input**: Read from files, stdin, or direct prompts seamlessly
* **⚙️ JSON Output**: Machine-readable output format for automation and scripting
* **🎛️ Explicit Provider Selection**: Choose your preferred AI provider for optimal results

## 🚀 Quick Start

### Installation

```bash
pip install lyrebird-cli
```

Or install from source:

```bash
git clone https://github.com/muneebabbasi10/lyrebird-cli.git
cd lyrebird-cli
pip install -e .
```

### Setup API Keys (Windows PowerShell)

```powershell
$env:OPENROUTER_API_KEY = "sk-or-v1-..."
$env:DEEPSEEK_API_KEY = "sk-..."
```

> Get your API keys:
>
> * [OpenRouter](https://openrouter.ai/)
> * [DeepSeek](https://platform.deepseek.com/)

### Your First Commands

```bash
lyrebird generate "create a binary search algorithm" --provider openrouter
lyrebird fix broken_script.py --provider deepseek
lyrebird summarize ./my_project --provider openrouter
```

## 📖 Full Usage Guide

All commands require `--provider openrouter` or `--provider deepseek`.

### Code Generation

```bash
lyrebird generate "Create a FastAPI server with user authentication" --provider openrouter
lyrebird generate "Implement quicksort" --lang java --provider deepseek
lyrebird generate "Add logging" --file utils.py --provider openrouter
lyrebird generate "Build a neural network" --provider openrouter --model openai/gpt-4o
```

### Bug Fixing

```bash
lyrebird fix buggy_script.py --provider deepseek
cat broken_code.py | lyrebird fix --provider openrouter
lyrebird fix problematic_code.js --provider deepseek --verbose
lyrebird fix --format json --provider openrouter < code_with_errors.py
```

### Code Refactoring

```bash
lyrebird refactor legacy_code.py --provider openrouter
cat messy_code.py | lyrebird refactor --provider deepseek
lyrebird refactor slow_algorithm.py --provider openrouter --verbose
lyrebird refactor --format json old_code.py --provider deepseek
```

### Code Explanation

```bash
lyrebird explain sorting_algorithm.py --provider deepseek
cat complex_function.py | lyrebird explain --provider openrouter
lyrebird explain --format json mysterious_code.py --provider deepseek
lyrebird explain advanced_topic.py --provider openrouter --verbose
```

### Codebase Analysis

```bash
lyrebird summarize ./my_project --provider openrouter
lyrebird summarize ./backend --provider openrouter --model openai/gpt-4o
lyrebird summarize ./codebase --format json --provider deepseek
lyrebird summarize ./src --provider openrouter --verbose
```

## 🔧 Configuration

### .env File

```env
OPENROUTER_API_KEY=sk-or-v1-your-key-here
DEEPSEEK_API_KEY=sk-your-deepseek-key
LYREBIRD_DEFAULT_PROVIDER=openrouter
LYREBIRD_DEFAULT_MODEL=openai/gpt-4o
```

### Provider-Specific Models

* **OpenRouter:** `openai/gpt-4o`, `anthropic/claude-3.5-sonnet`, `google/gemini-pro-1.5`, `openai/gpt-3.5-turbo`, `meta-llama/llama-3-70b`
* **DeepSeek:** `deepseek-chat`, `deepseek-coder`

## 📊 Workflows

### Daily Dev

```bash
lyrebird explain src/main.py --provider deepseek
lyrebird generate "Add user profile" --file models/user.py --provider openrouter
lyrebird fix src/profiles.py --provider deepseek
lyrebird refactor src/profiles.py --provider openrouter
lyrebird summarize . --provider openrouter > daily_report.md
```

### Code Review

```bash
lyrebird explain feature_branch.py --provider deepseek --format json
lyrebird fix --format json src/ --provider openrouter | jq '.issues'
lyrebird refactor pull_request.py --provider deepseek --verbose
```

### Learn New Codebase

```bash
lyrebird summarize ./new_project --provider openrouter
lyrebird explain src/core/engine.py --provider deepseek
lyrebird explain design_patterns/ --provider openrouter --verbose
```

### Debugging

```bash
lyrebird explain failing_test.py --provider deepseek
lyrebird generate "Add debugging logs" --file problematic_module.py --provider openrouter
lyrebird fix problematic_module.py --provider deepseek
lyrebird explain fixed_module.py --provider openrouter
```

## 🎨 Output Formats

### Text (Default)

Formatted, colorized CLI output

### JSON

```bash
lyrebird generate "hello world" --format json --provider deepseek
```

Example:

```json
{
  "task": "generate",
  "content": "generated code here",
  "timestamp": "/cwd",
  "version": "0.1.0"
}
```

## 🛠️ Development

### Setup

```bash
git clone https://github.com/muneebabbasi10/lyrebird-cli.git
cd lyrebird-cli
pip install -e ".[dev]"
pre-commit install
```

### Testing

```bash
pytest
pytest --cov=src --cov-report=html
pytest tests/test_cli.py -v
```

### Code Quality

```bash
black src tests
flake8 src tests
mypy src
make quality
```

## 📊 Performance Tips

* **GPT-4o**: best quality, slower
* **Claude 3.5**: great for reasoning
* **GPT-3.5**: fast, cheaper
* **DeepSeek Coder**: high code quality

## ⚠️ Troubleshooting

### API Key Error

```powershell
$env:OPENROUTER_API_KEY = "your-key"
```

### Missing Provider

```bash
# Wrong
lyrebird generate "hello"

# Right
lyrebird generate "hello" --provider openrouter
```

### File Issues

```bash
ls your_file.py
lyrebird fix /full/path/to/file.py --provider deepseek
```

### Rate Limits

```bash
lyrebird generate "code" --provider openrouter --verbose
lyrebird generate "code" --provider deepseek
```

### Debug Logs

```bash
lyrebird generate "test" --provider openrouter --verbose
```

## 📦 Install

```bash
pip install lyrebird-cli
```

## 📄 License

Apache 2.0 - See [LICENSE](https://github.com/apache/httpd/blob/trunk/LICENSE)

## 🤝 Contributing

1. Fork
2. Create branch
3. Add code + tests
4. Ensure tests pass
5. Format with `black`
6. Push & PR

### Guidelines

* PEP 8
* Small focused PRs
* Tests & Docs

## 🙏 Acknowledgments

* Inspired by Gemini CLI, Claude CLI
* Built with Typer, Rich
* Powered by OpenRouter + DeepSeek

## 📒 Related Projects

* [Claude Code CLI](https://claude.ai/cli)
* [Gemini CLI](https://ai.google.dev/gemini-api/docs/cli)

## 🛡️ Support

* Bugs: [GitHub Issues](https://github.com/muneebabbasi10/lyrebird-cli/issues)
* Features: [GitHub Discussions](https://github.com/muneebabbasi10/lyrebird-cli/discussions)
* Docs: `lyrebird --help`
* Email: \[abbasimuneeb54@gmail.com]



**Made with ❤️ by [Muneeb](https://github.com/muneebabbasi10). Happy coding! 🚀**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lyrebird-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "cli, ai, coding, assistant, llm, openai, deepseek",
    "author": "Muneeb Mahfooz Abbasi",
    "author_email": "Muneeb Mahfooz Abbasi <abbasimuneeb54@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/84/94/73f98d8c160de2b31c98fd326958ba63d531c91476b8df363a37827188f0/lyrebird_cli-0.1.0.tar.gz",
    "platform": null,
    "description": "# \ud83d\udc26 Lyrebird CLI\r\n\r\nAn AI-powered coding assistant that brings advanced code generation, debugging, refactoring, and explanation capabilities directly to your terminal. Like Google's Gemini CLI and Anthropic's Claude Code, but open-source and flexible.\r\n\r\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\r\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r\n\r\n## \u2728 Features\r\n\r\n* **\ud83c\udf1f Code Generation**: Generate code from natural language prompts with context awareness\r\n* **\ud83d\udc1b Bug Fixing**: Automatically detect and fix syntax errors, logical bugs, and code issues\r\n* **\u267b\ufe0f Code Refactoring**: Improve code quality, readability, performance, and maintainability\r\n* **\ud83d\udcda Code Explanation**: Get detailed explanations of code functionality, algorithms, and patterns\r\n* **\ud83c\udfd7\ufe0f Codebase Analysis**: Summarize project architecture, structure, and design patterns\r\n* **\ud83d\udd0c Multiple Providers**: Support for OpenRouter (GPT-4, Claude, etc.) and DeepSeek APIs\r\n* **\ud83c\udfa8 Rich Output**: Beautiful syntax highlighting, progress indicators, and formatted display\r\n* **\ud83d\udcc1 Flexible Input**: Read from files, stdin, or direct prompts seamlessly\r\n* **\u2699\ufe0f JSON Output**: Machine-readable output format for automation and scripting\r\n* **\ud83c\udf9b\ufe0f Explicit Provider Selection**: Choose your preferred AI provider for optimal results\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Installation\r\n\r\n```bash\r\npip install lyrebird-cli\r\n```\r\n\r\nOr install from source:\r\n\r\n```bash\r\ngit clone https://github.com/muneebabbasi10/lyrebird-cli.git\r\ncd lyrebird-cli\r\npip install -e .\r\n```\r\n\r\n### Setup API Keys (Windows PowerShell)\r\n\r\n```powershell\r\n$env:OPENROUTER_API_KEY = \"sk-or-v1-...\"\r\n$env:DEEPSEEK_API_KEY = \"sk-...\"\r\n```\r\n\r\n> Get your API keys:\r\n>\r\n> * [OpenRouter](https://openrouter.ai/)\r\n> * [DeepSeek](https://platform.deepseek.com/)\r\n\r\n### Your First Commands\r\n\r\n```bash\r\nlyrebird generate \"create a binary search algorithm\" --provider openrouter\r\nlyrebird fix broken_script.py --provider deepseek\r\nlyrebird summarize ./my_project --provider openrouter\r\n```\r\n\r\n## \ud83d\udcd6 Full Usage Guide\r\n\r\nAll commands require `--provider openrouter` or `--provider deepseek`.\r\n\r\n### Code Generation\r\n\r\n```bash\r\nlyrebird generate \"Create a FastAPI server with user authentication\" --provider openrouter\r\nlyrebird generate \"Implement quicksort\" --lang java --provider deepseek\r\nlyrebird generate \"Add logging\" --file utils.py --provider openrouter\r\nlyrebird generate \"Build a neural network\" --provider openrouter --model openai/gpt-4o\r\n```\r\n\r\n### Bug Fixing\r\n\r\n```bash\r\nlyrebird fix buggy_script.py --provider deepseek\r\ncat broken_code.py | lyrebird fix --provider openrouter\r\nlyrebird fix problematic_code.js --provider deepseek --verbose\r\nlyrebird fix --format json --provider openrouter < code_with_errors.py\r\n```\r\n\r\n### Code Refactoring\r\n\r\n```bash\r\nlyrebird refactor legacy_code.py --provider openrouter\r\ncat messy_code.py | lyrebird refactor --provider deepseek\r\nlyrebird refactor slow_algorithm.py --provider openrouter --verbose\r\nlyrebird refactor --format json old_code.py --provider deepseek\r\n```\r\n\r\n### Code Explanation\r\n\r\n```bash\r\nlyrebird explain sorting_algorithm.py --provider deepseek\r\ncat complex_function.py | lyrebird explain --provider openrouter\r\nlyrebird explain --format json mysterious_code.py --provider deepseek\r\nlyrebird explain advanced_topic.py --provider openrouter --verbose\r\n```\r\n\r\n### Codebase Analysis\r\n\r\n```bash\r\nlyrebird summarize ./my_project --provider openrouter\r\nlyrebird summarize ./backend --provider openrouter --model openai/gpt-4o\r\nlyrebird summarize ./codebase --format json --provider deepseek\r\nlyrebird summarize ./src --provider openrouter --verbose\r\n```\r\n\r\n## \ud83d\udd27 Configuration\r\n\r\n### .env File\r\n\r\n```env\r\nOPENROUTER_API_KEY=sk-or-v1-your-key-here\r\nDEEPSEEK_API_KEY=sk-your-deepseek-key\r\nLYREBIRD_DEFAULT_PROVIDER=openrouter\r\nLYREBIRD_DEFAULT_MODEL=openai/gpt-4o\r\n```\r\n\r\n### Provider-Specific Models\r\n\r\n* **OpenRouter:** `openai/gpt-4o`, `anthropic/claude-3.5-sonnet`, `google/gemini-pro-1.5`, `openai/gpt-3.5-turbo`, `meta-llama/llama-3-70b`\r\n* **DeepSeek:** `deepseek-chat`, `deepseek-coder`\r\n\r\n## \ud83d\udcca Workflows\r\n\r\n### Daily Dev\r\n\r\n```bash\r\nlyrebird explain src/main.py --provider deepseek\r\nlyrebird generate \"Add user profile\" --file models/user.py --provider openrouter\r\nlyrebird fix src/profiles.py --provider deepseek\r\nlyrebird refactor src/profiles.py --provider openrouter\r\nlyrebird summarize . --provider openrouter > daily_report.md\r\n```\r\n\r\n### Code Review\r\n\r\n```bash\r\nlyrebird explain feature_branch.py --provider deepseek --format json\r\nlyrebird fix --format json src/ --provider openrouter | jq '.issues'\r\nlyrebird refactor pull_request.py --provider deepseek --verbose\r\n```\r\n\r\n### Learn New Codebase\r\n\r\n```bash\r\nlyrebird summarize ./new_project --provider openrouter\r\nlyrebird explain src/core/engine.py --provider deepseek\r\nlyrebird explain design_patterns/ --provider openrouter --verbose\r\n```\r\n\r\n### Debugging\r\n\r\n```bash\r\nlyrebird explain failing_test.py --provider deepseek\r\nlyrebird generate \"Add debugging logs\" --file problematic_module.py --provider openrouter\r\nlyrebird fix problematic_module.py --provider deepseek\r\nlyrebird explain fixed_module.py --provider openrouter\r\n```\r\n\r\n## \ud83c\udfa8 Output Formats\r\n\r\n### Text (Default)\r\n\r\nFormatted, colorized CLI output\r\n\r\n### JSON\r\n\r\n```bash\r\nlyrebird generate \"hello world\" --format json --provider deepseek\r\n```\r\n\r\nExample:\r\n\r\n```json\r\n{\r\n  \"task\": \"generate\",\r\n  \"content\": \"generated code here\",\r\n  \"timestamp\": \"/cwd\",\r\n  \"version\": \"0.1.0\"\r\n}\r\n```\r\n\r\n## \ud83d\udee0\ufe0f Development\r\n\r\n### Setup\r\n\r\n```bash\r\ngit clone https://github.com/muneebabbasi10/lyrebird-cli.git\r\ncd lyrebird-cli\r\npip install -e \".[dev]\"\r\npre-commit install\r\n```\r\n\r\n### Testing\r\n\r\n```bash\r\npytest\r\npytest --cov=src --cov-report=html\r\npytest tests/test_cli.py -v\r\n```\r\n\r\n### Code Quality\r\n\r\n```bash\r\nblack src tests\r\nflake8 src tests\r\nmypy src\r\nmake quality\r\n```\r\n\r\n## \ud83d\udcca Performance Tips\r\n\r\n* **GPT-4o**: best quality, slower\r\n* **Claude 3.5**: great for reasoning\r\n* **GPT-3.5**: fast, cheaper\r\n* **DeepSeek Coder**: high code quality\r\n\r\n## \u26a0\ufe0f Troubleshooting\r\n\r\n### API Key Error\r\n\r\n```powershell\r\n$env:OPENROUTER_API_KEY = \"your-key\"\r\n```\r\n\r\n### Missing Provider\r\n\r\n```bash\r\n# Wrong\r\nlyrebird generate \"hello\"\r\n\r\n# Right\r\nlyrebird generate \"hello\" --provider openrouter\r\n```\r\n\r\n### File Issues\r\n\r\n```bash\r\nls your_file.py\r\nlyrebird fix /full/path/to/file.py --provider deepseek\r\n```\r\n\r\n### Rate Limits\r\n\r\n```bash\r\nlyrebird generate \"code\" --provider openrouter --verbose\r\nlyrebird generate \"code\" --provider deepseek\r\n```\r\n\r\n### Debug Logs\r\n\r\n```bash\r\nlyrebird generate \"test\" --provider openrouter --verbose\r\n```\r\n\r\n## \ud83d\udce6 Install\r\n\r\n```bash\r\npip install lyrebird-cli\r\n```\r\n\r\n## \ud83d\udcc4 License\r\n\r\nApache 2.0 - See [LICENSE](https://github.com/apache/httpd/blob/trunk/LICENSE)\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\n1. Fork\r\n2. Create branch\r\n3. Add code + tests\r\n4. Ensure tests pass\r\n5. Format with `black`\r\n6. Push & PR\r\n\r\n### Guidelines\r\n\r\n* PEP 8\r\n* Small focused PRs\r\n* Tests & Docs\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n\r\n* Inspired by Gemini CLI, Claude CLI\r\n* Built with Typer, Rich\r\n* Powered by OpenRouter + DeepSeek\r\n\r\n## \ud83d\udcd2 Related Projects\r\n\r\n* [Claude Code CLI](https://claude.ai/cli)\r\n* [Gemini CLI](https://ai.google.dev/gemini-api/docs/cli)\r\n\r\n## \ud83d\udee1\ufe0f Support\r\n\r\n* Bugs: [GitHub Issues](https://github.com/muneebabbasi10/lyrebird-cli/issues)\r\n* Features: [GitHub Discussions](https://github.com/muneebabbasi10/lyrebird-cli/discussions)\r\n* Docs: `lyrebird --help`\r\n* Email: \\[abbasimuneeb54@gmail.com]\r\n\r\n\r\n\r\n**Made with \u2764\ufe0f by [Muneeb](https://github.com/muneebabbasi10). Happy coding! \ud83d\ude80**\r\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "\ud83d\udc26 Lyrebird CLI: AI-Powered Coding Assistant in Your Terminal",
    "version": "0.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/yourusername/lyrebird-cli/issues",
        "Documentation": "https://github.com/muneebabbasi10/lyrebird-cli#readme",
        "Homepage": "https://github.com/muneebabbasi10/lyrebird-cli",
        "Repository": "https://github.com/muneebabbasi10/lyrebird-cli"
    },
    "split_keywords": [
        "cli",
        " ai",
        " coding",
        " assistant",
        " llm",
        " openai",
        " deepseek"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9202a63609d3507d7010cc3d96c7a6cc5cb375c69af85a7587ac960734d8c3ce",
                "md5": "ab20aaebba58a580a5d367200356f3d2",
                "sha256": "cee78aa6a4933cc55926fbac69530ea22da53a04660851ae8efb8901c2e3b4dd"
            },
            "downloads": -1,
            "filename": "lyrebird_cli-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ab20aaebba58a580a5d367200356f3d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9764,
            "upload_time": "2025-07-22T22:42:12",
            "upload_time_iso_8601": "2025-07-22T22:42:12.811786Z",
            "url": "https://files.pythonhosted.org/packages/92/02/a63609d3507d7010cc3d96c7a6cc5cb375c69af85a7587ac960734d8c3ce/lyrebird_cli-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "849473f98d8c160de2b31c98fd326958ba63d531c91476b8df363a37827188f0",
                "md5": "9e8a0f2e3b0dd1bb9796009a843491c6",
                "sha256": "c2d8bd39a4675f085aca9ada4defeb45b6bd2aa615f659427d6cf7af5aab5c5b"
            },
            "downloads": -1,
            "filename": "lyrebird_cli-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9e8a0f2e3b0dd1bb9796009a843491c6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14636,
            "upload_time": "2025-07-22T22:42:14",
            "upload_time_iso_8601": "2025-07-22T22:42:14.004950Z",
            "url": "https://files.pythonhosted.org/packages/84/94/73f98d8c160de2b31c98fd326958ba63d531c91476b8df363a37827188f0/lyrebird_cli-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-22 22:42:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourusername",
    "github_project": "lyrebird-cli",
    "github_not_found": true,
    "lcname": "lyrebird-cli"
}
        
Elapsed time: 0.57169s