IDE Integration
Tabnine CLI integrates with Visual Studio Code and other VS Code-based editors through the Tabnine CLI Companion extension. Once connected, the CLI is aware of your open files, cursor position, and text selection, and can open a native in-editor diff view so you can review and apply AI-generated code changes without leaving the editor.
For related commands and configuration, see Commands, Settings, and Settings Reference.
VS Code-based IDEs only. The companion is a VS Code extension (.vsix) and cannot be installed into JetBrains IDEs, Eclipse, Zed, Xcode, Sublime Text, or any other non-VS Code editor. Support for JetBrains and other editors is planned through the Agent Client Protocol (ACP) registry, but is not yet available.
Supported IDEs
Tabnine CLI provides a one-command installer (/ide install) for Visual Studio Code, Positron, Firebase Studio, and Antigravity.
The companion runs in any VS Code-compatible host (engine ^1.99.0), so other VS Code forks such as Cursor and Windsurf are also supported. For those forks, /ide install will report "No installer is available" and you must install the companion manually. See Manual installation from a .vsix file below.
Features
When the companion is installed and the IDE connection is enabled, Tabnine CLI gains the following capabilities.
Workspace context
Tabnine CLI automatically receives real-time workspace signals from the editor to make responses more relevant. Signals include the 10 most recently accessed files in your workspace, your active cursor position, and any text you have selected (up to 16 KiB; selections longer than 16 KiB are truncated).
Only local files on disk are included. Unsaved buffers and remote files are excluded.
Native diffing
When Tabnine suggests modifications to a file, it opens the change in your IDE's native diff viewer. You can review, edit, and then accept or reject the suggested changes directly in the editor. See Working with diffs below for the full list of accept and reject actions.
VS Code commands
The companion contributes the following commands to the VS Code Command Palette (Cmd+Shift+P or Ctrl+Shift+P):
Tabnine CLI: Run
Opens an integrated terminal in the selected workspace folder and starts tabnine.
Tabnine CLI: Accept Diff
Accepts the changes in the active Tabnine diff editor. Visible only while a diff is open.
Tabnine CLI: Close Diff Editor
Rejects the changes and closes the active Tabnine diff editor. Visible only while a diff is open.
Tabnine CLI: View Third-Party Notices
Displays the third-party notices bundled with the extension.
Installation and setup
There are three ways to install the companion extension: the first-launch prompt, /ide install from inside the CLI, or a manual .vsix install.
Automatic prompt
The first time you launch tabnine inside a supported VS Code-based IDE, the CLI detects the environment and prompts you to connect. Answering Yes runs the equivalent of /ide install and enables the integration automatically. If you previously dismissed the prompt, you can always install the companion using one of the methods below.
Install from the CLI
Run the following command inside an active Tabnine CLI session:
This downloads the companion .vsix from your configured Tabnine host and installs it into the detected IDE using the IDE's code (or positron / agy) command-line tool. After a successful install, Tabnine CLI sets ide.enabled to true and connects.
Prerequisites
Your IDE's command-line launcher must be on PATH. For VS Code this is code (or code.cmd on Windows); for Positron it is positron; for Antigravity it is agy or antigravity. See the VS Code CLI setup guide if code is not recognized.
Your Tabnine host must also be reachable from the machine running the CLI.
Manual installation from a .vsix file
Use this path when you are on a VS Code-based editor (VS Code, Positron, Firebase Studio, Antigravity, Cursor, Windsurf, or another VS Code fork) and /ide install cannot find your editor's command-line launcher. The companion is a VS Code extension, so this path applies only to VS Code-compatible hosts; do not attempt to side-load the .vsix into JetBrains, Eclipse, or other non-VS Code IDEs.
Download the .vsix
Download the companion package from your Tabnine host. Replace <YOUR TABNINE HOST> with the Tabnine console URL configured for your team (for example, https://console.tabnine.com):
Install the extension
In VS Code, open the Command Palette and run Extensions: Install from VSIX…, then select the downloaded file.
From the command line, run the following to install the downloaded .vsix directly:
For Positron, substitute positron for code. For Antigravity, substitute agy.
Enable the integration
After the extension finishes installing, open a new terminal inside your IDE and run:
This sets ide.enabled to true and establishes the connection.
Managing the connection
You can control the IDE connection from within the CLI at any time. Run /ide enable to connect, or /ide disable to stop using the integration. Both commands persist the ide.enabled value to your user settings at ~/.tabnine/agent/settings.json, so the choice is remembered for future sessions.
To see the current connection status and the workspace context the CLI has received, run:
If the integration is connected, this command reports the connected IDE and lists the recently opened files Tabnine CLI is aware of. The list is capped at 10 files and only includes local files on disk.
Working with diffs
When Tabnine CLI proposes a file change, it opens a diff view in your editor instead of writing to disk directly. You can review, edit, and then accept or reject the proposal.
To accept a diff, save the file with Cmd+S or Ctrl+S, click the checkmark icon in the diff editor's title bar, run Tabnine CLI: Accept Diff from the Command Palette, or type yes at the CLI confirmation prompt. While a diff is open, the save shortcut accepts the change instead of writing to disk, so an ordinary save inside the diff editor commits the suggestion.
To reject a diff, click the x icon in the diff editor's title bar, close the diff editor tab, run Tabnine CLI: Close Diff Editor from the Command Palette, or type no at the CLI confirmation prompt.
You can also edit the suggested changes directly inside the diff view before accepting them. If you select Allow for this session at the CLI prompt, future changes are auto-accepted for the remainder of the session without opening the diff editor.
Running in a sandboxed or containerized environment
The IDE integration relies on a local HTTP connection between the CLI and the companion, which means sandboxes and containers need to allow that traffic. For general sandboxing behavior in Tabnine CLI, see Sandboxing.
On macOS, the default Seatbelt profile blocks the loopback traffic the integration needs; use a Seatbelt profile that permits network access.
In Docker or Podman, the CLI automatically falls back to host.docker.internal to reach the companion running on the host. No extra configuration is usually needed, but your container networking must permit container-to-host connections.
Troubleshooting
Last updated
Was this helpful?
