Before you build
The source tree builds and its tests pass locally. The commands here are for a checked-out tree on a machine you control.
If someone offers you a DreenMind build, treat it as unverified.
Requirements
| Requirement | Detail |
|---|---|
| Go | 1.26.x. Release builds use CGO_ENABLED=0. |
| Terminal | A local shell for the CLI and the interactive chat. |
| Docker | Optional. Needed only for the sandbox contract; unavailable Docker fails closed. |
| Operating system | Linux is the primary target. Windows builds are supported; untrusted execution is disabled. |
| Network | Loopback for the gateway. Outbound HTTPS only for a configured provider and exact-host web fetch. |
Build from source
From the repository root, build the command. The binary name is dreenmind.
cd dreenmind
go build -o dreenmind ./cmd/dreenmind
./dreenmind versionSet-Location dreenmind
go build -o dreenmind.exe .\cmd\dreenmind
.\dreenmind.exe versionThe version command prints the build version and platform.
First run
Initialization creates the config, workspace, database, and encrypted vault. It asks for a vault passphrase. The minimum length is 12 characters; there is no recovery phrase.
./dreenmind initOn Linux the default config is under ~/.config/dreenmind/config.json. If an existing legacy config is present, the gateway can read it, but new state uses the DreenMind directory. Use --config to point at a different file.
Keep the passphrase
Losing the vault passphrase means losing the encrypted secrets. The project does not ship a backdoor or a recovery service.
Start the gateway
Run the gateway in one terminal. It binds to loopback and stays in the foreground.
./dreenmind serve./dreenmind status
./dreenmind chat
# type /exit to leave the chatstatus checks readiness. chat uses the local HTTP API, so the gateway must be running. If the gateway is not ready, the client fails instead of pretending to queue work.
Configure a provider
The provider must be OpenAI-compatible and support tool calling. Remote endpoints must use HTTPS. Loopback HTTP is allowed for local models. A local endpoint that does not require auth may use an empty key reference.
{
"provider": {
"base_url": "https://api.example.com/v1",
"model": "example-model",
"api_key_ref": "secret://provider/api-key"
}
}Store the key with the CLI’s secret command, not in the JSON file. The exact secret command is listed in the CLI reference. A live provider call is a separate verification step.
Telegram, private chats only
The Telegram adapter is optional and disabled by default. It uses long polling, ignores group chats, and requires pairing before a private chat is accepted.
- Create a bot with BotFather and keep the token out of source control.
- Store the token in the vault as a
secret://reference. - Enable the channel in config and restart
serve. - Request a pairing code from the CLI. Codes are short-lived and limited to three active codes.
- Send the code from the private chat you want to pair.
Pairing attempts are limited, and duplicate updates are suppressed for seven days. Approvals are not available as Telegram buttons; use the CLI or HTTP API.
Tool defaults
| Tool | Default | Notes |
|---|---|---|
workspace_read | On | Confined to the workspace with size and path checks. |
workspace_list | On | Lists within the workspace root. |
workspace_write | Off | Opt-in; requires policy and may require approval. |
workspace_move | Off | Opt-in; source and destination are checked. |
web_fetch | Empty allowlist | Exact hosts only; private addresses and redirects are blocked. |
| Approvals | Sensitive tools | Scoped, single-use, 15-minute expiry, 60-second wait. |
| Sandbox | Off | No execution tool; unavailable Docker fails closed. |
Verify the install
Run the same checks the repository uses. These are local checks.
go test ./...
go vet ./...
go build ./...
./dreenmind doctor
./dreenmind doctor --repairdoctor checks configuration, paths, vault access, database integrity, and provider shape. --repair rebuilds the message search index when it is safe to do so. It is not a data-recovery tool.
Update and roll back
There is no automatic updater. For a source build, stop the gateway, keep a copy of the database and vault, replace the binary, and run doctor before serving again.
- Stop
serveand confirm the process exited. - Back up the config, database, and vault as a set.
- Replace the binary with the build you intend to run.
- Run
doctor, thenserve, thenstatus. - If startup fails, restore the previous binary and backup.
Draft release artifacts may include checksums.
Do not expose the gateway
Loopback is the boundary
Do not bind the gateway to a public interface. Do not put it behind an unauthenticated reverse proxy. If you need remote access, use a tunnel or proxy you understand, with authentication and a threat model of its own.