Skip to content

Install

What you need

/lem init gives the install steps. lem doctor checks the tools.

Required

Optional

Update and remove gives the steps to remove Lem and its .lem/ folder.

Install

Lem has two parts: the app, with the command lem, and the plugin for Claude Code. Install the app once.

brew install pySilver/tap/lem

Install the plugin from the root of your repository.

claude plugin marketplace add pySilver/lem --scope project
claude plugin install lem@lem --scope project

For a GitHub SSH error, update over HTTPS.

/lem init commits .claude/settings.json only if git does not track it and it has only the two Lem entries. They are extraKnownMarketplaces for lem and enabledPlugins for lem@lem. Commit any other .claude/settings.json yourself. Each person installs Lem in their own clone unless they already have it for every repository.

The first time a session reads a file of Lem, Claude Code asks for permission to read outside the working directories. Answer it one time, or put the rule that lem doctor gives, such as Read(//opt/homebrew/Cellar/lem/**), under permissions, allow in ~/.claude/settings.json.

Set up the repository

  1. Start Claude Code in agterm, at the root of the repository.
  2. Type /lem init.
  3. Answer three questions: the product and its users, who a change affects, and what must never go wrong.
  4. Read the page of assumptions, for example who merges. Type change land owner to correct one.
  5. Type land. Lem puts its settings on your base branch through a pull request on GitHub.
  6. Type /lem and your first request.

Lem assumes auto mode in Claude Code and Codex. A permission prompt stops an agent. On GitHub, Lem pushes each task and opens its pull request with no question. Your land approves this.

A task's worktree has no .env file or test database. Put the commands that make them in checks.setup.

What Lem keeps

In git:

  • .lem/settings.toml: the settings of your team.
  • .lem/profile.md, .lem/personas/: the product, and the people that a change affects.
  • .lem/lessons.md: your corrections of how an agent does a step in this repository.
  • docs/rulings.md: your decisions about what the product does, one bullet for each, which no agent reopens without asking you. A retro only proposes a ruling.
  • docs/plans/, docs/backlog/: the plans, and work for later. The settings can move the plans and the rulings.

Not in git:

  • .lem/settings.local.toml: your settings for this repository on this computer.
  • .lem/worktrees/: the worktrees of the tasks.
  • .lem/state/: the tasks and the board, on this computer only. The board server removes what is older than state.keep_days. It removes no branch, no worktree and no pull request.

For all repositories, in ~/.config/lem/ (or $XDG_CONFIG_HOME/lem/):

  • owner.json: whether you are away.
  • settings.toml: your settings for every repository: your seats, and the look of the question page.
  • machine.toml: the settings of this computer: the load limit, the board server, the other computers, the compaction and the correction queue.
  • workspaces.json, serve.json, serve.log, lem.log: the repositories that the board server shows, the server, its output and the faults of Lem.
  • push-key.pem, push.json: the key and the devices of the notifications.

lem settings show gives each setting and the file that it comes from.

The correction queue

With this optional queue, a retro finds a correction that you gave more than one time. A hook sends each message that you type, with the agent's message before it, to the Jev decision model. Commands that start with / stay local.

The queue is on or off for your computer, in every repository on it. /lem init asks you one time for each computer. When the queue is on, it needs JEV_API_KEY in the environment. The default provider is OpenRouter; JEV_API_URL names another.

Run one command to set collect in [corrections] of ~/.config/lem/machine.toml. The other lines stay. A repository file cannot control the queue.

lem settings set corrections.collect no --machine
lem settings set corrections.collect yes --machine