diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e9934e2 --- /dev/null +++ b/.env.example @@ -0,0 +1,10 @@ +# Matrix Bot Credentials +# Required: at least one of MATRIX_ACCESS_TOKEN or MATRIX_PASSWORD + +MATRIX_HOMESERVER=https://matrix.org +MATRIX_USER_ID=@opencode-bot:matrix.org +MATRIX_ACCESS_TOKEN= +MATRIX_PASSWORD= + +# Optional: Override storage directory +# MATRIX_STORAGE_PATH=~/.local/share/opencode-matrix-bot diff --git a/matrix.json.example b/matrix.json.example new file mode 100644 index 0000000..5e46907 --- /dev/null +++ b/matrix.json.example @@ -0,0 +1,17 @@ +{ + "homeserver": "https://matrix.org", + "userId": "@opencode-bot:matrix.org", + "password": "", + "deviceId": "opencode-matrix-plugin", + "autoJoin": true, + "triggerPatterns": ["!oc "], + "ignoreRooms": [], + "ignoreUsers": [], + "allowedUsers": [], + "formatHtml": false, + "threadIsolation": true, + "respondToThreadReplies": true, + "rateLimitSeconds": 5, + "botName": "opencode", + "enabled": true +} diff --git a/opencode.example.jsonc b/opencode.example.jsonc new file mode 100644 index 0000000..b01ae83 --- /dev/null +++ b/opencode.example.jsonc @@ -0,0 +1,25 @@ +{ + "$schema": "https://opencode.ai/config.json", + "plugins": [ + { + "package": "./plugins/opencode-matrix-plugin", + "options": { + "homeserver": "https://matrix.org", + "userId": "@opencode-bot:matrix.org", + "password": "", + "deviceId": "opencode-matrix-plugin", + "autoJoin": true, + "triggerPatterns": ["!oc ", "!ai "], + "ignoreRooms": [], + "ignoreUsers": [], + "allowedUsers": [], + "formatHtml": false, + "threadIsolation": true, + "respondToThreadReplies": true, + "rateLimitSeconds": 5, + "botName": "opencode", + "storagePath": "" + } + } + ] +}