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 | bashThe 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.
| Component | What it is | Skip it with |
|---|---|---|
| latentcode | The LatentCode terminal agent: a single self-contained executable. Node.js and npm are not needed. | --desktop-only / -DesktopOnly |
| LatentWork | The desktop app, with an app menu, Launchpad or Start Menu entry. | --cli-only / -CliOnly |
| Editor extension | The 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 |
| Skills | The built-in skills bundle. | --no-skills / -NoSkills |
Requirements
| macOS | Linux | Windows | |
|---|---|---|---|
| latentcode | Apple silicon (arm64) or Intel (x64) | x64 or arm64 | x64 or arm64 |
| LatentWork | .dmg build | Linux build | NSIS installer (.exe) build |
| Tools used | curl (or wget), tar | curl (or wget), tar | PowerShell |
- 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
curlon macOS and Linux; with onlywgetinstalled, the CLI still installs but LatentWork is skipped.
Where files go
| Path | Contents |
|---|---|
| ~/.latentcode/bin/latentcode | The CLI |
| ~/.latentcode/plugins/skills/ | Built-in skills |
| ~/.latentcode/vscode/latentcode.vsix | The downloaded editor extension |
| /Applications/LatentWork.app | The desktop app. If /Applications isn't writable, ~/Applications/LatentWork.app. |
| ~/.config/latentcode/latentcode.jsonc | LatentCode settings, including the gateway URL and API key |
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/v1LatentWork asks for its own connection on first launch. See LatentWork.
Verify the install
- 1Check the CLI is on your PATH$
latentcode --versionIt prints a version number. If the command isn't found, open a new terminal.
- 2Check the connection$
latentcode configLatentRouter 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 importedgateway urlis your server,api keyis set, andmodelsshows a count. The key is always shown masked. LatentRouter is LatentCode's name for your LatentStack gateway. - 3List your models$
latentcode config models --refreshThis re-imports your models from the gateway, which also proves the key works. An
Invalid API keywarning means the key is wrong or was regenerated.
Installer options
--cli-onlyflagoptional--desktop-onlyflagoptional--no-vscodeflagoptional--no-skillsflagoptional--base URLstringoptional--base https://ai.example.com. The CLI's gateway URL is set to URL/v1.-CliOnlyswitchoptional-DesktopOnlyswitchoptional-NoVscodeswitchoptional-NoSkillsswitchoptional-Base URLstringoptionalBoth scripts also read the LATENTSTACK_BASE environment variable as the download server. An explicit --base or -Base wins over it.
Upgrade
To update LatentCode, run:
latentcode upgradeIt 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 | bashThe 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| bash | PowerShell | Effect |
|---|---|---|
| --dry-run | -DryRun | Print what would be removed and change nothing. |
| --keep-data | -KeepData | Remove the apps only. Keep settings, sessions and caches. |
| --no-vscode | -NoVscode | Leave the editor extension installed. |
What's removed
| Item | macOS and Linux | Windows |
|---|---|---|
| CLI and skills | ~/.latentcode | %USERPROFILE%\.latentcode, and its Path entry |
| LatentWork | LatentWork.app (macOS), or ~/.local/share/LatentWork and its menu entry (Linux) | Runs the app's own uninstaller silently |
| Editor extension | Uninstalled from every supported editor found | Same |
| LatentCode data (not with --keep-data) | latentcode under ~/.config, ~/.local/share, ~/.cache and ~/.local/state | The same folders under %USERPROFILE% |
| LatentWork data (not with --keep-data) | Its app data, cache and log folders | Its folders under %APPDATA% and %LOCALAPPDATA% |
| Shell PATH lines | LatentStack 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.