AI-powered autocomplete plugin for the Fresh editor. Provides inline ghost-text suggestions with multi-provider support, RAG-based workspace context, and intelligent multi-line completion.
- Multi-provider support -- OpenAI-compatible, Anthropic, and Ollama
- RAG workspace indexing -- semantic code search for context-aware completions
- Ghost text suggestions -- inline preview with partial acceptance (word/line)
- Intelligent indentation -- re-indents multi-line suggestions to match context
- Persistent cache -- embedding cache survives editor restarts
-
Clone into your Fresh plugins directory:
git clone <repo-url> ~/.config/fresh/plugins/ai-autocomplete
-
Set your API key(s):
export MISTRAL_API_KEY="your-key" # For Codestral (default autocomplete) export OPENAI_API_KEY="your-key" # For embeddings (default)
-
Restart Fresh -- the plugin auto-initializes.
| Topic | Description |
|---|---|
| Getting Started | Installation, first config, verifying it works |
| Configuration | All settings with explanations and examples |
| Commands | All commands with keybinding info |
| Providers | |
| OpenAI-Compatible | Codestral, Mistral, OpenAI setup |
| Anthropic | Claude setup |
| Ollama | Local model setup |
| Features | |
| RAG Indexing | How workspace indexing works |
| Partial Acceptance | Word/line acceptance |
| Caching | Persistence and cache invalidation |
| Reference | |
| Troubleshooting | Common issues, logging, debugging |
| Architecture | Data flow, state machine, components |
| Contributing | Dev setup, testing, adding providers |
npm install
npm test # Run tests (vitest)
npm run lint # ESLint
npm run typecheck # TypeScript type checking