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
| Key | Type | Default | Meaning |
|---|---|---|---|
ollama_model | string | qwen-coder-16k | The model name in Ollama. |
ollama_url | string | http://localhost:11434 | Must point at this machine. To use another server, set LOCALEXEC_OLLAMA_URL. |
num_ctx | integer | 16384 | Context window requested from Ollama. Match it to the model. |
temperature | number, 0 to 2 | 0.1 | Sampling temperature. |
max_attempts | integer, 1 or more | 2 | Generations per task. Each failed check is sent back to the model for the next one. |
max_output_tokens | integer | 4096 | Largest reply the model may write. |
prompt_budget_tokens | integer | 8000 | Upper bound for the prompt. See the budget formula below. |
keep_alive | string | 10m | How long Ollama keeps the model loaded after a request. |
request_timeout | integer, seconds | 600 | Time allowed for one Ollama request. |
conventions | string | empty | Text added to every prompt: language version, style, things to avoid. |
allowed_paths | list of globs | ["**"] | Only these paths can be read or edited. It must not be empty. |
ignore | list of globs | see below | Added to the default ignore list. Ignored paths cannot be read or edited. |
checks | list of objects | none | Commands that decide whether a task passed. |
standards | true or object | off | Turns 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.
| Key | Type | Default | Meaning |
|---|---|---|---|
name | string | required | Unique name. standards is reserved when a standards block is present. |
argv | list of strings | required | The command and its arguments. No shell is involved. |
cwd | string | . | Working directory, relative to the project root. |
timeout | integer, seconds | 300 | The check is stopped after this long. |
files_filter | list of globs | none | Run 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
| Variable | Meaning |
|---|---|
LOCALEXEC_ROOT | The 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_URL | An 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.