twinnydotdev/twinny
VS Code coding assistant with local or hosted models and an optional team gateway
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Twinny separates editor workflows from inference. The TypeScript VS Code extension in src/extension handles completions, chat, inline edits, reviews, terminal actions, embeddings, and provider selection; src/webview contains the React sidebar. The editor sends inference requests to configured model services and can use different providers for completion and chat. A team can add a gateway without changing the editor workflow.
src/gateway builds into packages/twinny-server/cli.js. The dependency-free gateway serves chat, completion, and embeddings through configured model backends and handles access keys, usage, licensing, and administration. src/protocol defines both the extension-facing gateway protocol and the WebSocket peer protocol for pooling developer machines. Separately, the Devices feature pairs computers over an encrypted peer-to-peer link without an account or relay.
Key Capabilities & Differentiators
Twinny combines ghost-text completion with inline edits that can be accepted or rejected by hunk, and reviews working-tree changes, branch diffs, or GitHub pull requests. Chat can attach files, symbols, diagnostics, diffs, and terminal context. Workspace search combines keyword and vector retrieval, reranks results before adding them to the prompt, updates on save, and shows sources under replies. The experimental agent can read, search, and edit files and run commands; command execution asks for approval by default.
Local options include Ollama, LM Studio, llama.cpp, and other OpenAI-compatible servers. Hosted integrations include OpenAI, Anthropic, Gemini, and Mistral, with Codestral listed for completion. Provider support does not make every model suitable for every task: validate completion, chat, and embeddings separately. The gateway adds revocable per-developer keys stored as hashes, per-user and per-model usage, and a request queue for a shared GPU.
Trade-offs & Limitations
Compared with a managed coding assistant, Twinny gives you control over model placement and where code context is sent, in exchange for choosing models, maintaining endpoints, and tuning capacity. Local inference can keep requests inside your network, but a hosted backend still receives the context routed to it, even through a self-hosted gateway. Shared GPU queuing manages contention rather than adding capacity, so test interactive completion under concurrent chat and indexing loads.
The extension is MIT-licensed, but not every gateway feature is included in the free tier. The gateway is free for up to five developers; additional seats are listed at $15 per seat per month, with a separate $29 one-time Personal licence. Policy controls, recording, and plugins require a licence, which is checked locally. Standard usage accounting excludes prompt and reply content; licensed recording can retain both on the gateway when enabled and disclosed to users.
Hardware & Deployment Guide
Start with VS Code 1.93 or newer and install the extension. For local inference, run a model server: Twinny detects Ollama, LM Studio, and llama.cpp on their usual ports and asks which models to use. For hosted inference, configure the provider instead of provisioning a local GPU. For teams, npx twinny-server quickstart detects the model server, writes configuration, creates an admin key, and starts serving. The gateway also has Docker packaging under packages/twinny-server and a Kubernetes chart in deploy/helm.
Before rollout, verify model choices, workspace routing, key revocation, and recording settings; for shared inference, test realistic concurrency rather than sizing from the gateway alone. Workspaces moving from name-based index storage need a one-time rebuild in the Embeddings tab; existing indexes are left untouched. Release v3.23.0 added vision model support. The listed release is v4.0.20, while the package manifest reads 4.3.26; confirm the actual artifact version before pinning a deployment.
VS Code developers and teams that want to choose where inference runs, separate completion from chat, or share models behind a gateway with per-developer access.
Your team wants a fully managed service with no endpoint operations, or needs centralized policy and integrations without paid licensing.
Quick Start & Installation
npx twinny-server quickstartAI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/twinnydotdev/twinny.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about twinny
Does a team need twinny-server, or can each VS Code client connect directly?
How should we size GPU memory and test runtime overhead?
What does the MIT licence cover, and what should a self-hosted team check before rollout?
When is Twinny a better fit than a managed assistant or a local-only extension setup?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy