tabby Documentation

Self-hosted AI coding assistant

RAW Doc

File: README.md

Tabby is a self-hosted AI coding assistant, offering an open-source and on-premises alternative to GitHub Copilot. It boasts several key features:

  • Self-contained, with no need for a DBMS or cloud service.
  • OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE).
  • Supports consumer-grade GPUs.

πŸ”₯ What's New

  • 12/12/2025 Get your GitHub issues implemented by connecting them to Pochi tasks and create PRs directly from the sidebar with a breakdown of CI/Lint/Test results [email protected].

  • 07/02/2025 v0.30 supports indexing GitLab Merge Request as Context!

  • 05/25/2025 πŸ’‘Interested in joining Agent private preview? DM in X for early waitlist approval!🎫

  • 05/20/2025 Enhance Tabby with your own documentationπŸ“ƒ through REST APIs in v0.29! πŸŽ‰

  • 05/01/2025 v0.28 transforming Answer Engine messages into persistent, shareable Pages

  • 03/31/2025 v0.27 released with a richer @ menu in the chat side panel.

    Archived

  • 02/05/2025 LDAP Authentication and better notification for background jobs coming in Tabby v0.24.0!✨

  • 02/04/2025 VSCode 1.20.0 upgrade! @-mention files to add them as chat context, and edit inline with a new right-click option are available!

  • 01/10/2025 Tabby v0.23.0 featuring enhanced code browser experience and chat side panel improvements!

  • 12/24/2024 Introduce Notification Box in Tabby v0.22.0!

  • 12/06/2024 Llamafile deployment integration and enhanced Answer Engine user experience are coming in Tabby v0.21.0!πŸš€

  • 11/10/2024 Switching between different backend chat models is supported in Answer Engine with Tabby v0.20.0!

  • 10/30/2024 Tabby v0.19.0 featuring recent shared threads on the main page to improve their discoverability.

  • 07/09/2024 πŸŽ‰Announce Codestral integration in Tabby!

  • 07/05/2024 Tabby v0.13.0 introduces Answer Engine, a central knowledge engine for internal engineering teams. It seamlessly integrates with dev team's internal data, delivering reliable and precise answers to empower developers.

  • 06/13/2024 VSCode 1.7 marks a significant milestone with a versatile Chat experience throughout your coding experience. Come and they the latest chat in side-panel and editing via chat command!

  • 06/10/2024 Latest πŸ“ƒblogpost drop on an enhanced code context understanding in Tabby!

  • 06/06/2024 Tabby v0.12.0 release brings πŸ”—seamless integrations (Gitlab SSO, Self-hosted GitHub/GitLab, etc.), to βš™οΈflexible configurations (HTTP API integration) and 🌐expanded capabilities (repo-context in Code Browser)!

  • 05/22/2024 Tabby VSCode 1.6 comes with multiple choices in inline completion, and the auto-generated commit messagesπŸ±πŸ’»!

  • 05/11/2024 v0.11.0 brings significant enterprise upgrades, including πŸ“Šstorage usage stats, πŸ”—GitHub & GitLab integration, πŸ“‹Activities page, and the long-awaited πŸ€–Ask Tabby feature!

  • 04/22/2024 v0.10.0 released, featuring the latest Reports tab with team-wise analytics for Tabby usage.

  • 04/19/2024 πŸ“£ Tabby now incorporates locally relevant snippets(declarations from local LSP, and recently modified code) for code completion!

  • 04/17/2024 CodeGemma and CodeQwen model series have now been added to the official registry!

  • 03/20/2024 v0.9 released, highlighting a full feature admin UI.

  • 12/23/2023 Seamlessly deploy Tabby on any cloud with SkyServe πŸ›« from SkyPilot.

  • 12/15/2023 v0.7.0 released with team management and secured access!

  • 10/15/2023 RAG-based code completion is enabled by detail in v0.3.0πŸŽ‰! Check out the blogpost explaining how Tabby utilizes repo-level context to get even smarter!

  • 11/27/2023 v0.6.0 released!

  • 11/09/2023 v0.5.5 released! With a redesign of UI + performance improvement.

  • 10/24/2023 ⛳️ Major updates for Tabby IDE plugins across VSCode/Vim/IntelliJ!

  • 10/04/2023 Check out the model directory for the latest models supported by Tabby.

  • 09/18/2023 Apple's M1/M2 Metal inference support has landed in v0.1.1!

  • 08/31/2023 Tabby's first stable release v0.0.1 πŸ₯³.

  • 08/28/2023 Experimental support for the CodeLlama 7B.

  • 08/24/2023 Tabby is now on JetBrains Marketplace!

πŸ‘‹ Getting Started

You can find our documentation here.

Run Tabby in 1 Minute

The easiest way to start a Tabby server is by using the following Docker command:

bash
docker run -it \
  --gpus all -p 8080:8080 -v $HOME/.tabby:/data \
  tabbyml/tabby \
  serve --model StarCoder-1B --device cuda --chat-model Qwen2-1.5B-Instruct

For additional options (e.g inference type, parallelism), please refer to the documentation page.

🀝 Contributing

Full guide at CONTRIBUTING.md;

Get the Code

bash
git clone --recurse-submodules https://github.com/TabbyML/tabby
cd tabby

If you have already cloned the repository, you could run the git submodule update --recursive --init command to fetch all submodules.

Build

  1. Set up the Rust environment by following this tutorial.

  2. Install the required dependencies:

bash
# For MacOS
brew install protobuf

# For Ubuntu / Debian
apt install protobuf-compiler libopenblas-dev
  1. Install useful tools:
bash
# For Ubuntu
apt install make sqlite3 graphviz
  1. Now, you can build Tabby by running the command cargo build.

Start Hacking!

... and don't forget to submit a Pull Request

🌍 Community

  • 🎀 Twitter / X - engage with TabbyML for all things possible
  • πŸ“š LinkedIn - follow for the latest from the community
  • πŸ’Œ Newsletter - subscribe to unlock Tabby insights and secrets

πŸ”† Activity

🌟 Star History


File: clients/vscode/README.md

Tabby VSCode Extension





Tabby is an open-source, self-hosted AI coding assistant designed to help you write code more efficiently.

Installation

The Tabby VSCode extension is available on the Visual Studio Marketplace and Open VSX. To install the extension in VSCode/VSCodium, launch Quick Open (shortcut: Ctrl/Cmd+P), paste the following command, and press enter:

text
ext install TabbyML.vscode-tabby

Autocomplete

Tabby suggests multi-line code completions and full functions in real-time as you write code.

Chat

Tabby can answer general coding questions and specific questions about your codebase with its chat functionality. Here are a few ways to utilize it:

  • Start a session in the chat view from the activity bar.
  • Select some code and use commands such as Tabby: Explain This to ask questions about your selection.
  • Request code edits directly by using the Tabby: Start Inline Editing command (shortcut: Ctrl/Cmd+I).

Getting Started

  1. Setup Tabby Server: Set up your self-hosted Tabby server and create your account following this guide.
  2. Connect to Server: Use the Tabby: Connect to Server... command in the command palette and input your Tabby server's endpoint URL and account token. Alternatively, use the Config File for cross-IDE settings.

That's it! You can now start using Tabby in VSCode. Use the Tabby: Quick Start command for a detailed interactive walkthrough.

Additional Resources


File: clients/vim/README.md

Tabby Plugin for Vim and Neovim

Tabby is a self-hosted AI coding assistant that can suggest multi-line code or full functions in real-time. For more information, please check out our website and GitHub.
If you encounter any problems or have any suggestions, please open an issue or join our Slack community for support.

Notable Changes in vim-tabby Plugin 2.0

Since version 2.0, the vim-tabby plugin is designed as two parts:

  1. LSP Client Extension:
    • Relies on an LSP client and extends it with methods (such as textDocument/inlineCompletion) to communicate with the tabby-agent.
    • Note: The Node.js script of tabby-agent is no longer a built-in part of the vim-tabby plugin. You need to install tabby-agent separately via npm, and the LSP client will launch it using the command npx tabby-agent --stdio.
  2. Inline Completion UI:
    • Automatically triggers inline completion requests when typing.
    • Renders the inline completion text as ghost text.
    • Sets up actions with keyboard shortcuts to accept or dismiss the inline completion.

Requirements

The Tabby plugin requires the following dependencies:

  • Tabby Server: The backend LLM server. You can install the Tabby server locally or have it hosted on a remote server. For Tabby server installation, please refer to this documentation.
  • Tabby Agent (LSP server): Requires Node.js version v18.0+ and tabby-agent installed.
    sh
    npm install tabby-agent
  • LSP Client: The Neovim built-in LSP client, or a Vim plugin that provides an LSP client. Supported LSP clients include:
    • The Neovim built-in LSP client, with the nvim-lspconfig plugin installed.
    • More clients are in development.
  • Textprop Support: Neovim, or Vim v9.0+ with +textprop features enabled. This is required for inline completion ghost text rendering.

Installation

You can install the Tabby plugin using your favorite plugin manager by simply adding TabbyML/vim-tabby to the registry.

Here is a detailed example setup with advanced options, based on Neovim, Lazy.nvim, and nvim-lspconfig.

lua
-- ~/.config/nvim/init.lua
require("lazy").setup({
  -- other plugins
  -- ...
  -- Tabby plugin
  { 
    "TabbyML/vim-tabby",
    lazy = false,
    dependencies = {
      "neovim/nvim-lspconfig",
    },
    init = function()
      vim.g.tabby_agent_start_command = {"npx", "tabby-agent", "--stdio"}
      vim.g.tabby_inline_completion_trigger = "auto"
    end,
  },
})

After setting up the plugin, you can open a file in Neovim and use :LspInfo to check if the Tabby plugin is successfully connected.

Getting Started

1. Setup Tabby Server

The Tabby plugin requires a Tabby server to work. Follow the documentation to install and create your account.

2. Connect to the Server

Edit the tabby-agent config file located at ~/.tabby-client/agent/config.toml to set up the server endpoint and token. This file may have been auto-created if you have previously used the tabby-agent or Tabby plugin for other IDEs. You can also manually create this file.

text
```toml
[server]
endpoint = "http://localhost:8080"
token = "your-auth-token"
```

3. Code Completion

Tabby suggests code completions in real-time as you write code. You can also trigger the completion manually by pressing <C-\>. To accept suggestions, simply press the <Tab> key. You can also continue typing or explicitly press <C-\> again to dismiss it.

Known Conflicts

  • Tabby will attempt to set up the <Tab> key mapping to accept the inline completion and will fall back to the original function mapped to it. There could be a conflict with other plugins that also map the <Tab> key. In such cases, you can use a different keybinding to accept the completion to avoid conflicts.

  • Tabby internally utilizes the <C-R><C-O> command to insert the completion. If you have mapped it to other functions, the insertion of the completion text may fail.

Configurations

You can find a detailed explanation of tabby-agent configurations in the Tabby online documentation.

Here is a table of all configuration variables that can be set when the Tabby plugin initializes:

Variable Default Description
g:tabby_agent_start_command ["npx", "tabby-agent", "--stdio"] The command to start the tabby-agent
g:tabby_inline_completion_trigger "auto" The trigger mode of inline completion, can be "auto" or "manual"
g:tabby_inline_completion_keybinding_accept "<Tab>" The keybinding to accept the inline completion
g:tabby_inline_completion_keybinding_trigger_or_dismiss "<C-\>" The keybinding to trigger or dismiss the inline completion
g:tabby_inline_completion_insertion_leading_key "\<C-R>\<C-O>=" The leading key sequence to insert the inline completion text

Contributing

Repository TabbyML/vim-tabby is for releasing Tabby plugin for Vim and Neovim. If you want to contribute to Tabby plugin, please check our main repository TabbyML/tabby.

License

Apache-2.0


File: clients/tabby-threads/README.md

Tabby-Threads

Tabby-Threads is an internally customized version of @quilted/threads 2.2.0, specifically designed for the Tabby project. This library adapts and extends the functionality of @quilted/threads to better meet the unique requirements of the project.

Purpose

  • Internal Use Only: This library is strictly for use within the Tabby project and is not intended for external distribution or public usage.
  • Custom Enhancements: Includes modifications and optimizations tailored for Tabby’s specific use cases.
  • No External Support: As an internal tool, tabby-threads does not include usage documentation or external support.

Foundation

Tabby-Threads builds upon @quilted/threads 2.2.0, inheriting its core features:

  • Cross-thread communication via multiple mechanisms like Worker, MessagePort, and BroadcastChannel.
  • Robust TypeScript support with thread-safe APIs.

For further details on the underlying framework, refer to the official @quilted/threads documentation.


File: clients/tabby-agent/README.md

Tabby Agent

The tabby-agent is an agent used for communication with the Tabby server. It is based on Node.js v18 and runs as a language server.

Breaking Changes: The tabby-agent will only support running as a language server since version 1.7.0.

The tabby-agent mainly supports the following features of LSP:

  • Completion (textDocument/completion)
  • Inline Completion (textDocument/inlineCompletion, since LSP v3.18.0)

For collecting more context to enhance the completion quality or providing more features like inline chat editing, the tabby-agent extends the protocol with some custom methods starting with tabby/*. These methods are used in Tabby-provided editor extensions.

Usage

Note: For VSCode, IntelliJ Platform IDEs, and Vim/NeoVim, it is recommended to use the Tabby-provided extensions, which run the Tabby Agent underlying.

The following guide is only for users who want to set up the tabby-agent as a language server manually.

Start the Language Server

bash
npx tabby-agent --stdio

Connect the IDE to the tabby-agent

Since most text editors have their built-in LSP clients or popular LSP client plugins, you can easily connect to the tabby-agent from your editor. Here are some example configurations for popular editors.

Vim/Neovim (coc.nvim)

There are several Vim plugins that provide LSP support. One of them is coc.nvim. To use the tabby-agent as a language server, you can add the following code to your :CocConfig.

json
{
  "languageserver": {
    "tabby-agent": {
      "command": "npx",
      "args": ["tabby-agent", "--stdio"],
      "filetypes": ["*"]
    }
  }
}

Emacs

The package lsp-mode provides an LSP client for Emacs. You can add the following code to your Emacs configuration script to use the tabby-agent as a language server.

emacs-lisp
(with-eval-after-load 'lsp-mode
  (lsp-register-client
    (make-lsp-client  :new-connection (lsp-stdio-connection '("npx" "tabby-agent" "--stdio"))
                      ;; you can select languages to enable Tabby language server
                      :activation-fn (lsp-activate-on "typescript" "javascript" "toml")
                      :priority 1
                      :add-on? t
                      :server-id 'tabby-agent)))

Helix

Helix has built-in LSP support. To use the tabby-agent as a language server, you can add the following code to your languages.toml.

toml
[language-server.tabby]
command = "npx"
args = ["tabby-agent", "--stdio"]

# Add Tabby as the second language server for your specific languages
[[language]]
name = "typescript"
language-servers = ["typescript-language-server", "tabby"]

[[language]]
name = "toml"
language-servers = ["taplo", "tabby"]

More Editors

You are welcome to contribute by adding example configurations for your favorite editor. Please submit a PR with your additions.

Configurations

Please refer to the configuration documentation for more details.

License

Copyright (c) 2023-2024 TabbyML, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

text
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


File: clients/intellij/README.md

Tabby Plugin for IntelliJ Platform


Tabby is an AI coding assistant that can suggest multi-line code or full functions in real-time.

Tabby IntelliJ Platform plugin works with all IntelliJ Platform IDEs that have build 2023.1 or later versions, such as IDEA, PyCharm, GoLand, Android Studio, and more.

Getting Started

  1. Set up the Tabby Server: you can build your self-hosted Tabby server following this guide.
  2. Install Tabby plugin from JetBrains Marketplace.
  3. Install Node.js version 18.0 or higher.
  4. Open the settings by clicking on the Tabby plugin status bar item and select Open Settings....
    1. Fill in the server endpoint URL to connect the plugin to your Tabby server.
    • If you are using default port http://localhost:8080, you can skip this step.
    1. If your Tabby server requires an authentication token, set your token in settings. Alternatively, you can set it in the config file.
    2. Enter the node binary path into the designated field
    • If node binary is already accessible via your PATH environment variable, you can skip this step.
    • Remember to save the settings and restart the IDE if you made changes to this option.
  5. Check the Tabby plugin status bar item, it should display a check mark if the plugin is successfully connected to the Tabby server.

Troubleshooting

If you encounter any problem, please check out our troubleshooting guide.

Development and Build

To develop and build Tabby plugin, please clone this directory and import it into IntelliJ Idea.


File: clients/example-vscode-lsp/README.md

This example has been outdated and removed.

As of tabby-agent v1.7, the Language Server Protocol (LSP) has become the only supported method to connect to tabby-agent.
For examples of creating IDE extensions that connect with tabby-agent using LSP, please refer to the source code of our IDE extensions:


File: clients/eclipse/README.md

Tabby Plugin for Eclipse

Note: This repository is currently undergoing extensive development.

Development Setup

  1. Install Eclipse with the Plug-in Development Environment (PDE). It is recommended to download the Eclipse IDE for Eclipse Committers for a more streamlined setup.

  2. Ensure you have Node.js version 18 or higher installed. For package management, install pnpm. Using corepack is the preferred method for installation.

  3. Clone the Tabby repository and install its dependencies:

    bash
    git clone https://github.com/TabbyML/tabby.git
    cd tabby
    pnpm install
    cd clients/eclipse
    pnpm turbo build

    This process will also build the tabby-agent and place it into the clients/eclipse/plugin/tabby-agent/ directory.

  4. Import the project into your Eclipse workspace.
    a. Open File -> Import..., select the General -> Existing Projects into Workspace option, and click Next.

b. Select the clients/eclipse/plugin as the root directory, check the item to be imported, and click Finish.

c. Then import the clients/eclipse/feature directory as well.

  1. Open the clients/eclipse/plugin/plugin.xml file in Eclipse. It should open as a plugin project overview. In the Testing section, click on Launch an Eclipse application to start the plugin.

Export a ZIP Archive

  1. In Eclipse, open File -> Export..., select the Plug-in Development -> Deployable features option, and click Next.

  2. Check the com.tabbyml.features.tabby4eclipse, then select Archive file with a specified file path, and click Finish.

  3. The exported ZIP archive should be located at the specified file path. It can be installed by navigating to Help -> Install New Software....


File: crates/tabby-index-cli/README.md

tabby-index-cli

A cli tool to help debugging tabby's index, deriving from https://github.com/quickwit-oss/tantivy-cli