Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.tmp
.idea
dist/

.env
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# docker run -e OPENROUTER_API_KEY="$OPENROUTER_API_KEY" -p 18790:18790 -it --volume="$PWD:/app" --workdir="/app" --entrypoint=/bin/sh clawlet
FROM golang:1.26-alpine AS builder

RUN apk add --no-cache gcc musl-dev

WORKDIR /app

COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN CGO_ENABLED=1 go build -o clawlet ./cmd/clawlet

FROM alpine:latest

RUN apk add --no-cache ca-certificates

WORKDIR /app

COPY --from=builder /app/clawlet /usr/local/bin

RUN clawlet onboard
RUN clawlet status

EXPOSE 18790

ENTRYPOINT ["clawlet", "gateway"]
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ clawlet status
clawlet agent -m "What is 2+2?"
```

## Docker

Run clawlet using Docker or Docker Compose instead of installing locally.

### Dockerfile

The Dockerfile uses a multi-stage build: it compiles the Go application with CGO enabled (for sqlite-vec), then runs it in a minimal Alpine container. The container automatically runs `clawlet onboard` and `clawlet status` on first build, then starts the gateway.

### Docker Compose

```bash
docker-compose up --build
```

The gateway will be available at `http://localhost:18790`.

### Plain Docker

```bash
# Build the image
docker build -t clawlet .

# Run the gateway
docker run -e OPENROUTER_API_KEY="$OPENROUTER_API_KEY" \
-p 18790:18790 \
-v "$PWD/clawlet.config.json:/root/.clawlet/config.json" \
clawlet
```

## Configuration (`~/.clawlet/config.json`)

Config file: `~/.clawlet/config.json`
Expand Down
109 changes: 109 additions & 0 deletions clawlet.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"agents": {
"defaults": {
"model": "openrouter/google/gemini-3-flash-preview",
"maxTokens": 8192,
"temperature": 0.2,
"memoryWindow": 50,
"memorySearch": {
"enabled": false,
"provider": "openai",
"model": "text-embedding-3-small",
"remote": {
"baseURL": "https://api.openai.com/v1",
"apiKey": "",
"headers": {}
},
"store": {
"path": "./memory-store",
"vector": {
"enabled": true
}
},
"chunking": {
"tokens": 400,
"overlap": 80
},
"query": {
"maxResults": 6,
"minScore": 0.35,
"hybrid": {
"vectorWeight": 0.7,
"textWeight": 0.3,
"candidateMultiplier": 4
}
},
"cache": {
"enabled": true,
"maxEntries": 1000
},
"sync": {
"onSearch": true
}
}
}
},
"tools": {
"restrictToWorkspace": true,
"exec": {
"timeoutSec": 60
},
"web": {
"braveApiKey": ""
}
},
"cron": {
"enabled": true
},
"heartbeat": {
"enabled": true,
"intervalSec": 1800
},
"gateway": {
"listen": "0.0.0.0:18790"
},
"channels": {
"discord": {
"enabled": false,
"token": "",
"allowFrom": [
"123456789"
],
"gatewayURL": "wss://gateway.discord.gg/?v=10&encoding=json",
"intents": 37377
},
"slack": {
"enabled": false,
"allowFrom": [
"U123ABC",
"U456DEF"
],
"botToken": "xoxb-...",
"appToken": "xapp-...",
"groupPolicy": "mention",
"groupAllowFrom": [
"C123CHAN"
],
"dm": {
"enabled": true
}
},
"telegram": {
"enabled": false,
"token": "",
"allowFrom": [
"123456789"
],
"baseURL": "https://api.telegram.org",
"pollTimeoutSec": 25,
"workers": 2
},
"whatsapp": {
"enabled": false,
"allowFrom": [
"+1234567890"
],
"sessionStorePath": "./whatsapp-session.db"
}
}
}
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
clawlet:
build:
context: .
dockerfile: Dockerfile
container_name: clawlet
ports:
- "18790:18790"
environment:
# @see https://github.com/mosaxiv/clawlet?tab=readme-ov-file#supported-providers
# uses your shell ENV OR a `.env`
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
volumes:
# copies the local config file to the container
- ./clawlet.config.json:/root/.clawlet/config.json
entrypoint: ["clawlet", "gateway"]
stdin_open: true
tty: true