A Comprehensive AI-Powered Command-Line Interface for Programming Assistance,
Error Debugging, and Command Translation.
COMANDI is an AI-driven command-line tool designed to streamline programming workflows by translating natural language instructions into executable shell commands, debugging code, and offering targeted programming assistance. It leverages advanced natural language processing to enhance developer productivity directly from the terminal, using MetaAI(Llama3).
- Command Translation: Converts natural language commands into shell instructions, with the option to execute them directly.
- Code Analysis: Supports understanding, debugging, and fixing code files. The tool provides summaries, debugging tips, and suggested code improvements.
To install COMANDI, ensure Python 3.10 or higher is installed, and follow these steps:
-
Clone the repository:
git clone https://github.com/datavorous/comandi.git cd comandi
-
Build the package:
pip install setuptools wheel python setup.py sdist bdist_wheel
-
Install the package:
pip install .
-
Run COMANDI:
comandi -run
COMANDI supports various functionalities tailored to enhance command-line operations and programming tasks:
-
Command Execution:
- Input a natural language instruction.
- COMANDI translates it into a shell command, provides a description, and prompts for execution.
-
Code Analysis:
- To analyze code, use:
understand path/to/file.py debug path/to/file.py fix path/to/file.py
- Specify line ranges for focused analysis:
understand path/to/file.py:10-15,27-48
- To analyze code, use:
-
System Information:
- COMANDI displays key system details at startup, providing context for further operations.
-
Interactive Prompts:
- Engage with the AI to receive hints, command suggestions, and code fixes. Example:
:: How do I sort a list in Python?
- Engage with the AI to receive hints, command suggestions, and code fixes. Example:
- Programming Language: Python 3.10+
- Core Libraries:
rich
: Provides enhanced terminal formatting.subprocess
: Facilitates command execution.pkg_resources
: Manages resource paths and dependencies.MetaAI
: Powers AI-driven features.
- User Preferences: Customizable settings for user-specific preferences.
- Command History: Save and recall previous commands.
- Version Control Integration: Git and other VCS operations from the CLI.
Contributions are welcome. Please refer to the CONTRIBUTING.md file for guidelines.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Special thanks to the creators of the MetaAI
and rich
libraries for their invaluable tools.