Configuration

Each project has one config file, .localexec.json, in its root. Every key is optional. Unknown keys are rejected with an error, so a typo never silently does nothing.

Keys

KeyTypeDefaultMeaning
ollama_modelstringqwen-coder-16kThe model name in Ollama.
ollama_urlstringhttp://localhost:11434Must point at this machine. To use another server, set LOCALEXEC_OLLAMA_URL.
num_ctxinteger16384Context window requested from Ollama. Match it to the model.
temperaturenumber, 0 to 20.1Sampling temperature.
max_attemptsinteger, 1 or more2Generations per task. Each failed check is sent back to the model for the next one.
max_output_tokensinteger4096Largest reply the model may write.
prompt_budget_tokensinteger8000Upper bound for the prompt. See the budget formula below.
keep_alivestring10mHow long Ollama keeps the model loaded after a request.
request_timeoutinteger, seconds600Time allowed for one Ollama request.
conventionsstringemptyText added to every prompt: language version, style, things to avoid.
allowed_pathslist of globs["**"]Only these paths can be read or edited. It must not be empty.
ignorelist of globssee belowAdded to the default ignore list. Ignored paths cannot be read or edited.
checkslist of objectsnoneCommands that decide whether a task passed.
standardstrue or objectoffTurns on the built-in size limits. See Coding standards.

Default ignore list

Your ignore globs are added to these:

.git/**
.localexec/**
.localexec.json
node_modules/**
.venv/**
venv/**
__pycache__/**
/dist/**
/build/**
/data/**
*.lock
package-lock.json
pnpm-lock.yaml
yarn.lock
.env
.env.*

A leading slash anchors the pattern to the project root, so a package named src/build is still source.

Prompt budget

The prompt may use min(prompt_budget_tokens, num_ctx - max_output_tokens - 2500) tokens, converted at 3.5 characters per token with a floor of 1,000 characters. The 2,500 tokens are reserved for one repair round. Context files are truncated first and listed under truncated. If files_to_edit alone do not fit, the result is blocked with a message to split the task.

Checks

A check is a command from your config. It runs without a shell, with a timeout and with stdin closed. A task passes when every selected check exits successfully.

KeyTypeDefaultMeaning
namestringrequiredUnique name. standards is reserved when a standards block is present.
argvlist of stringsrequiredThe command and its arguments. No shell is involved.
cwdstring.Working directory, relative to the project root.
timeoutinteger, seconds300The check is stopped after this long.
files_filterlist of globsnoneRun the check only if a changed file matches. Otherwise it is reported as skipped.

Put "{files}" in argv as a whole element, used once, and it expands to the files the task changed, relative to the check's cwd, one argument per file. See scoped checks.

A fuller example

{
  "ollama_model": "qwen-coder-16k",
  "num_ctx": 16384,
  "temperature": 0.1,
  "max_attempts": 2,
  "prompt_budget_tokens": 8000,
  "standards": {
    "max_function_lines": 50,
    "max_file_lines": 500,
    "warn_file_lines": 300,
    "exempt": ["frontend/src/generated/**"]
  },
  "checks": [
    { "name": "ruff", "argv": ["uv", "run", "ruff", "check", "{files}"], "files_filter": ["*.py"], "timeout": 120 },
    { "name": "pytest", "argv": ["uv", "run", "pytest", "-x", "-q"], "timeout": 600 },
    { "name": "tsc", "argv": ["npx", "tsc", "--noEmit"], "cwd": "frontend",
      "files_filter": ["frontend/**/*.ts", "frontend/**/*.tsx"], "timeout": 300 }
  ],
  "conventions": "Python 3.12, type hints on all functions, no new dependencies. Do not touch tests unless the spec says so.",
  "allowed_paths": ["backend/**", "frontend/src/**", "tests/**"],
  "ignore": ["frontend/public/**", "migrations/**"]
}

Environment variables

VariableMeaning
LOCALEXEC_ROOTThe project root. Without it, the server uses the git top-level of its working directory, or a directory that contains .localexec.json. It refuses to guess beyond that.
LOCALEXEC_OLLAMA_URLAn Ollama server other than this machine. It must be an http or https URL. Only the environment can do this, never the project file.

The project file may only point ollama_url at this machine (localhost, 127.0.0.1 or ::1). A cloned repository cannot redirect your code to another host.