---
title: "Config file"
url: https://docs.loot.build/reference/config
group: "Reference"
status: written
summary: "Every key, its default, and where it lives."
---

# Config file

> Every key, its default, and where it lives.

loot reads settings from two files of `key = value` lines: one for this machine, one for this repo. Named remotes live in a third.

## Where it lives

| File | Scope | Written by |
| --- | --- | --- |
| `$XDG_CONFIG_HOME/loot/config`, else `~/.config/loot/config` | Global: this machine | `loot config set` (the default scope), `loot login`, `loot telemetry` |
| `.loot/config.local` | Local: this repo | `loot config set --local` |
| `.loot/config` | Named remotes, as `name = url` | `loot remote add` and `remove` |

On Windows with neither `XDG_CONFIG_HOME` nor `HOME` set, the global file is `%USERPROFILE%\.config\loot\config`.

- A flag beats local config, and local beats global. Bare `loot config set` and `unset` write the global file, unlike git; pass `--local` for this repo.
- The local file sits under `.loot/`, so it is never captured or pushed. It is repo-wide: a lane reads its primary’s, and `--local` writes refuse from inside a lane.
- `loot config` lists every effective value with the file it came from. `loot config --get <key>` prints one and exits 1 when it is unset.

## Syntax

One `key = value` per line. The first `=` splits, and both sides are trimmed. Blank lines and lines starting with `#` are skipped, and so is a line with no `=`; `loot doctor` reports such a line in the global file. `loot config set` and `unset` change only the key's own line, so comments and other lines stay as you wrote them.

## Keys

| Key | Read from | Default | Meaning |
| --- | --- | --- | --- |
| `identity` | local, then global | unset | The name `loot init` and `loot clone` use when you pass no `--identity`. Unset, both refuse and ask for one. It never renames a repo that exists; that repo’s `.loot/identity` wins. `loot login` sets it if unset. |
| `remote` | local, then global | `origin` | The remote name verbs such as `push`, `pull`, `fetch`, `pull-grants` and `propose` use when you give neither a URL nor `--remote`. A name from `.loot/config`, not a URL. |
| `forge` | global | unset | The forge this machine signed in to, written by `loot login`. `loot init` uses it to add a remote at your namespace there. |
| `machine-id` | global | minted on first use | This machine’s token, which tells loot a `.loot/` arrived from another machine. Don’t edit or copy it. |
| `telemetry-id` | global | unset (off) | Its presence turns telemetry on. `loot telemetry on` mints it and `off` deletes it. |
| `telemetry-endpoint` | global | `https://loot.build/api/telemetry` | Where reports go. https only, or plain http to `127.0.0.1`. |
| `telemetry-last-send` | global | unset | Unix seconds of the last report, written by the sender. |
| `telemetry-class` | global | unset | Leave it unset. `internal` labels reports as coming from loot’s own machines; anything else reports `unknown`. |

`loot config set` stores any key you give it. A key not in this table is kept and ignored. The global-only keys are read from the global file alone, so setting them with `--local` has no effect.

## Beside the config file

The same `loot/` directory holds your signed-in account key (`account/id`), unlock sessions from `loot unlock`, and the telemetry spool (`telemetry/`). An unlock session is a credential: don’t sync or back up this directory. See [known issues](https://loot.build/known-issues).
