Skip to Content
Latch Docs

Quickstart

Install Latch in your agent and run an existing project check at the end of a changed turn.

Start in a Git project with a command you already run, such as a linter.

  1. Install the plugin for your agent and open a new session.
  2. Tell Latch what to run. Use latch.json for any command, or use the supported package script names with no config file.
  3. Verify your first check with a change that makes it fail. Passing checks are quiet by default.

For terminal or CI use, start with the standalone CLI.

Install a plugin

Install Latch in your agent on macOS or glibc Linux (ARM64 and x64). On first use, the plugin downloads and verifies the matching Latch binary. Open a new session in your Git project after installing.

Codex · Claude Code · Copilot · Pi · OpenCode · Grok · Kimi · OpenHands

Codex

codex plugin marketplace add BarakChamo/latch
codex plugin add latch@latch-tools

If Codex says latch-tools is already added from a different source, run codex plugin marketplace remove latch-tools, then rerun the two commands above.

Open a new Codex session in your project. Choose Review hooks if Codex prompts at startup, or open /hooks in the session. Approve the Latch hooks there.

Claude Code

claude plugin marketplace add BarakChamo/latch
claude plugin install latch@latch-tools

Open a new Claude Code session in your project.

GitHub Copilot CLI

copilot plugin marketplace add BarakChamo/latch
copilot plugin install latch@latch-tools

Pi

Use Pi 1.5.2 or later.

pi install git:github.com/BarakChamo/latch

OpenCode

Check your version with opencode --version.

OpenCode v2.3.2 or later

opencode plugin add 'github:BarakChamo/latch'

For a new install on OpenCode v1, upgrade to v2. OpenCode details

Grok Build

grok plugin install BarakChamo/latch --trust

Verified with Grok Build 1.0.92.

Kimi Code

In Kimi Code, run the command below. Choose Trust and install, then run /reload.

/plugins install https://github.com/BarakChamo/latch/tree/main

OpenHands

In Agent Canvas, open Customize → Plugins → Add plugin. Enter github:BarakChamo/latch as the source and select Install.

For OpenHands CLI, install the standalone Latch binary and run latch install openhands in your Git project.

Manage plugins

Run your first check

Pick a command that already works in your project. Use latch.json to run commands in any language. You can skip the file if Latch can discover a named script in your package.json or a console entry point in your packaged uv project.

Run any project command

Create latch.json in the directory where you run your checks. If you already use make lint, configure it like this.

latch.json
{
  "hooks": {
    "turn_end": {
      "commands": "make lint"
    }
  }
}

Replace the example with your own command, such as "go test ./..." or "uv run ruff check .". Install your project’s dependencies so the agent can run the command. Every shipped integration supports turn_end. For feedback while the agent edits, see which file edits trigger checks.

You can create the file by hand or generate a starter with latch config init from the standalone CLI. Configuration examples

Use package scripts without latch.json

Latch discovers these names in the project directory. If your project already defines one, start a session with the plugin enabled.

package.json

For example, add hook:turnend to the existing scripts object in an npm project that already has a lint script.

package.json
{
  "scripts": {
    "hook:turnend": "npm run lint"
  }
}

Use hook:afteredit to run a script after a supported edit. Latch supports npm, pnpm, Yarn, and Bun. Package manager selection

pyproject.toml with uv

In a packaged uv project, add a console entry point under [project.scripts]. For example, the runnable Python project points to a function that runs the project’s unit tests and returns their exit status.

pyproject.toml
[project.scripts]
hook-turnend = "latch_python_example.checks:turn_end"

Use hook-afteredit for checks after a supported edit. For a regular command such as uv run pytest, use the latch.json recipe above. Python entry-point setup

Try it in your agent

  1. Start a fresh agent session in the project directory. Ask the agent to make a real change to a file and let the turn finish.
  2. Passing checks are silent. To see a report, try a change that makes your check fail, then restore the file. The runnable examples on GitHub show exactly what to change.
  3. Ask the agent to call latch_status to see whether Latch ran or skipped. If the tool is unavailable in chat, use latch status with the standalone CLI. First-run tool availability

If a check failed and the report hasn’t appeared, check when your harness delivers failure feedback. Report delivery by harness

Run the same check from a terminal

Install the standalone CLI, then run these from your project directory.

latch explain turn_end
latch run turn_end

explain shows the resolved command and settings. run executes the check immediately, even when no files have changed. The same command works in CI.

Once the first check works, add path or file-type filters or give the agent one automatic response to a turn-end failure.

On this page