GitHub

@@ -0,0 +1,158 @@

1+

# Configuration 🔧

2+3+

CLAWDIS uses a JSON configuration file at `~/.clawdis/clawdis.json`.

4+5+

## Minimal Config

6+7+

```json

8+

{

9+

"inbound": {

10+

"allowFrom": ["+436769770569"],

11+

"reply": {

12+

"mode": "command",

13+

"command": ["tau", "{{Body}}"]

14+

}

15+

}

16+

}

17+

```

18+19+

## Full Configuration

20+21+

```json

22+

{

23+

"logging": {

24+

"level": "info",

25+

"file": "/tmp/clawdis/clawdis.log"

26+

},

27+

"inbound": {

28+

"allowFrom": [

29+

"+436769770569",

30+

"+447511247203"

31+

],

32+

"groupChat": {

33+

"requireMention": true,

34+

"mentionPatterns": [

35+

"@clawd",

36+

"clawdbot",

37+

"clawd"

38+

],

39+

"historyLimit": 50

40+

},

41+

"timestampPrefix": "Europe/London",

42+

"reply": {

43+

"mode": "command",

44+

"agent": {

45+

"kind": "pi",

46+

"format": "json"

47+

},

48+

"cwd": "/Users/you/clawd",

49+

"command": [

50+

"tau",

51+

"--mode", "json",

52+

"{{BodyStripped}}"

53+

],

54+

"session": {

55+

"scope": "per-sender",

56+

"idleMinutes": 10080,

57+

"sessionIntro": "You are Clawd. Be a good lobster."

58+

},

59+

"heartbeatMinutes": 10,

60+

"heartbeatBody": "HEARTBEAT",

61+

"timeoutSeconds": 1800

62+

}

63+

}

64+

}

65+

```

66+67+

## Configuration Options

68+69+

### `logging`

70+71+

| Key | Type | Default | Description |

72+

|-----|------|---------|-------------|

73+

| `level` | string | `"info"` | Log level: trace, debug, info, warn, error |

74+

| `file` | string | `/tmp/clawdis/clawdis.log` | Log file path |

75+76+

### `inbound.allowFrom`

77+78+

Array of E.164 phone numbers allowed to trigger the AI. Use `["*"]` to allow everyone (dangerous!).

79+80+

```json

81+

"allowFrom": ["+436769770569", "+447511247203"]

82+

```

83+84+

### `inbound.groupChat`

85+86+

| Key | Type | Default | Description |

87+

|-----|------|---------|-------------|

88+

| `requireMention` | boolean | `true` | Only respond when mentioned |

89+

| `mentionPatterns` | string[] | `[]` | Regex patterns that trigger response |

90+

| `historyLimit` | number | `50` | Max messages to include as context |

91+92+

### `inbound.reply`

93+94+

| Key | Type | Description |

95+

|-----|------|-------------|

96+

| `mode` | string | `"command"` for CLI agents |

97+

| `command` | string[] | Command and args. Use `{{Body}}` for message |

98+

| `cwd` | string | Working directory for the agent |

99+

| `timeoutSeconds` | number | Max time for agent to respond |

100+

| `heartbeatMinutes` | number | Interval for heartbeat pings |

101+

| `heartbeatBody` | string | Message sent on heartbeat |

102+103+

### Template Variables

104+105+

Use these in your command:

106+107+

| Variable | Description |

108+

|----------|-------------|

109+

| `{{Body}}` | Full message body |

110+

| `{{BodyStripped}}` | Message without mention |

111+

| `{{From}}` | Sender phone number |

112+

| `{{SessionId}}` | Current session UUID |

113+114+

## Session Configuration

115+116+

```json

117+

"session": {

118+

"scope": "per-sender",

119+

"resetTriggers": ["/new"],

120+

"idleMinutes": 10080,

121+

"sessionIntro": "You are Clawd.",

122+

"sessionArgNew": ["--session", "{{SessionId}}.jsonl"],

123+

"sessionArgResume": ["--session", "{{SessionId}}.jsonl", "--continue"]

124+

}

125+

```

126+127+

| Key | Type | Description |

128+

|-----|------|-------------|

129+

| `scope` | string | `"per-sender"` or `"global"` |

130+

| `resetTriggers` | string[] | Messages that start a new session |

131+

| `idleMinutes` | number | Session timeout |

132+

| `sessionIntro` | string | System prompt for new sessions |

133+134+

## Environment Variables

135+136+

Some settings can also be set via environment:

137+138+

```bash

139+

export CLAWDIS_LOG_LEVEL=debug

140+

export CLAWDIS_CONFIG_PATH=~/.clawdis/clawdis.json

141+

```

142+143+

## Migrating from Warelay

144+145+

If you're upgrading from the old `warelay` name:

146+147+

```bash

148+

# Move config

149+

mv ~/.warelay ~/.clawdis

150+

mv ~/.clawdis/warelay.json ~/.clawdis/clawdis.json

151+152+

# Update any hardcoded paths in your config

153+

sed -i '' 's/warelay/clawdis/g' ~/.clawdis/clawdis.json

154+

```

155+156+

---

157+158+

*Next: [Agent Integration](./agents.md)* 🦞

Read the original on github.com ↗