Primelab

Product — VS Code extension · PyCharm plugin

Saarthi AI. A code copilot that never leaves your Mac.

Inline completions and an agentic chat for VS Code (and soon PyCharm), powered by the Ollama models already on your machine. No cloud, no API keys, no code leaving your laptop — enforced by a no-network sandbox.

Inference
100% local via Ollama
Completion latency
~200 ms on an M4 Pro
Price
Free, MIT licensed

01 — Features

Copilot ergonomics, your hardware

01

Ghost-text completions

Fill-in-the-middle suggestions as you type, with a short debounce and in-flight cancellation. Prompts are built to stay byte-stable between keystrokes so Ollama's prompt cache does the heavy lifting.

02

Agentic chat

Ask questions about your project. The assistant can read files, search the workspace, propose edits and run commands — every file write and shell command waits for your approval first.

03

Adaptive completions

It records what you accept, trim or reject and tunes suggestion length and style per language. The log never leaves your workspace, and you can reset it any time.

04

Your models, your choice

Pick any installed Ollama model for chat and completion from inside the editor. Small coder models for speed, large tool-capable models for the agent.

05

Notebooks too

Completions work inside Jupyter notebook cells in VS Code, with each cell synced as its own virtual document.

06

Honest status

A status-bar item tells you when Ollama is down or a model is missing. It starts Ollama for you inside a no-network sandbox, and for a missing model it copies the ollama pull command for you to run.

02 — Install

Up and running in three steps

Install Ollama and pull two models

Saarthi talks to a local Ollama server. A small coder model handles completions; a larger tool-capable model drives the chat. Pull models from a terminal: Saarthi itself never downloads anything.

brew install ollama && ollama serve
ollama pull qwen2.5-coder:0.5b-base
ollama pull qwen3.8:27b-mlx

Install the extension

From the Marketplace button above, or from a terminal:

code --install-extension thelaconicguy.ollama-pilot

PyCharm 2026.2+: the Saarthi AI plugin is on its way to the JetBrains Marketplace.

Open a folder and start typing

Ghost text appears after a brief pause. Press Cmd+Shift+L for the chat. Models and completion settings live in the chat panel's model picker and settings view.

  • macOS on Apple Silicon
  • VS Code 1.100+
  • PyCharm 2026.2+ (soon)
  • Ollama 0.40+
  • Any Ollama model

03 — How it works

A Rust core, thin editor clients

One engine, several editors

A small Rust sidecar runs next to the editor. It mirrors open documents, indexes the workspace, assembles prompts, streams from Ollama and runs the agent loop. The editor only renders suggestions and asks you for approvals.

The same core powers the PyCharm plugin, coming to the JetBrains Marketplace as Saarthi AI, and a JupyterLab extension that is working today and will follow.

  • Rust
  • JSON-RPC over stdio
  • Ollama
  • VS Code
  • JupyterLab
  • PyCharm

Built for latency

  • Fill-in-the-middle prompts with a stable prefix so the model's cache is reused keystroke to keystroke.
  • Related snippets from your workspace are refreshed in the background, never on the hot path.
  • Cancelled requests are dropped on the server side, so typing fast costs nothing.
  • Default completion model is a 0.5B coder model: about 200 ms end to end on an M4 Pro, measured, not estimated.

04 — Privacy

Where does my code go? Nowhere.

Saarthi talks only to an Ollama server on your own Mac. Any other address is refused before a connection is even attempted, and proxy settings are ignored. There is no account, no telemetry and no third-party API. The completion-feedback log it keeps for adaptive learning lives in a .localpilot/ folder inside your workspace and holds only short context snippets and the suggestions themselves.

  • Sandboxed Ollama. Start Ollama runs the server inside a macOS sandbox that can reach only your own machine: no internet, not even DNS lookups, and Ollama's cloud features switched off.
  • No downloads. Saarthi never asks Ollama to fetch a model. When one is missing, it gives you the ollama pull command to run yourself.
  • Commands without network. Shell commands the agent runs are shown in full and wait for your approval, then run in the same no-network sandbox.
  • Edits you approve. Every edit the agent proposes is shown as a diff and applied only after you approve it.
  • Nothing loaded remotely. The chat view can't load remote images or scripts; links open only when you click them.

Running a bigger local model, or want this inside your team's editor setup? We'd like to hear from you.

Saarthi AI is a Primelab product. Free and MIT licensed — source on GitHub.