NeuroFile - AI-Powered Code Analysis Extension

NeuroFile is a powerful VS Code extension that leverages OpenAI's GPT-4 to help developers understand, analyze, and improve their code through intelligent AI assistance. Whether you're working with individual files, code selections, or entire projects, NeuroFile provides comprehensive insights to enhance your development workflow.
🚀 Features
📄 File Analysis
- Summarize Entire Files: Get comprehensive overviews of what your code files do
- Key Logic Identification: Understand the main logic flow and side effects
- Pseudocode Generation: Convert complex code into readable pseudocode
🔍 Code Selection Analysis
- Smart Code Review: Analyze selected code blocks with expert-level insights
- Best Practices Suggestions: Receive recommendations for cleaner, safer code
- Documentation Assistance: Get explanations written as if from official documentation
- Time Complexity Analysis: Understand the computational complexity of your algorithms
- Performance Optimization: Get suggestions for improving code efficiency
- Algorithm Insights: Deep analysis of your algorithmic approaches
🔧 Code Improvement
- Intelligent Refactoring: AI-powered code refactoring suggestions
- Multiple Refactor Types:
- Improve readability
- Optimize performance
- Clean up code structure
- Add error handling
- Modernize syntax
📁 Project-Level Analysis
- Folder Summarization: Analyze entire directories and understand project structure
- Project Overview: Get comprehensive summaries of entire codebases
- Architecture Insights: Understand how different files work together
�� Interactive AI Assistant
- Ask Questions: Get contextual answers about your code
- Real-time Analysis: Instant feedback and suggestions
- Markdown Export: Save all AI insights as formatted markdown files
🎯 Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "NeuroFile"
- Click Install
- Restart VS Code
🔑 Setup
API Key Configuration
NeuroFile requires an OpenAI API key to function. Set it up in one of these ways:
Option 1: Environment Variable (Recommended)
# Add to your shell profile (.bashrc, .zshrc, etc.)
export OPENAI_API_KEY="your-api-key-here"
Option 2: VS Code Settings
- Open VS Code Settings (Ctrl/Cmd + ,)
- Search for "NeuroFile"
- Enter your OpenAI API key
Getting an OpenAI API Key
- Visit OpenAI's website
- Sign up or log in to your account
- Navigate to API Keys section
- Create a new API key
- Copy and use it in NeuroFile
🎮 Usage
Access NeuroFile
- Activity Bar: Click the NeuroFile icon in the left sidebar
- Command Palette: Press
Ctrl+Shift+P
(or Cmd+Shift+P
) and search "NeuroFile"
Available Commands
Command |
Description |
Usage |
NeuroFile: Summarize File |
Analyze an entire file |
Select file via dialog |
NeuroFile: Summarize Selection |
Analyze selected code |
Select code first, then run command |
NeuroFile: Generate Pseudocode |
Convert code to pseudocode |
Select code, command inserts pseudocode as comment |
NeuroFile: Time Complexity |
Analyze algorithm complexity |
Select algorithm code first |
NeuroFile: Refactor Code |
Get refactoring suggestions |
Select code, choose refactor type |
NeuroFile: Summarize Folder |
Analyze entire directory |
Select folder via dialog |
NeuroFile: Summarize Project |
Analyze current workspace |
Run from any file in project |
NeuroFile: Open React Panel |
Open the AI assistant panel |
Access interactive features |
Interactive Panel Features
The NeuroFile panel provides:
- Real-time Results: See AI analysis results instantly
- Ask Questions: Type questions about your code
- Save to Markdown: Export any analysis as a markdown file
- Visual Interface: Clean, modern UI for better readability
📖 Examples
File Summarization
// Your complex TypeScript file
class DataProcessor {
async processData(data: any[]): Promise<ProcessedData[]> {
// Complex logic here...
}
}
NeuroFile Output:
# File Summary
## Purpose
This file defines a DataProcessor class responsible for transforming raw data arrays into processed format.
## Key Components
- **DataProcessor Class**: Main processing engine
- **processData Method**: Async method handling data transformation
- **Error Handling**: Built-in error management for data validation
## Side Effects
- Modifies input data structure
- May throw validation errors
- Returns Promise for async handling
Code Selection Analysis
Select any code block and get instant analysis:
- What the code does
- Potential improvements
- Security considerations
- Performance implications
Time Complexity Analysis
// Select this function
function bubbleSort(arr) {
for (let i = 0; i < arr.length; i++) {
for (let j = 0; j < arr.length - i - 1; j++) {
if (arr[j] > arr[j + 1]) {
[arr[j], arr[j + 1]] = [arr[j + 1], arr[j]];
}
}
}
return arr;
}
NeuroFile Analysis:
# Time Complexity Analysis
## Complexity: O(n²)
## Explanation
- **Outer Loop**: Runs n times
- **Inner Loop**: Runs (n-1), (n-2)... times
- **Total Operations**: n × (n-1)/2 ≈ n²/2
- **Classification**: Quadratic time complexity
## Optimization Suggestions
- Consider Quick Sort O(n log n) average case
- Merge Sort for guaranteed O(n log n)
- For small arrays, insertion sort might be faster
⚙️ Configuration
Supported Languages
NeuroFile works with any programming language, including:
- JavaScript/TypeScript
- Python
- Java
- C/C++
- Go
- Rust
- PHP
- And many more!
Customization Options
- Model Selection: Choose between GPT-4 models
- Temperature Settings: Adjust AI creativity vs. precision
- Output Format: Customize markdown formatting
- Export Options: Choose file save locations
🛠️ Troubleshooting
Common Issues
"NeuroFile commands not found"
Solution: Restart VS Code after installation
"API Key Error"
Solutions:
- Verify your OpenAI API key is correct
- Check your account has available credits
- Ensure environment variable is set properly
"Webview not loading"
Solutions:
- Disable conflicting extensions
- Clear VS Code cache
- Reinstall NeuroFile extension
"No analysis generated"
Solutions:
- Check your internet connection
- Verify API key permissions
- Try with smaller code selections
- Large Files: For files >1000 lines, consider using selection analysis
- API Limits: Be mindful of OpenAI rate limits
- Network: Ensure stable internet connection for best performance
📈 Changelog
Version 0.0.1 (Current)
- ✅ Initial release
- ✅ File and selection analysis
- ✅ Time complexity analysis
- ✅ Code refactoring suggestions
- ✅ Project-level summaries
- ✅ Interactive AI panel
- ✅ Markdown export functionality
🤝 Contributing
We welcome contributions! Here's how you can help:
- Report Bugs: Use the issue tracker
- Suggest Features: Open feature requests
- Submit PRs: Fork the repo and submit pull requests
- Documentation: Help improve our docs
Development Setup
git clone https://github.com/NueroFile-CFC/NeuroFile-Extension.git
cd NeuroFile-Extension
npm install
code .
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
🙏 Acknowledgments
- OpenAI for providing the GPT-4 API
- VS Code team for the excellent extension platform
- Our community for feedback and suggestions
Made with ❤️ by the NeuroFile Team
Enhance your coding experience with AI-powered insights!