mlxmate
Version:
š¤ Your MLX-powered coding companion for Mac - AI assistant with Mistral
132 lines (97 loc) ⢠3.77 kB
Markdown
# MLXMate š¤
**Your MLX-powered coding companion for Mac**
A terminal-based AI coding assistant that runs locally on Apple Silicon using MLX and Mistral. No API keys, no cloud dependencies - just pure local AI power.
## ⨠Features
- š¤ **Local AI**: Runs completely on your Mac using Apple's MLX framework
- š **Apple Silicon Optimized**: Native performance on M1/M2/M3 chips
- š **Agentic Search**: Understands your entire codebase automatically
- š» **Interactive Chat**: Continuous conversation with your AI assistant
- šÆ **Code Generation**: Generate, review, and refactor code
- š§ **Smart Analysis**: Analyze files and suggest improvements
- š¦ **One-Command Install**: Simple npm installation
## š Quick Start
### Installation
```bash
# Install MLXMate (automatically installs Python dependencies)
npm install -g mlxmate
```
The installation script will automatically:
- Install all Python dependencies (MLX, Mistral, etc.) using pip
- Test the installation to ensure everything works
- Work with any Python 3.8+ installation
### Usage
```bash
# Start interactive chat
mlxmate
# Or use the short alias
mate
# Show all commands
mlxmate help
```
## š Commands
| Command | Description |
|---------|-------------|
| `mlxmate` | Start interactive chat |
| `mlxmate interactive` | Interactive mode |
| `mlxmate test` | Test MLX integration |
| `mlxmate setup` | Initial setup |
| `mlxmate search <query>` | Search codebase |
| `mlxmate analyze <file>` | Analyze a file |
| `mlxmate generate <prompt>` | Generate code |
| `mlxmate review <file>` | Review code |
| `mlxmate refactor <file>` | Refactor code |
## šÆ Example Usage
### Interactive Chat
```bash
$ mlxmate
š¤ Loading MLX model...
ā
Model loaded successfully!
š Building codebase index...
ā
Indexed 20 files
You: What is this project about?
š¤ Thinking...
āā MLX Assistant āā®
ā Based on the codebase analysis, this appears to be a Python web application... ā
ā°āāāāāāāāāāāāāāāāāāāÆ
You: Generate a function to parse JSON data
š¤ Thinking...
āā MLX Assistant āā®
ā Here's a robust JSON parsing function: ā
ā ā
ā def parse_json_data(json_string): ā
ā try: ā
ā return json.loads(json_string) ā
ā except json.JSONDecodeError as e: ā
ā raise ValueError(f"Invalid JSON: {e}") ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāÆ
```
### Code Generation
```bash
mlxmate generate "Create a Python function to calculate fibonacci numbers"
```
### Code Review
```bash
mlxmate review myfile.py
```
## š§ Requirements
- **macOS** with Apple Silicon (M1/M2/M3)
- **Python 3.8+**
- **Node.js 14+** (for npm installation)
## š¦ What's Included
- **MLX Framework**: Apple's machine learning framework
- **Mistral Model**: High-quality 7B parameter model
- **Codebase Analyzer**: Intelligent code understanding
- **Rich Terminal UI**: Beautiful, responsive interface
- **Agentic Search**: Semantic codebase search
## š Why MLXMate?
- **š Privacy**: Everything runs locally on your machine
- **ā” Speed**: Native Apple Silicon performance
- **š° Free**: No API costs or subscriptions
- **šÆ Accurate**: Context-aware responses about your codebase
- **š ļø Powerful**: Full coding assistant capabilities
## š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## š License
MIT License - see LICENSE file for details.
---
**Made with ā¤ļø for Mac developers**