PimAI is a Visual Studio Code extension that provides AI-powered code assistance. It uses the Groq AI model to analyze, optimize, test, and document your code.
Features
1. Code Chat (Alt+A)
Interactive chat with AI about the selected code snippet
Code correction and improvement suggestions
Instant code updates
2. Code Explanation (Alt+S)
Detailed explanation of the selected code
Beautifully formatted documentation in Markdown
Syntax highlighting support
3. Code Formatting (Alt+F)
Code formatting according to best practices
Consistent style and layout
Improved readability
4. Code Optimization (Alt+O)
Performance improvements
Time and memory complexity optimizations
Resource usage optimizations
5. Test Generation (Alt+T)
Automatic unit test generation
Comprehensive test scenarios
Tests for edge cases and error scenarios
6. Documentation Generation (Alt+D)
Automatic documentation in JSDoc/docstring format
Function descriptions and parameters
Usage examples
7. Security Analysis (Alt+C)
Code security scan
Detection of common vulnerabilities
Improvement suggestions
Installation
Open Visual Studio Code
Go to the Extensions tab (Ctrl+Shift+X)
Search for "PimAI"
Click the "Install" button
Configuration
You will need to enter your Groq API key on the first use of the extension
To change the API key:
Restart VSCode or
Delete the pimai.secretKey value in the settings
Usage
Select the code you want to analyze
Use one of the following shortcut keys:
Alt+A: Code Chat
Alt+S: Code Explanation
Alt+F: Code Formatting
Alt+O: Code Optimization
Alt+T: Test Generation
Alt+D: Documentation Generation
Alt+C: Security Analysis
Requirements
Groq API key
Node.js and pnpm
Development
git clone https://github.com/Pimatis/pimai.git
pnpm install
pnpm run watch
License
This project is licensed under the MIT license.
Contributing
Fork this repository
Create a new branch (git checkout -b feature/amazing-feature)
Commit your changes (git commit -m 'feat: add amazing feature')
Push your branch (git push origin feature/amazing-feature)