whatisgithub

What is twinny?

twinnydotdev/twinny — explained in plain English

Analysis updated 2026-05-18

3,628TypeScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

Twinny is a free VS Code extension that adds AI code completion and a chat panel, working with local models or cloud API providers.

Mindmap

mindmap
  root((twinny))
    What it does
      Code completion
      Chat sidebar
      Commit messages
      Diff view
    Tech stack
      TypeScript
      VS Code
      Ollama
    Providers
      Local OpenAI-compatible
      OpenAI
      Anthropic
      Groq
    Use cases
      Offline coding assistant
      Codebase-aware chat

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Get AI-powered code completion inside VS Code using a locally running model with no internet connection.

USE CASE 2

Highlight a code block and ask the chat sidebar to explain it, refactor it, or write a test for it.

USE CASE 3

Generate a suggested commit message automatically from your staged changes.

What is it built with?

TypeScriptVS CodeOllama

How does it compare?

twinnydotdev/twinnyopensumi/corereact-native-community/hooks
Stars3,6283,6303,630
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/54/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Local use requires an OpenAI-compatible server such as Ollama already running.

License not clearly stated in the explanation, check the repository for details.

So what is it?

Twinny is a free extension for Visual Studio Code that adds AI-powered code completion and a chat panel to the editor. It works with locally running AI models as well as cloud-based API providers, so you can use it entirely offline or connect it to a service like OpenAI, Anthropic, Groq, Mistral, or others. The two main features are code completion and a chat sidebar. The completion feature watches what you are typing and suggests how to finish the current line or block of code, similar to how GitHub Copilot works. The chat sidebar lets you highlight a piece of code, ask a question about it, and get an explanation, a refactored version, or a test written for it, all without leaving the editor. Chat history is saved between sessions. Twinny also includes some smaller utilities: it can generate a suggested commit message based on your staged changes, open a side-by-side diff view, and create a new document from a code block the AI produces. You can accept a solution directly into your file or copy it to the clipboard. For local use, Twinny connects by default to any OpenAI-compatible API running on your machine, which includes tools like Ollama. You point it at the address and port where your local model is listening, choose the model name, and it works. If you prefer a cloud provider, you switch the provider setting and enter an API key. The README lists nine supported providers and notes that custom API endpoints can be configured. A feature called workspace embeddings lets Twinny index your project files so the AI has context about the broader codebase when answering questions, rather than only seeing what is in the current file. The README also mentions a peer-to-peer network called Symmetry for sharing AI inference resources, though the description of that feature is brief.

Copy-paste prompts

Prompt 1
Set up Twinny in VS Code to connect to a local Ollama model for code completion.
Prompt 2
Show me how to switch Twinny from a local model to a cloud provider like OpenAI or Anthropic.
Prompt 3
Use Twinny's chat sidebar to refactor this selected function and explain the change.
Prompt 4
Explain how Twinny's workspace embeddings give the AI context about my whole project.

Frequently asked questions

What is twinny?

Twinny is a free VS Code extension that adds AI code completion and a chat panel, working with local models or cloud API providers.

What language is twinny written in?

Mainly TypeScript. The stack also includes TypeScript, VS Code, Ollama.

What license does twinny use?

License not clearly stated in the explanation, check the repository for details.

How hard is twinny to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is twinny for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.