Favicon of Twinny

Twinny

An open-source AI coding assistant for VS Code using Ollama, llama.cpp, LM Studio or hosted APIs, with an MIT-licensed self-hosted team gateway.

Screenshot of Twinny website

Twinny is an AI coding assistant for VS Code that lets developers choose where their models run: on their own computer, a private server or a hosted API. It's for individuals and teams who want code suggestions and repository chat with control over where their code goes. The extension and team gateway are open source under the MIT license.

It supports Ollama, llama.cpp, LM Studio and any OpenAI-compatible server. You can use a local model for completion and a hosted model for chat. With local backends, it can work offline in an air-gapped network without an account or telemetry. Hosted providers receive the requests you send to them.

Completion uses surrounding code as context. Chat can draw on files, symbols, diagnostics, Git changes and terminal output, plus keyword and vector search across the workspace. Inline edits appear as diffs you can accept or reject by hunk. Reviews cover uncommitted changes, branches and GitHub pull requests; terminal assistance proposes commands for review and offers fixes when they fail.

The self-hosted twinny-server gateway gives a team shared access to its model servers and tracks usage by developer. It can also pool models running on teammates' computers, route requests to the least busy machine and switch machines if one disconnects. Prompts pass through the computer serving the model without being stored there. Gateway content recording is off by default.

Similar to Twinny