Get started

Install

One command installs the LatentCode CLI, the LatentWork desktop app and the editor extension, all downloaded from your own LatentStack server.

Quick install

Run this in a terminal on the machine you want to set up. You don't need administrator rights.

curl -fsSL https://latentstack.dev/install.sh | bash

The commands on this page point at https://latentstack.dev, the server these docs are served from. The installer downloads everything from that same server, so nothing is fetched from a third party, and it sets that server as LatentCode's gateway.

When it finishes, the installer prints a summary like this:

Done.

  Coding agent (terminal): latentcode
  Desktop app:             LatentWork (in your app menu / Launchpad)
  Editor extension:        LatentCode (VS Code / Cursor / VSCodium / Windsurf / code-server)

  Your gateway URL is already configured (https://latentstack.dev/v1).
  On first launch, just paste your API key — or set it now:
    latentcode config set api-key  ls-your-key-here (from your account page)

Open a new terminal so the updated PATH takes effect, then continue with Connect to your gateway.

What gets installed

Each part is optional and installed independently. If one part fails, the installer warns and carries on.

ComponentWhat it isSkip it with
latentcodeThe LatentCode terminal agent: a single self-contained executable. Node.js and npm are not needed.--desktop-only / -DesktopOnly
LatentWorkThe desktop app, with an app menu, Launchpad or Start Menu entry.--cli-only / -CliOnly
Editor extensionThe LatentCode extension, installed into every supported editor found on the machine: VS Code, VS Code Insiders, VSCodium, Cursor, Windsurf and code-server.--no-vscode / -NoVscode
SkillsThe built-in skills bundle.--no-skills / -NoSkills
Your administrator may have narrowed the default
A deployment can be set to install only the CLI, only the desktop app, or no editor extension. If the summary doesn't list a component, it was left out on purpose.

Requirements

macOSLinuxWindows
latentcodeApple silicon (arm64) or Intel (x64)x64 or arm64x64 or arm64
LatentWork.dmg buildLinux buildNSIS installer (.exe) build
Tools usedcurl (or wget), tarcurl (or wget), tarPowerShell
  • The installer picks the right build for your machine.
  • If your server doesn't offer a build for your machine, the installer says so and skips that component. Ask your administrator.
  • The desktop app step needs curl on macOS and Linux; with only wget installed, the CLI still installs but LatentWork is skipped.

Where files go

PathContents
~/.latentcode/bin/latentcodeThe CLI
~/.latentcode/plugins/skills/Built-in skills
~/.latentcode/vscode/latentcode.vsixThe downloaded editor extension
/Applications/LatentWork.appThe desktop app. If /Applications isn't writable, ~/Applications/LatentWork.app.
~/.config/latentcode/latentcode.jsoncLatentCode settings, including the gateway URL and API key

PATH

On macOS and Linux, the installer adds ~/.latentcode/bin to PATH in the startup file of your current shell: ~/.zshrc, ~/.bashrc, ~/.config/fish/config.fish, or ~/.profile for other shells. The line ends with # added by LatentStack installer. On Windows, it adds the folder to your user Path.

Connect to your gateway

The installer sets LatentCode's gateway URL to https://latentstack.dev/v1. The only thing left is your API key, which you copy from Account settings → API Key in the console (see Quickstart). Either paste it when LatentCode first starts, or set it now:

$latentcode config set api-key ls-your-key
✓ API key saved → /home/you/.config/latentcode/latentcode.jsonc
✓ Imported 6 model(s) (tier: <your tier>)

Setting the key also imports the models your tier allows. If the installer printed Gateway URL was NOT pre-configured, set the URL first:

$latentcode config set base-url https://latentstack.dev/v1

LatentWork asks for its own connection on first launch. See LatentWork.

Verify the install

  1. 1
    Check the CLI is on your PATH
    $latentcode --version

    It prints a version number. If the command isn't found, open a new terminal.

  2. 2
    Check the connection
    $latentcode config
    LatentRouter connection
      config        /home/you/.config/latentcode/latentcode.jsonc
      gateway url   https://latentstack.dev/v1
      api key       ls-AbCdE…wXyZ
      default model latentrouter/…
      only provider latentrouter
      models        6 imported

    gateway url is your server, api key is set, and models shows a count. The key is always shown masked. LatentRouter is LatentCode's name for your LatentStack gateway.

  3. 3
    List your models
    $latentcode config models --refresh

    This re-imports your models from the gateway, which also proves the key works. An Invalid API key warning means the key is wrong or was regenerated.

Installer options

install.sh (macOS and Linux)
--cli-onlyflagoptional
Install only latentcode. Skips the desktop app and the editor extension.
--desktop-onlyflagoptional
Install only LatentWork. Skips latentcode and the editor extension.
--no-vscodeflagoptional
Skip the editor extension.
--no-skillsflagoptional
Skip the skills bundle.
--base URLstringoptional
Download from a different server, for example --base https://ai.example.com. The CLI's gateway URL is set to URL/v1.
install.ps1 (Windows)
-CliOnlyswitchoptional
Install only latentcode.
-DesktopOnlyswitchoptional
Install only LatentWork.
-NoVscodeswitchoptional
Skip the editor extension.
-NoSkillsswitchoptional
Skip the skills bundle.
-Base URLstringoptional
Download from a different server.

Both scripts also read the LATENTSTACK_BASE environment variable as the download server. An explicit --base or -Base wins over it.

Passing options

A piped script needs a little extra syntax to receive options. In bash, put them after bash -s --. In PowerShell, iex can't pass parameters, so create a script block instead:

curl -fsSL https://latentstack.dev/install.sh | bash -s -- --cli-only

Desktop app only, without the rest

The desktop step is also served as its own script. It installs LatentWork and its menu entry and nothing else. On Windows, -Silent runs the app's installer without prompts.

curl -fsSL https://latentstack.dev/install-desktop.sh | bash

Upgrade

To update LatentCode, run:

$latentcode upgrade

It downloads the installer from the gateway you're connected to and runs it again, which installs the latest version your server has. The LatentCode TUI also checks for a new version when it starts: patch releases install automatically, and larger releases show a notice. To turn this off, set "autoupdate": false (or "notify" to be told without installing) in latentcode.jsonc, or set LATENTCODE_DISABLE_AUTOUPDATE=1.

To update everything, including LatentWork and the editor extension, run the install command again. Re-running is safe: it replaces the binaries, reinstalls the extension over the old one and swaps in the new skills bundle. Close LatentCode and LatentWork first, or the skills step may report that it couldn't replace the folder.

Uninstall

curl -fsSL https://latentstack.dev/uninstall.sh | bash

The uninstaller removes the CLI, the desktop app, the editor extension, and all LatentCode and LatentWork settings, sessions and caches, including your saved API key. Preview it first with a dry run:

curl -fsSL https://latentstack.dev/uninstall.sh | bash -s -- --dry-run
bashPowerShellEffect
--dry-run-DryRunPrint what would be removed and change nothing.
--keep-data-KeepDataRemove the apps only. Keep settings, sessions and caches.
--no-vscode-NoVscodeLeave the editor extension installed.

What's removed

ItemmacOS and LinuxWindows
CLI and skills~/.latentcode%USERPROFILE%\.latentcode, and its Path entry
LatentWorkLatentWork.app (macOS), or ~/.local/share/LatentWork and its menu entry (Linux)Runs the app's own uninstaller silently
Editor extensionUninstalled from every supported editor foundSame
LatentCode data (not with --keep-data)latentcode under ~/.config, ~/.local/share, ~/.cache and ~/.local/stateThe same folders under %USERPROFILE%
LatentWork data (not with --keep-data)Its app data, cache and log foldersIts folders under %APPDATA% and %LOCALAPPDATA%
Shell PATH linesLatentStack lines in your shell startup files. A backup is kept as <file>.latentstack-bak.The user Path entry

The uninstaller doesn't remove the ~/.local/bin line some shells have, because other tools use that folder. When it finishes, open a new terminal.

Troubleshooting

latentcode: command not found

The installer added ~/.latentcode/bin to your shell startup file, but open terminals don't see it yet. Open a new terminal, or run source ~/.zshrc (or your shell's file). You can always run the CLI by its full path, ~/.latentcode/bin/latentcode.

No latentcode binary available on … for this machine

Your server doesn't have a build for your OS and CPU. The message lists the builds it tried. Ask your administrator to add the missing one.

LatentWork desktop app couldn't be installed

Your server has no desktop build for your platform, or the download failed. The CLI is unaffected. Ask your administrator whether your server offers LatentWork for your platform.

Installed to ~/Applications (no permission for /Applications)

A piped script can't ask for your password, so on macOS the app went into your personal Applications folder instead. It works the same way and still shows in Launchpad and Spotlight.

Windows blocks latentcode.exe

Windows SmartScreen shouldn't block it, but AppLocker or WDAC policies that block unsigned programs can: ask your IT team to allow %USERPROFILE%\.latentcode\bin\latentcode.exe.

Could not replace latentcode.exe — is latentcode running?

Close every LatentCode window and run the installer again. A restart releases the file if it's still locked.

Native skills: could not replace … is latentcode or LatentWork running?

Close LatentCode and LatentWork and run the installer again. Your existing skills are left as they were.

No supported editor found

The extension was downloaded to ~/.latentcode/vscode/latentcode.vsix but no editor command was found. On macOS, run Shell Command: Install 'code' command in PATH from VS Code's Command Palette and run the installer again, or run Extensions: Install from VSIX... in your editor and pick that file.

No download server configured

The script was run from a saved copy rather than from the server. Run it through the install command, or pass --base https://your-server.

For connection and API errors after installing, see Troubleshooting.