minuet-ai.el  by milanglacier

Code completion as-you-type for Emacs

Created 8 months ago
258 stars

Top 98.2% on SourcePulse

GitHubView on GitHub
Project Summary

Minuet is an Emacs package that provides AI-powered code completion as-you-type, integrating with a wide range of Large Language Models (LLMs) including OpenAI, Gemini, Claude, Ollama, and Llama.cpp. It aims to enhance developer productivity by offering intelligent code suggestions directly within the Emacs environment, supporting both specialized chat-based prompts and Fill-in-the-Middle (FIM) completion for compatible models.

How It Works

Minuet leverages Emacs's extensibility to provide a seamless code completion experience. It supports multiple LLM providers through a unified interface, allowing users to configure their preferred model and API endpoints. The package offers two primary completion modes: a minibuffer frontend for traditional completion UIs and an overlay ghost text frontend for inline suggestions. It also features streaming support for faster feedback, especially with slower LLMs, and includes customizable options for context window size, request timeouts, and suggestion behavior.

Quick Start & Requirements

  • Installation: Install via ELPA or MELPA using (package-install 'minuet).
  • Requirements: Emacs 29+ compiled with native JSON support, plz 0.9+, and dash. An API key for at least one supported LLM provider is necessary.
  • Configuration: Configure providers and models using minuet-provider and plist-put with specific provider options (e.g., minuet-openai-compatible-options). Keybindings are provided for invoking completions and managing suggestions. Auto-suggestion can be enabled via minuet-auto-suggestion-mode.
  • Examples: Detailed configuration examples are provided for Ollama, OpenRouter, and Llama.cpp, including specific model setups and prompt formatting for FIM.

Highlighted Details

  • Supports a diverse range of LLM providers: OpenAI, Claude, Gemini, Codestral, Ollama, Llama.cpp, and OpenAI-compatible endpoints.
  • Offers both chat-based and Fill-in-the-Middle (FIM) completion modes.
  • Customizable configuration for providers, models, context, and request parameters.
  • Streaming support for real-time completion delivery.

Maintenance & Community

Minuet is part of GNU ELPA, indicating a commitment to long-term maintenance. While substantial contributions require copyright assignment to the FSF, minor contributions are welcomed. Further details on contributions and acknowledgments of related projects are available.

Licensing & Compatibility

As part of GNU ELPA, Minuet is distributed under a free software license, likely GPLv3 or similar, which may have implications for use in closed-source projects due to copyleft provisions. Specific compatibility for commercial use would depend on the exact license and any associated API terms of service for the LLM providers used.

Limitations & Caveats

The README notes that Deepseek's high server demand may slow down default completions, recommending alternative providers. It also advises against using "thinking models" due to increased latency, and if used, their thinking capabilities should be disabled. Users experiencing setup issues are directed to check API key configurations or model/context window sizes that might cause timeouts.

Health Check
Last Commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
1
Star History
13 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.