Bitmeex Mentor 🤖
Production-grade AI-powered code assistant for VS Code — Explain, debug, optimize, and learn code without leaving your editor.

✨ Features
| Feature |
Description |
Shortcut |
| Explain Code |
Purpose, steps, inputs/outputs |
Ctrl+Shift+E |
| Explain Error |
Error type, root cause, line, fix |
Right-click |
| Suggest Fix |
Corrected code + best practices |
Right-click |
| Optimize Code |
Performance/memory + before vs after |
Right-click |
| Find Bugs |
Logic, dead code, unused vars (High/Med/Low) |
Ctrl+Shift+B |
| Complexity Analysis |
Big-O time & space, per-function |
Right-click |
| Generate Documentation |
Google / NumPy / Markdown styles |
Right-click |
| Hindi Explanation |
Natural Hindi explanation |
Right-click |
| Interview Questions |
Beginner / Intermediate / Advanced |
Right-click |
🏗️ Architecture
bitmeex-mentor/
├── extension/ # VS Code Extension (TypeScript)
│ ├── src/
│ │ ├── extension.ts # Entry point
│ │ ├── commands/ # 9 feature commands
│ │ ├── panels/ # Webview side panel
│ │ ├── api/ # Backend HTTP client
│ │ └── utils/ # Code context + cache
│ ├── package.json
│ └── tsconfig.json
│
├── backend/ # FastAPI Backend (Python)
│ ├── main.py # FastAPI app
│ ├── routers/ # 9 API route modules
│ ├── analysis/ # AST, complexity, bugs, docs
│ ├── ai/ # Gemini client + fallback
│ ├── core/ # Config + cache
│ └── models/ # Pydantic schemas
│
└── shared/
└── types.ts # Shared TypeScript types
AI Architecture
User selects code
│
▼
VS Code Extension (TypeScript)
│ HTTP POST /api/...
▼
FastAPI Backend (Python)
│
├─► Cache check (SHA-256 TTL cache)
│
├─► Static Analysis (AST + Ruff + Pylint + Radon)
│
└─► Gemini AI (gemini-1.5-flash)
│ if unavailable
└─► Offline Fallback Engine
🚀 Quick Start
1. Install Extension
Search for Bitmeex Mentor in the VS Code Extensions Marketplace and click Install.
Alternatively, download the .vsix file and install it manually via the Extensions view.
2. Ready to Use!
No backend configuration or API keys required! The extension connects directly to our high-performance cloud AI backend. Simply select any code and right-click to start using Bitmeex Mentor.
⚙️ Configuration
In VS Code Settings (Ctrl+,), search for Bitmeex:
| Setting |
Default |
Description |
bitmeex.language |
auto |
Default language |
bitmeex.cacheEnabled |
true |
Client-side caching |
bitmeex.timeoutMs |
30000 |
Request timeout (ms) |
🔌 API Reference
The FastAPI backend exposes these endpoints:
| Method |
Endpoint |
Feature |
| POST |
/api/explain/code |
Explain Code |
| POST |
/api/explain/error |
Explain Error |
| POST |
/api/fix |
Suggest Fix |
| POST |
/api/optimize |
Optimize Code |
| POST |
/api/bugs |
Find Bugs |
| POST |
/api/complexity |
Complexity Analysis |
| POST |
/api/docs |
Generate Documentation |
| POST |
/api/hindi |
Hindi Explanation |
| POST |
/api/interview |
Interview Questions |
| GET |
/health |
Health Check |
| GET |
/docs |
Swagger UI |
All endpoints accept:
{
"code": "your code here",
"language": "python",
"filename": "optional.py"
}
🔒 Security & Privacy
- ✅ Code is NEVER executed — only statically analyzed
- ✅ Sandboxed architecture — temp files deleted immediately
- ✅ No persistent data storage without user permission
- ✅ Local backend — code stays on your machine
- ✅ Gemini API calls only made when API key is configured
🌍 Supported Languages
| Language |
V1 |
Future |
| Python |
✅ Full support |
— |
| JavaScript |
✅ AI-powered |
— |
| TypeScript |
✅ AI-powered |
— |
| Java |
🔄 AI-powered |
— |
| C++ |
🔄 AI-powered |
— |
| SQL |
🔄 AI-powered |
— |
📦 Tech Stack
Extension: TypeScript · VS Code Extension API · Axios
Backend: Python · FastAPI · Uvicorn · Pydantic v2
Analysis: Python AST · Jedi · Ruff · Pylint · Radon
AI: Google Gemini 1.5 Flash · Tenacity retry
Cache: TTLCache (SHA-256 keyed) on both client and server
📄 License
MIT License — see LICENSE