codesmate


Namecodesmate JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryAI Assistant CLI for debugging and refactoring code
upload_time2025-09-07 13:04:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords ai assistant cli debug refactor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # codemate
An AI-powered CLI tool that helps developers debug and refactor their code efficiently. Using OpenRouter's GPT-4o API, it analyzes source code files to identify bugs, suggest fixes, and recommend refactoring improvements across multiple programming languages.

# Features
- Smart Debugging: Automatically detect syntax errors, logical errors, runtime issues, and security vulnerabilities
- Code Refactoring: Get intelligent suggestions to improve code quality, maintainability, and performance
- Multi-file Analysis: Process entire directories or single files
- Inline Code Support: Analyze code snippets directly from command line or stdin
- Wide Language Support: Supports 40+ programming languages and file types
- Fast & Efficient: Powered by GPT-4o through OpenRouter API

# Installation
### From PyPI (Recommended)
```bash
pip install codesmate
```
### From Source
```bash
git clone https://github.com/MahdiMirshafiee/codemate.git
cd codemate
pip install .
```

# Setup
Before using codemate, you need to configure your OpenRouter API key:
1. Get an API key from [OpenRouter](https://openrouter.ai/)
2. Configure codemate with your API key:
```bash
codemate --config
```
You'll be prompted to enter your OpenRouter API key. This will be stored in `~/.codemate/config.json` .

# Usage
### Debug Current Directory
Analyze all supported files in the current directory for bugs:
```bash
codemate
```
### Debug Specific File
```bash
codemate filename.py
codemate src/main.js
```
### Refactor Code
Get refactoring suggestions for a specific file:
```bash
codemate -r filename.py
codemate --refactor src/component.jsx
```
### Inline Code Analysis
Analyze code directly from command line:
```bash
codemate -i "def hello(): print('Hello World')"
```
Read code from stdin:
```bash
cat myfile.py | codemate -i -
# or
codemate -i -
# Then paste your code and press Ctrl+D (Linux/macOS) or Ctrl+Z+Enter (Windows)
```

# Configuration Management
### Set API Key
```bash
codemate --config
```
### Delete Configuration
Remove stored API key and configuration:
```bash
codemate --delete
```

# Help
To see all available options:
```bash
codemate --help
```
This will display:
```bash
usage: codemate [-h] [-r] [-i INLINE] [-c] [-d] [filename]

Codemate CLI: AI Assistant for debug and refactor codes

positional arguments:
  filename              (optional) filename to debug/refactor (if omitted, debug current dir)

options:
  -h, --help            show this help message and exit
  -r, --refactor        Refactor the specified file (use with filename)
  -i INLINE, --inline INLINE
                        Inline code OR use "-" to read code from stdin
  -c, --config          Set OpenRouter API Key
  -d, --delete          Delete the codemate config directory (erase API key)
```

# Examples
<details>
<summary>Debug a Python File</summary>

![Debug a Python File](https://raw.githubusercontent.com/MahdiMirshafiee/codemate/main/pics/debug.png)
</details>

<details>
<summary>Refactor a JavaScript File</summary>

![Refactor a JavaScript File](https://raw.githubusercontent.com/MahdiMirshafiee/codemate/main/pics/refactor.png)
</details>

<details>
<summary>Inline Code Analysis</summary>

![Inline Code Analysis](https://raw.githubusercontent.com/MahdiMirshafiee/codemate/main/pics/inline.png)
</details>

# Contributing
Contributions are welcome! Please feel free to submit a Pull Request.

For major changes, please open an issue first to discuss what you would like to change.

# License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

# Authors
- [Mahdi Mirshafiee](https://github.com/MahdiMirshafiee)
- [Saleh Mirshafiee](https://github.com/SalehMirshafiee)

**Made with ❤️ for developers by developers**
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "codesmate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ai, assistant, cli, debug, refactor",
    "author": null,
    "author_email": "Mahdi Mirshafiee <mirshafieemahdi001@gmail.com>, Saleh Mirshafiee <seyed82saleh@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c7/27/273badd69b61990f97c82ad786988facf59525937478f5214978ca0fe344/codesmate-0.1.0.tar.gz",
    "platform": null,
    "description": "# codemate\nAn AI-powered CLI tool that helps developers debug and refactor their code efficiently. Using OpenRouter's GPT-4o API, it analyzes source code files to identify bugs, suggest fixes, and recommend refactoring improvements across multiple programming languages.\n\n# Features\n- Smart Debugging: Automatically detect syntax errors, logical errors, runtime issues, and security vulnerabilities\n- Code Refactoring: Get intelligent suggestions to improve code quality, maintainability, and performance\n- Multi-file Analysis: Process entire directories or single files\n- Inline Code Support: Analyze code snippets directly from command line or stdin\n- Wide Language Support: Supports 40+ programming languages and file types\n- Fast & Efficient: Powered by GPT-4o through OpenRouter API\n\n# Installation\n### From PyPI (Recommended)\n```bash\npip install codesmate\n```\n### From Source\n```bash\ngit clone https://github.com/MahdiMirshafiee/codemate.git\ncd codemate\npip install .\n```\n\n# Setup\nBefore using codemate, you need to configure your OpenRouter API key:\n1. Get an API key from [OpenRouter](https://openrouter.ai/)\n2. Configure codemate with your API key:\n```bash\ncodemate --config\n```\nYou'll be prompted to enter your OpenRouter API key. This will be stored in `~/.codemate/config.json` .\n\n# Usage\n### Debug Current Directory\nAnalyze all supported files in the current directory for bugs:\n```bash\ncodemate\n```\n### Debug Specific File\n```bash\ncodemate filename.py\ncodemate src/main.js\n```\n### Refactor Code\nGet refactoring suggestions for a specific file:\n```bash\ncodemate -r filename.py\ncodemate --refactor src/component.jsx\n```\n### Inline Code Analysis\nAnalyze code directly from command line:\n```bash\ncodemate -i \"def hello(): print('Hello World')\"\n```\nRead code from stdin:\n```bash\ncat myfile.py | codemate -i -\n# or\ncodemate -i -\n# Then paste your code and press Ctrl+D (Linux/macOS) or Ctrl+Z+Enter (Windows)\n```\n\n# Configuration Management\n### Set API Key\n```bash\ncodemate --config\n```\n### Delete Configuration\nRemove stored API key and configuration:\n```bash\ncodemate --delete\n```\n\n# Help\nTo see all available options:\n```bash\ncodemate --help\n```\nThis will display:\n```bash\nusage: codemate [-h] [-r] [-i INLINE] [-c] [-d] [filename]\n\nCodemate CLI: AI Assistant for debug and refactor codes\n\npositional arguments:\n  filename              (optional) filename to debug/refactor (if omitted, debug current dir)\n\noptions:\n  -h, --help            show this help message and exit\n  -r, --refactor        Refactor the specified file (use with filename)\n  -i INLINE, --inline INLINE\n                        Inline code OR use \"-\" to read code from stdin\n  -c, --config          Set OpenRouter API Key\n  -d, --delete          Delete the codemate config directory (erase API key)\n```\n\n# Examples\n<details>\n<summary>Debug a Python File</summary>\n\n![Debug a Python File](https://raw.githubusercontent.com/MahdiMirshafiee/codemate/main/pics/debug.png)\n</details>\n\n<details>\n<summary>Refactor a JavaScript File</summary>\n\n![Refactor a JavaScript File](https://raw.githubusercontent.com/MahdiMirshafiee/codemate/main/pics/refactor.png)\n</details>\n\n<details>\n<summary>Inline Code Analysis</summary>\n\n![Inline Code Analysis](https://raw.githubusercontent.com/MahdiMirshafiee/codemate/main/pics/inline.png)\n</details>\n\n# Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\nFor major changes, please open an issue first to discuss what you would like to change.\n\n# License\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n# Authors\n- [Mahdi Mirshafiee](https://github.com/MahdiMirshafiee)\n- [Saleh Mirshafiee](https://github.com/SalehMirshafiee)\n\n**Made with \u2764\ufe0f for developers by developers**",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AI Assistant CLI for debugging and refactoring code",
    "version": "0.1.0",
    "project_urls": {
        "Issues": "https://github.com/MahdiMirshafiee/codemate/issues",
        "Repository": "https://github.com/MahdiMirshafiee/codemate"
    },
    "split_keywords": [
        "ai",
        " assistant",
        " cli",
        " debug",
        " refactor"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9182e3a76f0401ded65fd28743c3b918dbfc59e6f5c2a3f46931aa430b93435c",
                "md5": "65ae52dc5b4cc8ee99cd1ea5e0cf926d",
                "sha256": "910a2a2ccad2e65bc38b6a258e84142402e96b23d7630c9f1407ba798d31ad9b"
            },
            "downloads": -1,
            "filename": "codesmate-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65ae52dc5b4cc8ee99cd1ea5e0cf926d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9360,
            "upload_time": "2025-09-07T13:04:21",
            "upload_time_iso_8601": "2025-09-07T13:04:21.900869Z",
            "url": "https://files.pythonhosted.org/packages/91/82/e3a76f0401ded65fd28743c3b918dbfc59e6f5c2a3f46931aa430b93435c/codesmate-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c727273badd69b61990f97c82ad786988facf59525937478f5214978ca0fe344",
                "md5": "6b28f5fef81001b16b792836c8be525a",
                "sha256": "0f78d32afd479413ae11ba59a1d0e525c370f0a844b0cbc7e8ddbe0c5e7e9865"
            },
            "downloads": -1,
            "filename": "codesmate-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6b28f5fef81001b16b792836c8be525a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1446356,
            "upload_time": "2025-09-07T13:04:25",
            "upload_time_iso_8601": "2025-09-07T13:04:25.166646Z",
            "url": "https://files.pythonhosted.org/packages/c7/27/273badd69b61990f97c82ad786988facf59525937478f5214978ca0fe344/codesmate-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-07 13:04:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MahdiMirshafiee",
    "github_project": "codemate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "codesmate"
}
        
Elapsed time: 4.45092s