Cursor + Ertas
Fine-tune a coding model on your team's codebase conventions, architectural patterns, and style guides to create a domain-specific coding assistant that Cursor can use as a custom model endpoint.
Overview
Cursor has rapidly become the AI-native code editor of choice for developers who want deep AI integration in their daily workflow. Its tab completion, inline editing, and chat features have redefined what developers expect from a code editor, enabling the practice often called vibe coding — where developers describe intent and the AI generates implementation. From solo indie hackers to large engineering teams, Cursor has shortened the gap between idea and working code by orders of magnitude.
The default models powering Cursor are general-purpose: trained on broad programming knowledge but not on your specific codebase, your internal libraries, your naming conventions, or the architectural decisions your team has made over years of development. This means Cursor's suggestions often require manual correction to align with project standards — wrong import paths, inconsistent naming patterns, unfamiliar helper utilities ignored in favor of verbose inline code. For teams with large or opinionated codebases, these corrections add up to significant friction.
How Ertas Integrates
Ertas lets you close the gap between generic AI coding assistance and your team's actual coding style. By collecting representative examples of your codebase — approved pull requests, style guide documentation, internal API usage patterns, and architectural decision records — you can assemble a training dataset that captures how your team writes code. Ertas Studio manages the fine-tuning process, letting you train a coding model that understands your project's conventions, preferred libraries, and common patterns without requiring ML expertise from your engineering team.
Once trained, you deploy the model locally through Ollama and configure Cursor to use it as a custom OpenAI-compatible model endpoint. Cursor's settings allow specifying alternative model providers, so your fine-tuned model appears alongside the built-in options. The result is an AI assistant that suggests code using your actual utility functions, follows your naming conventions, and structures components the way your team expects — all while keeping your proprietary code completely off third-party servers during both training and inference.
Getting Started
- 1
Curate training data from your codebase
Collect high-quality examples of your team's code: approved pull requests, well-documented modules, style guide snippets, and internal library usage patterns. Structure them as prompt-completion pairs that demonstrate your conventions.
- 2
Fine-tune a coding model in Ertas Studio
Upload your curated dataset to Ertas Studio and select a code-capable base model. Configure training parameters and launch the fine-tuning job. Ertas tracks experiments so you can compare different training configurations.
- 3
Export and deploy via Ollama
Download the fine-tuned model in GGUF format, register it with Ollama, and start the inference server. Verify the model responds correctly by testing with representative coding prompts from your project.
- 4
Configure Cursor to use the custom endpoint
In Cursor's settings, add a custom model provider pointing to your Ollama endpoint (http://localhost:11434/v1). Set the model name to match your Ollama registration and configure it as an available model for chat and completions.
- 5
Iterate on training data based on usage
As your team uses the model, collect cases where suggestions miss the mark. Add corrected examples to your training dataset and run incremental fine-tuning in Ertas to continuously improve the model's alignment with your codebase.
Benefits
- AI suggestions that follow your team's naming conventions, import patterns, and architectural style
- Complete code privacy — your proprietary codebase never leaves your infrastructure during training or inference
- Consistent suggestions across all team members using the same fine-tuned model
- Reduced suggestion correction time as the model learns project-specific patterns and utilities
- No per-token costs for AI-assisted coding regardless of team size or usage volume
- Iterative improvement loop — feed corrections back into training data to continuously refine the model
Related Resources
Fine-Tuning
GGUF
Inference
LoRA
Your Vibe-Coded App Hit 10K Users. Now Your AI Bill Is $3K/Month.
Self-Hosted AI for Indie Apps: Replace GPT-4 with Your Own Model
LM Studio
Ollama
Ertas for Code Generation
Ertas for Indie Developers & Vibe-Coded Apps
Ship AI that runs on your users' devices.
Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.