UNPKG

mlxmate

Version:

šŸ¤– Your MLX-powered coding companion for Mac - AI assistant with Mistral

132 lines (97 loc) • 3.77 kB
# 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**