# twinny

> Open-source, self-hosted AI coding assistant for VS Code offering completion, chat, inline edit and code review on models you run.

twinny is an MIT-licensed AI coding assistant for Visual Studio Code, made by rjmacarthy.xyz. It provides autocomplete, chat, inline edit and code review against a model server you choose, including local servers, hosted APIs, or a shared team gateway. The project states it has no telemetry and requires no account.

## What It Is

twinny is a VS Code extension that connects to any OpenAI-compatible inference server. Fill-in-the-middle completions stream as ghost text, Ctrl+I opens inline edit with per-hunk accept or reject, and chat lets you attach files, symbols, the problems panel, the git diff, the terminal or a workspace index search with @. It also reviews the working tree, a branch against its base, or a GitHub pull request, writes commit messages from the staged diff, and generates terminal commands and fixes for failed ones. An experimental agent mode can read, search and edit files and run commands, asking before commands by default.

## Model Servers and Providers

On first start twinny detects Ollama, LM Studio and llama.cpp on their usual ports. It can also use other OpenAI-compatible servers, another paired computer over an encrypted peer-to-peer link, hosted APIs such as OpenAI, Anthropic, Mistral, DeepSeek, OpenRouter, Gemini, Groq, Cohere and Perplexity, or a team gateway. Local and hosted models can be mixed, for example a local model for completion and a hosted one for chat.

## Team Gateway: twinny-server

twinny-server is a gateway run with `npx twinny-server quickstart` that serves chat, completion and embeddings to developers' VS Code. It provides a key per developer, usage metrics per person and model (not content), an admin page, and pooling of teammates' computers as backends. Licensed features include team policy, optional prompt recording, and plugins for pull request and issue review on GitHub, GitLab, Gitea and Bitbucket, Slack/Discord/Teams notifications, SSO, a shared index and backups. Operations features include a hash-chained audit log, Prometheus metrics, a request queue, Docker and a Helm chart.

## Privacy Model

The site states the extension talks only to servers you configure, with no update check, crash reporter or usage ping, and that it can run air-gapped. The extension and gateway live in one MIT repository.

## Features
- Fill-in-the-middle code autocomplete
- Chat with @ context attachments (files, symbols, git diff, terminal, problems)
- Inline edit with per-hunk diff review
- Experimental agent mode
- Hybrid keyword and vector workspace index
- Code review of working tree, branches and GitHub pull requests
- Commit message generation
- Terminal command generation and failure fixes
- Editable prompt templates
- Team gateway with per-developer keys, usage, policy and admin page
- Pooling of teammates' computers as inference backends
- No telemetry and no account required

## Integrations
Ollama, LM Studio, llama.cpp, Open WebUI, LiteLLM, Oobabooga, OpenAI, Anthropic, Mistral, DeepSeek, OpenRouter, Gemini, Groq, Cohere, Perplexity, GitHub, GitLab, Gitea, Bitbucket, Slack, Discord, Microsoft Teams, Okta, Entra ID, Keycloak, Prometheus, Docker, Kubernetes Helm

## Platforms
WINDOWS, WEB, API, VSC_EXTENSION, CLI

## Pricing
Open Source, Free tier available

## Version
v4.0.20

## Links
- Website: https://twinny.dev
- Documentation: https://docs.twinny.dev/
- Repository: https://github.com/twinnydotdev/twinny
- EveryDev.ai: https://www.everydev.ai/tools/twinny
