Install
Beta · Tabnine plugin for OpenCode v0.5.1
Follow these steps to install the Tabnine plugin for opencode and get the tabnine-opencode command working in your terminal. For an introduction, see Tabnine Plugin for OpenCode.
Before you install
Download the installer for your platform from the Tabnine OpenCode releases:
macOS
x64, arm64
tabnine-opencode-<version>-darwin-<arch>.run
Linux
x64, arm64
tabnine-opencode-<version>-linux-<arch>.run
Windows
x64, arm64
tabnine-opencode-<version>-windows-<arch>.exe
There's nothing to install first:
The installer is fully self-contained. It installs Tabnine's own private copy of opencode under
~/.tabnine/opencode, and never depends on or disturbs an opencode you already have.On Windows, the installer runs on Windows PowerShell 5.1, which is preinstalled on Windows 10 and 11.
Run the installer
Choose your Tabnine host
When prompted, choose your Tabnine host (see Choose your Tabnine host below). Press Enter to accept the default.
Optionally add the plugin to your own opencode
If you already have your own opencode installed and configured, the installer asks: "Add the Tabnine plugin to your existing opencode config at <dir>? [Y/n]" (see Add the plugin to your own opencode below).
Sign in
When the installer starts the sign-in, choose Login with Tabnine (browser) and complete the sign-in in your browser, or choose Paste Tabnine access token (PAT) and paste a token instead.
If it doesn't complete, the installer prints Sign-in did not complete; run 'tabnine-opencode auth login' later. You can sign in any time afterward.
To pass installer flags, add them after a -- separator:
sh tabnine-opencode-<version>-<os>-<arch>.run -- --host https://tabnine.customer.com --no-loginThe Windows installer is a self-extracting .exe: it unpacks to a temporary folder, runs the installer, and cleans up after itself.
Choose your Tabnine host
The installer prompts:
Tabnine SaaS: press Enter to use the default,
https://console.tabnine.com.Private installation: enter your Tabnine console URL. Replace tabnine.customer.com with your Tabnine cluster domain (a value without a scheme automatically gets
https://prepended).You can also set the host up front with
--host <url>(Windows:-TabnineHost <url>).On an upgrade, the previously chosen host is kept.
What the installer changes on your machine
Install location: everything lives in one self-contained tree,
~/.tabnine/opencode(Windows:%USERPROFILE%\.tabnine\opencode), containing the private opencode binary (bin/), the Tabnine plugin (plugin/), the Tabnine config directory (config/), and theinstall.jsoninstall marker.Launcher: the
tabnine-opencodecommand is installed to~/.local/bin/tabnine-opencode(Windows:%USERPROFILE%\.local\bin\tabnine-opencode.cmdplus a.ps1it runs).PATH: on macOS and Linux, the installer makes sure the launcher directory (
~/.local/bin) is on yourPATH. If it isn't already there, the installer appends a small block to your shell config file (~/.bashrc,~/.zshrc, or fish'sconfig.fish), wrapped in# Tabnine-Opencode installermarker comments so the uninstaller can remove it cleanly. If~/.local/binis already on yourPATH, no shell config change is made, so you won't find that marker block. Other shells get a warning asking you to add~/.local/bintoPATHyourself. On Windows, the installer appends the launcher directory to your user-scopePathenvironment variable and records that it did, so the uninstaller only removes what it added. Skip all PATH changes with--no-modify-path/-NoModifyPath.Sign-in state is shared: credentials are stored in opencode's shared data directory (
~/.local/share/opencode/auth.json), not inside the Tabnine tree. One Tabnine sign-in covers both the Tabnine copy and your own opencode, if you added the plugin there.
Your own opencode installation and its config are never modified unless you explicitly accept the offer below.
Optional: add the plugin to your own opencode
If the installer detects your own opencode plus an existing opencode config, it offers:
Accepting registers the Tabnine plugin in your own opencode's config without the Tabnine provider lockdown. Your other providers keep working there, and you also get Tabnine sign-in and Tabnine models in your own opencode. The step is idempotent, so re-running the installer won't duplicate the entry. Declining changes nothing outside the Tabnine tree.
Installer options
Pass flags after -- when running the .run file:
--host <url>(also--host=<url>): set the Tabnine host without being prompted.--no-login: skip the sign-in step.--login: run the sign-in step even when it would normally be skipped (for example, on an upgrade).--force/-y: non-interactive. Accept all prompts with their defaults.--no-modify-path: don't touch your shell config file.
Unknown options print Ignoring unknown option: <opt> and are skipped.
Pass parameters directly to the .exe:
-TabnineHost <url>(alias-Host): set the Tabnine host without being prompted.-NoLogin: skip the sign-in step.-Login: run the sign-in step even when it would normally be skipped.-Force(aliases-y,-Yes): non-interactive. Accept all prompts with their defaults.-NoModifyPath: don't touch your userPathvariable.
Unknown arguments print a warning and are ignored. Non-interactive runs use the same defaults as macOS/Linux.
Verify the installation
Open a new shell so the PATH change is picked up and run:
You should see the installed version, for example:
This works even before you sign in. You're all set. Launch the agent with tabnine-opencode and follow the Tabnine x OpenCode quickstart.
Updates and versioning
You install a new version by running a newer installer over your existing install.
Check your version
Run:
--version(or-v) reports the Tabnine bundle version, read from the plain-text file~/.tabnine/opencode/plugin/VERSION(%USERPROFILE%\.tabnine\opencode\plugin\VERSIONon Windows). It works even on a broken or partial install, with no opencode binary needed.If the
VERSIONfile is missing, the command printstabnine-opencode (version unknown: <path> not found)and still exits successfully.To see the version of the underlying opencode, run
/tabnineinside the TUI to open the About Tabnine dialog. See Tabnine x OpenCode.
Install a newer version
Download the newer installer and run it over your existing install. There's no need to uninstall first.
You get a confirmation prompt such as "Upgrade Tabnine opencode v<old> -> v<new>?" (or a downgrade or "Reinstall (repair)?" prompt, depending on the versions).
Your sign-in is preserved: the sign-in step is skipped on upgrades, and your previously chosen host is reused.
The steps are the same as a first install. See Run the installer above.
Uninstall
The uninstaller ships inside the .run installer file. Extract it without installing, then run it:
Options:
--purge: also clears the Tabnine sign-in from the shared opencodeauth.json(other providers' credentials are kept).--yes/-y: run without confirmation prompts.
The uninstaller is kept inside the install tree (the .exe deletes itself after extracting). Run the .ps1 directly:
Parameters:
-Purge: also clears the Tabnine sign-in from the shared opencodeauth.json.-Yes(alias-y): run without confirmation prompts.
Uninstalling removes only Tabnine-owned artifacts: the tabnine-opencode launcher, the PATH changes the installer made, the Tabnine plugin entry from your own opencode config (if you added it), and the whole ~/.tabnine/opencode tree. Your own opencode and your sign-in and session data stay untouched unless you pass --purge / -Purge.
Next, sign in and pick a model. For common fixes, see Troubleshooting.
Last updated
Was this helpful?
