Configuration

WEFT reads one TOML file. It is found, in order, at --config, then $WEFT_CONFIG, then ~/.config/weft/weft.toml.

Only [workspace] is required. A machine with no Quartus still lints and simulates; one with no embedding model still retrieves documents by text. Unknown keys are refused rather than ignored, so a typo fails at startup instead of quietly doing nothing.

The key lists below are read out of the loader itself, so they are what it actually accepts.

Important

workspace.root is the whole sandbox. Every path an MCP client supplies is resolved – symlinks and .. included – and refused if it lands outside. There is no second mechanism and no way to opt out.

[container]

Key

Meaning

Default

image

Name of the locally built weft-tools image. It is never pulled: you build it, which is what keeps WEFT’s own distribution to GPL-3.0-only code.

weft-tools

[http]

Key

Meaning

Default

host

Address the HTTP transport binds.

127.0.0.1

port

Port the HTTP transport binds.

8080

token

Static bearer token. Every request must carry Authorization: Bearer <token>; the transport refuses to start without one.

none

[jobs]

Key

Meaning

Default

database

SQLite file holding job state across restarts. A compilation survives the server being killed; losing it would be a bug.

<workspace>/.weft/jobs.sqlite

timeout_s

Wall-clock limit for one compilation, in seconds.

7200

[quartus]

Key

Meaning

Default

edition

Which edition a tool uses when it does not name one. May be omitted when exactly one is configured; naming an unconfigured edition fails at startup.

the only configured edition

lite

The [quartus.lite] table.

not configured

pro

The [quartus.pro] table.

not configured

[quartus.<edition>]

Key

Meaning

Default

env

Extra environment for every invocation of that edition. This is where FlexLM variables go for Pro, which will not run without them.

empty

root

Install root, the directory holding bin/quartus_sh. Checked at startup, so a mistyped path fails then rather than in the middle of a compilation. WEFT never searches PATH and never guesses.

none

[questa]

Key

Meaning

Default

env

Extra environment for every invocation. Questa - Altera Starter FPGA Edition reads its licence from SALT_LICENSE_SERVER, which a server started outside a desktop session does not inherit.

empty

root

Install root, the directory holding bin/vsim. Questa ships beside Quartus and is the only simulator here that reads Verilog, SystemVerilog and VHDL in one run. Without this section, simulate and lint keep to the containerised tools.

none

[rag]

Key

Meaning

Default

database

The document index. Put it outside the workspace to index a library once and search it from every project.

<workspace>/.weft/documents.sqlite

library

Where your PDFs live. Mounted read-only, and separate from the workspace because a collection of standards outlives any one project. Nothing in it is indexed automatically – index_document reads one document when asked, and list_indexed_docs says what is waiting.

the workspace root

model_path

Local BGE-M3 weights in ONNX form. Without them retrieval still works, by text rather than by meaning, and every result says which of the two answered it. A configured model that cannot be loaded is an error, not a reason to fall back quietly.

no model

Top level

Key

Meaning

Default

container

Which image the containerised tools run in.

http

Streamable HTTP transport.

jobs

Where compilation job state lives, and its time limit.

quartus

Host Quartus installations, by edition.

questa

Host Questa installation.

rag

The document library, its index, and the embedding model.

workspace

Sandbox root. Required.

[workspace]

Key

Meaning

Default

root

The only directory WEFT can read or write. Every path an MCP client supplies is resolved – symlinks and .. included – and refused if it lands outside. Required; must exist.

none

A complete example

# SPDX-License-Identifier: GPL-3.0-only
#
# A complete WEFT configuration. Every section but [workspace] is optional:
# a machine with no Quartus still lints and simulates, and one with no
# embedding model still retrieves documents by text.

[workspace]
# Nothing outside this directory can be read or written, on the host or
# inside the container.
root = "/home/you/fpga"

[container]
image = "weft-tools"

[quartus]
edition = "lite"          # omit when only one edition is configured

[quartus.lite]
root = "/home/you/altera_lite/25.1std/quartus"

[quartus.pro]
root = "/opt/intelFPGA_pro/25.1/quartus"
# FlexLM variables are passed through to every Pro invocation.
env = { LM_LICENSE_FILE = "1800@licence-server" }

[questa]
# The simulator that ships beside Quartus. It reads Verilog, SystemVerilog
# and VHDL in one run, which no open simulator does, so it is what simulates
# a mixed-language design whole. Never a default: ask for it by name.
root = "/home/you/altera_lite/25.1std/questa_fse"
env = { SALT_LICENSE_SERVER = ";/home/you/.altera.quartus/questa_lic.dat" }

[jobs]
timeout_s = 7200

[rag]
# Where your PDFs live. Mounted read-only, and separate from the workspace
# because a document collection outlives any one project.
library = "/home/you/Documents/fpga-docs"

# Local BGE-M3 weights in ONNX form. Without them, document search still
# works -- by text rather than by meaning.
model_path = "/home/you/.local/share/weft/models/bge-m3"

# Put the index somewhere shared to index a library once and search it from
# every project.
database = "/home/you/.local/share/weft/documents.sqlite"

[http]
host = "127.0.0.1"
port = 8080
token = "put-a-long-random-string-here"