-
Notifications
You must be signed in to change notification settings - Fork 8
/
config.yml
204 lines (188 loc) · 7.07 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# REPLbot config file
# Slack/Discord bot token used to authorize the bot. The token format is used by REPLbot to figure out
# which kind of token it is.
#
# For Slack:
# REPLbot requires a Slack "Classic App (bot)", because of its use of the real time messaging (RTM)
# API. To create a classic app and acquire a Slack bot token, follow these steps:
# 1. Create a classic app: https://api.slack.com/apps?new_classic_app=1
# 2. In the "App Home" section, add a "Legacy bot user"
# 3. In the "OAuth & Permissions" section, click "Install to Workspace"
# 4. Copy the "Bot User OAuth Token" starting with "xoxb-..."
#
# For Discord:
# 1. Create an app: https://discord.com/developers/applications
# 2. In the "Bot" section, click "Add Bot" and disable "Public Bot"
# 3. In the "OAuth2" section, click "Add Redirect" and type a URL (even https://google.com is fine),
# select the scopes "bot" and "messages.read", and the permissions "public threads", "private thread",
# "send messages", "manage messages", "manage threads". Click "Save changes".
# 4. Copy the OAuth2 URL and navigate to it in the browser and authorize the app.
# 5. In the "Bot" section, copy the token and paste it here
#
# Format: long cryptic string
# Default: None
# Required: Yes
#
bot-token: MUST_BE_SET
# Directory containing your REPL scripts. REPLbot ships with a bunch of default scripts. Be sure
# to check them out and add/remove scripts as you like.
#
# Security note:
# Scripts are run in and controlled by a tmux(1) and can be executed from Slack/Discord by users, so it is
# vital that you make sure you cannot do anything nasty from these scripts. Either properly restrict
# them (limited shell), and/or put them in a Docker container.
#
# Format: Existing directory
# Default: /etc/replbot/script.d
# Required: No
#
# script-dir: /etc/replbot/script.d
# Default control/terminal mode. This mode defines how new sessions are started and controlled by the user.
#
# - channel: Both terminal window and user control appear in the main channel
# - thread: Both terminal window and user control appear in a thread
# - split: The terminal window is displayed in the main channel, the user input from a thread
#
# Format: channel|thread|split
# Default: split
# Required: No
#
# default-control-mode: split
# Default window mode. This defines whether white space and new lines are trimmed in the chat terminal window.
#
# - full: The terminal window is left unchanged
# - trim: White spaces are new lines are trimmed from the end
#
# Format: full|trim
# Default: full
# Required: No
#
# default-window-mode: full
# Default auth mode. This defines who can send commands in a new session. In an active session, users can be
# added/removed using the !allow and !disallow commands.
#
# - only-me: In a new session, only the person who started the session can send commands
# - everyone: White spaces are new lines are trimmed from the end
#
# Format: only-me|everyone
# Default: everyone; for terminal sharing sessions: only-me
# Required: No
#
# default-auth-mode: everyone
# Default terminal size. This defines how large the terminal should be when a new session is started. This
# can be overridden by the user and using the !resize command.
#
# Format: tiny|small|medium|large
# Default: small
# Required: No
#
# default-size: small
# Record sessions by default. If turned on, a ZIP archive containing a recording of the session, including
# all output will be attached to the session exit message. This option defines the default behavior. It can
# be changed using the "record" or "norecord" settings.
#
# Format: true or false
# Default: false
# Required: No
#
# default-record: false
# Upload recorded sessions using `asciinema upload`. If set, sessions that are recorded will also
# be uploaded. If you'd like to have control over what asciinema host sessions and with what user
# are uploaded to, you should make sure that you configure your asciinema client and properly log in
# using `asciinema auth`.
#
# If you have your own asciinema server set up, you may also configure that in the config file
# ~/.config/asciinema/config. If REPLbot runs as "replbot" user (installed via the .deb/.rpm),
# that'd be /var/lib/replbot/.config/asciinema/config, and you may install it like so:
#
# $ su -s/bin/bash replbot
# $ mkdir -p /var/lib/replbot/.config/asciinema
# $ vi /var/lib/replbot/.config/asciinema/config
# [api]
# url=http://my-local.host.lan
#
# Format: true or false
# Default: false
# Required: No
#
# upload-recording: false
# Hostname and port of the web server to support the web terminal feature via the !web command.
# The socket is bound to :port, but the hostname is used to provide the full URL.
#
# If no port is provided, port 80 is assumed.
#
# For this option to work, you must have 'ttyd' (https://github.com/tsl0922/ttyd) installed somewhere
# in your path. The easiest way to install it is like this:
#
# $ wget https://github.com/tsl0922/ttyd/releases/download/1.6.3/ttyd.x86_64 \
# && chmod +x ttyd.x86_64 \
# && sudo mv ttyd.x86_64 /usr/local/bin/ttyd
#
# Format: <hostname>[:<port>]
# Default: empty
# Required: No
#
# web-host:
# Start web terminal by default (only applicable if "web-host" is set). If turned on, a ttyd web terminal
# will be started by default for each session. This option defines the default behavior. It can be changed
# using the "web" or "noweb" settings.
#
# Format: true or false
# Default: false
# Required: No
#
# default-web: false
# Timeout after which REPL sessions are terminated if there is no user input.
#
# Format: <number>(hms), must be >1m
# Default: 10m
# Required: No
#
# idle-timeout: 10m
# Defines the maximum number of active sessions by all users combined.
#
# Format: <number>
# Default: 6
# Required: No
#
# max-total-sessions: 6
# Defines the maximum number of active sessions by any individual user.
#
# Format: <number>
# Default: 2
# Required: No
#
# max-user-sessions: 2
# Cursor setting for the terminal. Can be "on" to always render the cursor, "off" to turn it off entirely,
# or a duration such as "1s" or "2s" to define the blink rate.
#
# Slack:
# Please do note that Slack heavily rate limits messages (one message per second per channel), so
# re-rendering the terminal for the cursor can have side effects.
# Discord:
# Discord allows 50 requests per second, though in practice a blinking cursor leads to delays too.
#
# Format: on, off or <number>s
# Default: on
# Required: No
#
# cursor: on
# To allow terminal sharing via "@replbot share", REPLbot must run an SSH server that clients can
# connect to. This section defines the host (hostname:port pair). The SSH server will be bound to the
# port in the "host" config.
#
# Format: <hostname>:<port>
# Default: (empty)
# Required: No
#
# share-host:
# The SSH host key file name ("key") used by above-mentioned SSH server.
#
# To generate a hostkey, you may run:
# $ sudo ssh-keygen -q -N "" -f /etc/replbot/hostkey
#
# Format: key: <filename>
# Default: /etc/replbot/hostkey
# Required: No
#
# share-key-file: /etc/replbot/hostkey