LatentCode

Getting started

The installer already connected LatentCode to your gateway — add your API key, open the TUI, and you're working.

1 · Add your API key

The installer already pointed LatentCode at your gateway, so there's just one thing left: your personal API key (it starts with ls- and lives on your Console account page). Add it either way:

From the terminal — LatentCode imports the models you're allowed to use automatically:

$latentcode config set api-key ls-your-key

Or just start LatentCode: the first time you run it without a key, it shows a prompt asking you to paste your ls- key, and then you're connected.

Check the connection and the models available to your tier at any time:

$latentcode config
Installed manually?
If you installed LatentCode yourself rather than via the stack installer, point it at your gateway once — the URL must end in /v1:
$latentcode config set base-url https://latentstack.dev/v1

2 · Start the TUI

Run LatentCode from inside the project you want to work on:

$latentcode

You land in a session. Type what you want in plain language — "add pagination to the users endpoint", "why is this test flaky?", "explain how auth works here" — and press Enter. LatentCode reads the relevant files, proposes changes as diffs, and asks before running commands or editing.

3 · Choose the right agent

LatentCode ships with a few built-in agents. Switch between the two main ones with tab:

AgentWhat it does
buildThe default. Full access — reads, edits, and runs commands (with your approval).
planRead-only. Investigates and proposes a plan without touching files — great for scoping work first.
generalA subagent for deep multi-file searches. Mention @general in a message to delegate to it.

4 · Pick a model

Type /models in the chat (or press ctrl+x then m) to open the model picker and choose from the models your tier allows — your choice applies to the current session.

To set a default model for new sessions instead:

$latentcode config set default-model anthropic/claude-sonnet-4-5

Models are addressed as provider/model. To list everything your tier allows from the terminal:

$latentcode models

Next steps

  • Learn the interface in Using the TUI — agents, keybindings, and slash commands.
  • Automate runs from scripts with the CLI reference.
  • Give the agent long-running objectives with Goals, on the Features page.