concord 2.1.8

A terminal user interface client for Discord
Documentation
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
# Concord

<img width="1613" height="848" alt="concord - a feature-rich TUI client for
  Discord" src="./docs/example.png" />

Concord is a feature-rich TUI (terminal user interface) client for Discord, written in Rust with ratatui. Full Discord experience, right in your terminal.

## Installation

### Homebrew

```sh
brew install chojs23/tap/concord
```

### Cargo

`cargo install` builds Concord from source. The default build includes voice
playback, so it requires pkg-config, the Opus development library, and ALSA
development files on Linux.

On Fedora:

```sh
sudo dnf install opus-devel alsa-lib-devel pkgconf-pkg-config
```

On Debian or Ubuntu:

```sh
sudo apt install libopus-dev libasound2-dev pkg-config
```

On macOS with Homebrew:

```sh
brew install opus pkg-config
```

```sh
cargo install concord
```

To install without local voice playback and microphone support:

```sh
cargo install concord --no-default-features
```

To install the latest unreleased version directly from the Git repository:

```sh
cargo install --git https://github.com/chojs23/concord
```

### Nix

Run without installing (requires flakes enabled):

```sh
nix run github:chojs23/concord
```

Install into your profile:

```sh
nix profile install github:chojs23/concord
```

Or add the flake as an input in your own `flake.nix`:

```nix
{
  inputs.concord.url = "github:chojs23/concord";
}
```

Then reference it as `concord.packages.${system}.default` in your configuration.

A development shell with the pinned Rust toolchain and `rust-analyzer` is also
available:

```sh
nix develop github:chojs23/concord
```

### GitHub Release installer

Install the latest release with the cargo-dist shell installer:

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/chojs23/concord/releases/latest/download/concord-installer.sh | sh
```

On Windows, use the PowerShell installer instead:

```powershell
powershell -ExecutionPolicy Bypass -c "irm https://github.com/chojs23/concord/releases/latest/download/concord-installer.ps1 | iex"
```

The installer places `concord` under `$CARGO_HOME/bin`, which is usually
`~/.cargo/bin` on Unix and `%USERPROFILE%\.cargo\bin` on Windows.

### Build from source

You need the Rust stable toolchain, Cargo, and the native dependencies listed in
the Cargo install section.

```sh
git clone https://github.com/chojs23/concord.git
cd concord
cargo build --release
```

The release binary is produced at:

```sh
target/release/concord
```

By default, source builds can join voice channels, decode received voice audio,
and open local audio devices for playback and gated microphone transmit. To
build without local voice playback and microphone support, disable default
features:

```sh
cargo build --release --no-default-features
```

On WSLg, audio is usually exposed through PulseAudio instead of a real ALSA
sound card. If playback does not start, check that PulseAudio and ALSA routing
work before debugging Discord voice itself:

```sh
pactl info
paplay /usr/share/sounds/alsa/Front_Center.wav
aplay -D pulse /usr/share/sounds/alsa/Front_Center.wav
```

## Features

### Authentication

- **Token** : paste an existing Discord token.
- **Email / Password** : login with credentials. MFA (TOTP, SMS) is fully supported.
- **QR Code** : scan the code from the Discord mobile app.

Email and QR code logins may trigger a CAPTCHA challenge on Discord's side. We cannot solve that, so I strongly recommend using token authentication.

Tokens are saved under Concord's config directory in plain text. See the Security section below for details.

### Guilds & Channels

- Browse servers with guild folder grouping
- Navigate text channels, threads, and forum channels
- View and filter forum posts (active / archived)
- Load pinned messages per channel
- Open channel actions for pinned messages, thread lists, and mark-as-read
- Join and leave voice channels
- Highlight active voice speakers in voice channel participant rows
- Track unread messages and mention counts per channel
- Mute and unmute channels and servers
- Leave the selected server after confirmation

### Messaging

- Send, edit, and delete messages
- Upload / Download attachments
- Search messages with filters with `/`
- Use @mention autocomplete
- Use custom emoji from other servers when your account supports it
- Send custom emoji your account cannot use directly as image links when enabled
- View full message history
- Rich content display (embeds, attachments, stickers, and mentions)
- Detect URLs in message bodies and markdown links, then open them in your default browser
- Direct message shortcuts for copy, reply, edit, delete, reactions, URL opening,
  and image viewing. More message actions are available from the action menu.

#### Markdown Rendering

![Markdown rendering example](./docs/markdown-example.png)

Concord renders a practical subset of Discord-style Markdown in message bodies:

- Headings: `# H1`, `## H2`, `### H3`
- Quotes: `> quoted text`
- Bullets: `- item` and `* item`
- Inline styles: `**bold**`, `*italic*`, and `` `inline code` ``
- Fenced code blocks with optional language labels, rendered as compact boxes
- Raw URLs and markdown link destinations are underlined and can be opened from message actions

### Reactions & Polls

- View, add, and remove emoji reactions (Unicode and custom server emoji)
- Use custom emoji from other servers as reactions when your account supports it
- Browse who reacted with a specific emoji
- View and vote on polls

### Media & Images

- Inline image previews directly in the terminal
- Avatar and custom emoji rendering
- Download attachments to your platform Downloads directory (`XDG_DOWNLOAD_DIR` on Linux)
- Large centered attachment viewer with navigation

Image rendering is powered by [ratatui-image](https://github.com/benjajaja/ratatui-image). On startup, Concord queries the terminal to detect the best available graphics protocol. Supported protocols:

- **Kitty Graphics Protocol** - Kitty, WezTerm, Ghostty, etc.
- **iTerm2 Inline Images** - iTerm2, WezTerm, mintty, etc.
- **Sixel** - foot, mlterm, xterm (if compiled with Sixel support), etc.
- **Halfblocks** (fallback) - works on any terminal, but uses block characters instead of true pixels.

If your terminal does not support any graphics protocol, images will be rendered as halfblock approximations. For the best experience, use a terminal that supports the Kitty or iTerm2 protocol.

You can toggle image viewing on or off in the configuration file. When image viewing is off, attachments and emojis will be shown as text placeholders.

### Members & Profiles

- Member list with grouping
- Presence indicators (Online, Idle, DND, Offline)
- View User profile

### Typing Indicators & Read State

- Live "user is typing..." indicators
- Unread message tracking with mention counts
- Mark server, channel as read

### Notifications

- Desktop notifications for Discord messages that pass your Discord
  notification settings
- Active channel notifications are suppressed so Concord does not notify for
  the conversation you are already viewing
- Voice join and leave notification sounds while you are connected to voice.
  You can keep the built-in tones or configure custom WAV files.

### Navigation & Keyboard shortcuts

> ⚠️ Keymap action names and default bindings may have breaking changes between releases.

All default key settings in this section can be customized. See
[Keymap options](#keymap-options) for the config format and supported actions.

Concord has a four-pane layout like Discord.
**Guilds (1)**, **Channels (2)**, **Messages (3)**, **Members (4)**

With default vim-style navigation:

| Key                                       | Action                                          |
| ----------------------------------------- | ----------------------------------------------- |
| `1` `2` `3` `4`                           | Focus pane                                      |
| `Tab` / `Shift+Tab`                       | Cycle focus forward / backward                  |
| `h` / `l`, `` / ``                      | Move focus left / right                         |
| `j` / `k`, `` / ``, `Ctrl+n` / `Ctrl+p` | Move down / up                                  |
| `J`, `K` / `H`, `L`                       | Scroll viewport                                 |
| `Ctrl+d` / `Ctrl+u`                       | Half-page scroll                                |
| `Alt+h/l/←/→`                             | Resize focused pane width                       |
| `gg` / `G`                                | Jump or scroll to top / bottom                  |
| `Enter`                                   | Open or activate the selected item              |
| `/`                                       | Filter Guilds/Channels, search Messages/Members |
| `Space`                                   | Open leader shortcut window                     |
| `i`                                       | Text insert mode                                |
| `Esc`                                     | Close popup, cancel mode, or go back            |
| `q`                                       | Quit Concord                                    |

`Ctrl+n` and `Ctrl+p` are fixed row movement keys. The default `j` and `k`
row movement keys are `SelectNext` and `SelectPrevious` and can be changed in
`keymap.toml`.

#### Leader key

Press `Space` to open the leader shortcut window.

| Key sequence     | Action                            |
| ---------------- | --------------------------------- |
| `Space`, `1`     | Toggle the Servers pane           |
| `Space`, `2`     | Toggle the Channels pane          |
| `Space`, `4`     | Toggle the Members pane           |
| `Space`, `a`     | Open actions for the focused pane |
| `Space`, `o`     | Choose concord option category    |
| `Space`, `v`     | Voice command prefix              |
| `Space`, `Space` | Open the fuzzy channel switcher   |

#### Action menus

Focus a pane, then press `Space`, `a` to open actions for that pane. Action
shortcuts are shown inside the leader popup and only run when the action is
enabled. In the Messages pane, the selected message also supports these direct
shortcuts:

Message shortcuts:

| Shortcut | Action              | Description                                                 |
| -------- | ------------------- | ----------------------------------------------------------- |
| `y`      | Copy                | Copy the selected message text and show a short toast       |
| `r`      | Add/remove reaction | Open the reaction picker for the selected message           |
| `R`      | Reply               | Start a reply to the selected message                       |
| `d`      | Delete              | Open a delete confirmation before deleting the message      |
| `e`      | Edit                | Start editing the selected message when editing is allowed  |
| `o`      | Open URL            | Open the selected message URL, or choose from multiple URLs |
| `v`      | View attachment     | Open the selected message's attachment viewer               |

Message action menu shortcuts:

| Shortcut | Action                      | Description                                                 |
| -------- | --------------------------- | ----------------------------------------------------------- |
| `y`      | Copy                        | Copy the selected message text and show a short toast       |
| `r`      | Add/remove reaction         | Open the reaction picker for the selected message           |
| `R`      | Reply                       | Start a reply to the selected message                       |
| `d`      | Delete                      | Open a delete confirmation before deleting the message      |
| `e`      | Edit                        | Start editing the selected message when editing is allowed  |
| `o`      | Open URL                    | Open the selected message URL, or choose from multiple URLs |
| `v`      | View attachment             | Open the selected message's attachment viewer               |
| `g`      | Go to referenced message    | Go to the replied or forwarded message                      |
| `p`      | show message sender profile | Open the selected message author's profile                  |
| `P`      | Pin / unpin                 | Open a pin or unpin confirmation for the selected message   |
| `t`      | Open thread                 | Open the selected message's thread                          |
| `u`      | Show reacted users          | Show users who reacted to the selected message              |
| `c`      | Choose poll votes           | Choose poll votes for the selected message                  |

If a message contains more than one detected URL, `o` opens a numbered URL picker inside the leader popup so you can choose which link to open.

Server actions:

| Shortcut | Action              | Description                                           |
| -------- | ------------------- | ----------------------------------------------------- |
| `m`      | Mark server as read | Mark all unread viewable channels in this server read |
| `u`      | Mute / unmute       | Toggle server notification mute                       |
| `l`      | Leave server        | Open a confirmation before leaving this server        |

Channel actions:

| Shortcut | Action               | Description                                  |
| -------- | -------------------- | -------------------------------------------- |
| `j`      | Join voice           | Join the selected voice channel              |
| `l`      | Leave voice          | Leave the current voice channel              |
| `p`      | Show pinned messages | Open the selected channel's pinned messages  |
| `t`      | Show threads         | List threads for the selected channel        |
| `m`      | Mark as read         | Mark the selected channel read               |
| `u`      | Mute / unmute        | Toggle channel or category notification mute |

Voice commands:

| Sequence          | Action       | Description                               |
| ----------------- | ------------ | ----------------------------------------- |
| `Space`, `v`, `d` | Deafen voice | Toggle Concord's Discord voice deaf state |
| `Space`, `v`, `m` | Mute voice   | Toggle Concord's Discord voice mute state |
| `Space`, `v`, `l` | Leave voice  | Leave the current Concord voice channel   |

When the attachment viewer is open, press `d` to download the current attachment directly.

Hidden side panes give their width back to Messages. Pressing a hidden pane's
number key directly shows and focuses it again.

#### Composer

You can paste copied files into the composer to attach them. Pending uploads
are shown above the input before sending.

| Shortcut                   | Action            | Description                                                      |
| -------------------------- | ----------------- | ---------------------------------------------------------------- |
| `Ctrl+v`                   | paste clipboard   | Attach copied files or images when present, otherwise paste text |
| `Ctrl+e`                   | open $EDITOR      | Open $EDITOR on the current draft for long editing               |
| `Ctrl+c`                   | clear             | Clear current draft                                              |
| `Ctrl+Left`/ `Ctrl+Right`  | Jump word         | Jump the cursor by word                                          |
| `Ctrl+Backspace`/ `Ctrl+w` | Delete word       | Delete the word before the cursor                                |
| `Delete`                   | Detach attachment | Removes the last pending attachment                              |

#### Mention picker

When the @mention picker is open, use `Up` / `Down`,
`Ctrl+p` / `Ctrl+n`, `Tab`, or `Enter` to choose a mention.

#### Emoji picker

Type `:` plus at least two letters, such as `:he`, to pick Unicode, server, or
cross-server custom emoji while writing a message.

When `emojis_as_links` is enabled, custom emoji your account cannot send
directly are inserted as Discord image links instead.

To react from the composer, select a message, enter insert mode, then type
`+:`. The reaction picker opens for that message. Press `/` to search, Enter to
lock the filter, then Enter again or use a shown shortcut to react.

#### Bot commands

When the composer input starts with a slash `/`, the command suggestion popup

#### Mouse support

Mouse support is also available: click to focus or select rows, double-click to
open or activate items, and use the wheel to scroll panes and popups.

### Configuration

Concord options are stored under Concord's config directory. If
`XDG_CONFIG_HOME` is set, Concord uses `$XDG_CONFIG_HOME/concord/config.toml`
for app options and `$XDG_CONFIG_HOME/concord/keymap.toml` for key settings.
Otherwise it uses the platform config directory. The usual fallback is
`~/.config/concord/config.toml` and `~/.config/concord/keymap.toml` on Linux,
matching files under `~/Library/Application Support/concord/` on macOS, and the
roaming AppData config directory on Windows.

- Disable all image previews with one master switch
- Toggle inline image previews
- Set image preview quality for attachments, embeds, and the attachment viewer
- Toggle avatar display
- Toggle custom emoji rendering
- Send custom emoji your account cannot use directly as image links
- Toggle desktop notifications
- Set your Discord voice mute and deaf state
- Set microphone and received voice volume from 0 to 100
- Allow gated microphone transmit while joined from this Concord session and not
  self-muted

You can change these from the in-app Options menu, and Concord saves them back
to `config.toml`. Key settings are read from `keymap.toml`.

Example:

```toml
[display]
# Master switch that hides all image previews when true.
disable_image_preview = false

# Show user avatars next to messages and in profile views.
show_avatars = true

# Render inline image previews for attachments and embeds.
show_images = true

# Preview quality: efficient, balanced, high, or original.
image_preview_quality = "balanced"

# Render custom Discord emoji as images when possible.
show_custom_emoji = true

# Crop avatars into circles instead of showing square images.
circular_avatars = false

[composer]
# Send custom emoji your account cannot use directly as image links.
emojis_as_links = false

[notifications]
# Show desktop notifications for Discord messages that pass notification rules.
desktop_notifications = true

# Optional notification icon to include in notifications. May not work on all platforms.
# When unset, no icon is used. It must either be a name of an icon (typically in /usr/share/icons)
# or a path to an icon.
notification_icon = "/path/to/icon.svg"

# Optional WAV files for voice join and leave notification sounds.
# When unset, Concord uses built-in generated tones.
voice_join_sound = "/path/to/join.wav"
voice_leave_sound = "/path/to/leave.wav"

[voice]
# Join or update Discord voice with Concord self-muted.
self_mute = false

# Join or update Discord voice with Concord self-deafened.
self_deaf = false

# Allow microphone transmit while this session is joined and not self-muted.
allow_microphone_transmit = false

# Voice activity threshold in dB. Lower values transmit quieter input.
microphone_sensitivity = -30

# Microphone input volume percentage, from 0 to 100.
microphone_volume = 100

# Received voice playback volume percentage, from 0 to 100.
voice_output_volume = 100
```

`image_preview_quality` supports these values:

- `efficient`: smaller preview requests to reduce bandwidth and memory use.
- `balanced`: default quality with bounded resource use.
- `high`: sharper resized previews using lossless quality.
- `original`: request the original source image for previews when possible.

This setting only applies to attachment, embed, and attachment viewer previews.
Avatars and custom emoji keep their separate small-image behavior.

`desktop_notifications` under `[notifications]` controls OS notifications for Discord messages that
pass Discord notification settings.

`microphone_volume` and `voice_output_volume` accept `0` to `100` percent
and default to `100`, which preserves the normal audio level. In Voice Options, select
sensitivity and press `h`/`l` to adjust by 1 dB or `H`/`L` to adjust by 10 dB.

#### Keymap options

> ⚠️ Keymap action names and default bindings may have breaking changes between releases.

Concord reads key settings from the `[keymap]` section in `keymap.toml`.

Example `keymap.toml`:

```toml
[keymap]
StartComposer = { keys = ["c"] }
ReplyMessage = "<leader>mr"
VoiceDeafen = "<leader>vd"
VoiceMute = "<leader>vm"
VoiceLeave = "<leader>vl"

[keymap.groups]
"<leader>v" = "Voice"

[keymap.guild_actions]
LeaveServer = { keys = ["l"], description = "leave server" }

[keymap.channel_actions]
MuteChannel = { keys = ["x"], description = "mute channel" }

[keymap.message_actions]
OpenThread = { keys = ["t"], description = "open thread" }
GoToReferencedMessage = "g"

[keymap.composer]
OpenEditor = "<C-o>"
DeletePreviousWord = "<A-backspace>"
```

There are six kinds of keymap settings:

| Config path                                                                                                 | What it controls                                                                          |
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `[keymap] leader`                                                                                           | The key that opens the leader popup. Defaults to `Space`.                                 |
| `[keymap] <ActionName>`                                                                                     | Directly assignable UI actions such as `StartComposer`, `ReplyMessage`, and `OpenThread`. |
| `[keymap.groups]`                                                                                           | Optional titles for prefix popups, such as naming `<leader>v` as `Voice`.                 |
| `[keymap.guild_actions]`, `[keymap.channel_actions]`, `[keymap.message_actions]`, `[keymap.member_actions]` | Shortcuts shown inside focused-pane action menus opened by `OpenFocusedPaneAction`.       |
| `[keymap.composer]`                                                                                         | Shortcuts used while the message composer is open, such as editor and cursor commands.    |

`[keymap]` action values can be either a string or an object with `keys` and an
optional `description`:

```toml
[keymap]
StartComposer = "<leader>e"
ChannelSwitcher = { keys = ["<C-w>f", "<leader><C-w>"], description = "find channel" }
```

`keys` accepts one sequence or a list of sequences. Modifier chords use
Vim-style angle syntax, such as `<C-f>`, `<S-tab>`, and `<A-backspace>`.
Leader sequences like `<leader><C-w>`, compact plain sequences like `fd`, and
general multi-key prefixes like `<C-w>f` are supported. Prefix sequences show a
[which-key.nvim](https://github.com/folke/which-key.nvim) style popup. For example, `fd` opens an `f` popup after `f`, then runs
the action after `d`.

Scoped action tables use the same string or object shape, but each `keys` entry
must be a single key chord. Multi-key sequences such as `gt` are only supported
by direct `[keymap]` actions, not by `[keymap.guild_actions]`,
`[keymap.channel_actions]`, `[keymap.message_actions]`, or
`[keymap.member_actions]`.

```toml
[keymap.channel_actions]
MuteChannel = { keys = ["u", "<C-u>"], description = "mute channel" }

[keymap.message_actions]
GoToReferencedMessage = { keys = ["g"], description = "go to referenced message" }
```

Composer action values under `[keymap.composer]` use the same string or object
shape, but each `keys` entry must be one key chord because composer commands run
immediately while text is being typed:

```toml
[keymap.composer]
OpenEditor = { keys = ["<C-o>"], description = "open editor" }
DeletePreviousWord = "<A-backspace>"
```

Direct `[keymap]` actions and `leader` cannot use reserved keys: `Enter`, `Esc`,
`Backspace`, `Delete`, `Ctrl+c`, `Ctrl+n`, or `Ctrl+p`. Invalid, reserved, or
conflicting bindings are ignored for that action. `[keymap.composer]` is separate
and can remap those editing keys. `Ctrl+n` and `Ctrl+p` always move row
selection down and up.

##### Directly assignable actions

These action names can be assigned directly under `[keymap]`. Defaults
that start with `<leader>` are shown without the leading `Space` in the leader
popup. `OpenDisplayOptions`, `OpenComposerOptions`, `OpenNotificationOptions`,
and `OpenVoiceOptions` have contextual defaults inside the Options popup, so
assign your own full sequence if you want direct keys for them.

Navigation and app actions:

| Action name                 | Default config             | Action                                   |
| --------------------------- | -------------------------- | ---------------------------------------- |
| `StartComposer`             | `"i"`                      | Start the message composer.              |
| `OpenPaneFilter`            | `"/"`                      | Open the focused pane filter or search.  |
| `FocusGuildPane`            | `"1"`                      | Show and focus the Servers pane.         |
| `FocusChannelPane`          | `"2"`                      | Show and focus the Channels pane.        |
| `FocusMessagePane`          | `"3"`                      | Focus the Messages pane.                 |
| `FocusMemberPane`           | `"4"`                      | Show and focus the Members pane.         |
| `SelectNext`                | `"j"`                      | Move selection down in navigation lists. |
| `SelectPrevious`            | `"k"`                      | Move selection up in navigation lists.   |
| `CycleFocusNext`            | `["tab", "l", "right"]`    | Cycle focus forward.                     |
| `CycleFocusPrevious`        | `["<S-tab>", "h", "left"]` | Cycle focus backward.                    |
| `HalfPageDown`              | `"<C-d>"`                  | Half-page down.                          |
| `HalfPageUp`                | `"<C-u>"`                  | Half-page up.                            |
| `ScrollMessageViewportDown` | `"J"`                      | Scroll the message viewport down.        |
| `ScrollMessageViewportUp`   | `"K"`                      | Scroll the message viewport up.          |
| `JumpTop`                   | `"gg"`                     | Jump to the top.                         |
| `JumpBottom`                | `"G"`                      | Jump to the bottom.                      |
| `ScrollHorizontalLeft`      | `"H"`                      | Scroll focused pane horizontally left.   |
| `ScrollHorizontalRight`     | `"L"`                      | Scroll focused pane horizontally right.  |
| `ResizePaneLeft`            | `["<A-h>", "<A-left>"]`    | Shrink the focused pane width.           |
| `ResizePaneRight`           | `["<A-l>", "<A-right>"]`   | Grow the focused pane width.             |
| `Quit`                      | `"q"`                      | Quit Concord.                            |

Message actions:

| Action name             | Default config | Action                                          |
| ----------------------- | -------------- | ----------------------------------------------- |
| `CopyMessage`           | `"y"`          | Copy selected message content.                  |
| `ReactMessage`          | `"r"`          | Add or remove a reaction.                       |
| `ReplyMessage`          | `"R"`          | Start a reply.                                  |
| `DeleteMessage`         | `"d"`          | Open delete confirmation.                       |
| `EditMessage`           | `"e"`          | Start editing the selected message.             |
| `OpenMessageUrl`        | `"o"`          | Open the selected message URL.                  |
| `ViewMessageAttachment` | `"v"`          | Open the selected message attachment viewer.    |
| `GoToReferencedMessage` | none           | Go to the replied or forwarded message.         |
| `ShowMessageProfile`    | none           | Open the selected message author's profile.     |
| `PinMessage`            | none           | Open pin or unpin confirmation.                 |
| `OpenThread`            | none           | Open the selected message's thread.             |
| `ShowReactionUsers`     | none           | Show users who reacted to the selected message. |
| `OpenPollVotePicker`    | none           | Choose poll votes for the selected message.     |

Pane, options, and voice actions:

| Action name               | Default config                     | Action                                       |
| ------------------------- | ---------------------------------- | -------------------------------------------- |
| `ToggleGuildPane`         | `"<leader>1"`                      | Toggle the Servers pane.                     |
| `ToggleChannelPane`       | `"<leader>2"`                      | Toggle the Channels pane.                    |
| `ToggleMemberPane`        | `"<leader>4"`                      | Toggle the Members pane.                     |
| `OpenFocusedPaneAction`   | `"<leader>a"`                      | Open actions for the currently focused pane. |
| `OpenOptions`             | `"<leader>o"`                      | Open the options category picker.            |
| `ChannelSwitcher`         | `"<leader><leader>"`               | Open channel switcher.                       |
| `OpenDisplayOptions`      | Contextual `d` after `OpenOptions` | Open Display options.                        |
| `OpenComposerOptions`     | Contextual `c` after `OpenOptions` | Open Composer options.                       |
| `OpenNotificationOptions` | Contextual `n` after `OpenOptions` | Open Notification options.                   |
| `OpenVoiceOptions`        | Contextual `v` after `OpenOptions` | Open Voice options.                          |
| `VoiceDeafen`             | `"<leader>vd"`                     | Toggle voice deafen.                         |
| `VoiceMute`               | `"<leader>vm"`                     | Toggle voice mute.                           |
| `VoiceLeave`              | `"<leader>vl"`                     | Leave the current Concord voice channel.     |

##### Composer actions

These action names can be assigned under `[keymap.composer]`. Configured keys
replace that action's defaults. Any printable single character can be configured,
but that key will run the composer action instead of inserting text.

| Composer action        | Default config                            | Action                               |
| ---------------------- | ----------------------------------------- | ------------------------------------ |
| `OpenEditor`           | `"<C-e>"`                                 | Open the current draft in `$EDITOR`. |
| `PasteClipboard`       | `"<C-v>"`                                 | Request clipboard paste.             |
| `InsertNewline`        | `["<S-enter>", "<C-enter>", "<A-enter>"]` | Insert a newline.                    |
| `Submit`               | `"enter"`                                 | Submit the composer.                 |
| `Close`                | `"esc"`                                   | Close the composer.                  |
| `ClearInput`           | `"<C-c>"`                                 | Clear the composer input.            |
| `RemoveLastAttachment` | `"delete"`                                | Remove the last pending attachment.  |
| `DeletePreviousChar`   | `"backspace"`                             | Delete the previous character.       |
| `DeletePreviousWord`   | `["<C-backspace>", "<C-w>"]`              | Delete the word before the cursor.   |
| `MoveCursorUp`         | `"up"`                                    | Move the cursor up.                  |
| `MoveCursorDown`       | `"down"`                                  | Move the cursor down.                |
| `MoveCursorWordLeft`   | `"<C-left>"`                              | Move the cursor one word left.       |
| `MoveCursorLeft`       | `"left"`                                  | Move the cursor left.                |
| `MoveCursorWordRight`  | `"<C-right>"`                             | Move the cursor one word right.      |
| `MoveCursorRight`      | `"right"`                                 | Move the cursor right.               |
| `MoveCursorHome`       | `"home"`                                  | Move the cursor to the start.        |
| `MoveCursorEnd`        | `"end"`                                   | Move the cursor to the end.          |

##### Focused pane actions

`OpenFocusedPaneAction` opens the action menu for the pane that currently has
focus. Server, channel, message, and member pane actions can be configured in
scoped tables. Focused-pane action menus keep their actions visible, and actions
that do not apply to the current selection are shown dimmed and disabled.

Server pane actions:

```toml
[keymap.guild_actions]
MarkAsRead = { keys = ["m"], description = "mark server as read" }
MuteServer = { keys = ["u"], description = "mute server" }
LeaveServer = { keys = ["l"], description = "leave server" }
```

| Scoped action | Default | Action                                                                     |
| ------------- | ------- | -------------------------------------------------------------------------- |
| `MarkAsRead`  | `m`     | Mark all unread viewable channels in the selected server read.             |
| `MuteServer`  | `u`     | Mute or unmute the selected server. Also accepts `ToggleMute` as an alias. |
| `LeaveServer` | `l`     | Open confirmation to leave the selected server.                            |

Channel pane actions:

```toml
[keymap.channel_actions]
JoinVoice = { keys = ["j"], description = "join voice" }
LeaveVoice = { keys = ["l"], description = "leave voice" }
ShowPinnedMessages = { keys = ["p"], description = "show pinned messages" }
ShowThreads = { keys = ["t"], description = "show threads" }
MarkAsRead = { keys = ["m"], description = "mark as read" }
MuteChannel = { keys = ["u"], description = "mute channel" }
```

| Scoped action        | Default | Action                                                                                      |
| -------------------- | ------- | ------------------------------------------------------------------------------------------- |
| `JoinVoice`          | `j`     | Join the selected voice channel.                                                            |
| `LeaveVoice`         | `l`     | Leave the current Concord voice channel.                                                    |
| `ShowPinnedMessages` | `p`     | Open the selected channel's pinned messages. Also accepts `LoadPinnedMessages` as an alias. |
| `ShowThreads`        | `t`     | List threads for the selected channel.                                                      |
| `MarkAsRead`         | `m`     | Mark the selected channel read.                                                             |
| `MuteChannel`        | `u`     | Mute or unmute the selected channel or category. Also accepts `ToggleMute` as an alias.     |

Member pane actions:

```toml
[keymap.member_actions]
ShowProfile = { keys = ["p"], description = "show profile" }
```

| Scoped action | Default | Action                              |
| ------------- | ------- | ----------------------------------- |
| `ShowProfile` | `p`     | Open the selected member's profile. |

Message pane actions:

```toml
[keymap.message_actions]
CopyMessage = "y"
ReactMessage = "r"
ReplyMessage = "R"
DeleteMessage = "d"
EditMessage = "e"
OpenMessageUrl = "o"
ViewMessageAttachment = "v"
GoToReferencedMessage = "g"
ShowMessageProfile = "p"
PinMessage = "P"
OpenThread = "t"
ShowReactionUsers = "u"
OpenPollVotePicker = "c"
```

| Scoped action           | Default | Action                                          |
| ----------------------- | ------- | ----------------------------------------------- |
| `CopyMessage`           | `y`     | Copy selected message content.                  |
| `ReactMessage`          | `r`     | Add or remove a reaction.                       |
| `ReplyMessage`          | `R`     | Start a reply.                                  |
| `DeleteMessage`         | `d`     | Open delete confirmation.                       |
| `EditMessage`           | `e`     | Start editing the selected message.             |
| `OpenMessageUrl`        | `o`     | Open the selected message URL.                  |
| `ViewMessageAttachment` | `v`     | Open the selected message attachment viewer.    |
| `GoToReferencedMessage` | `g`     | Go to the replied or forwarded message.         |
| `ShowMessageProfile`    | `p`     | Open the selected message author's profile.     |
| `PinMessage`            | `P`     | Open pin or unpin confirmation.                 |
| `OpenThread`            | `t`     | Open the selected message's thread.             |
| `ShowReactionUsers`     | `u`     | Show users who reacted to the selected message. |
| `OpenPollVotePicker`    | `c`     | Choose poll votes for the selected message.     |

Direct `[keymap]` message action bindings are separate. For example,
`GoToReferencedMessage = "gd"` under `[keymap]` makes `gd` work directly from the
Messages pane, while `[keymap.message_actions] GoToReferencedMessage = "g"`
controls the action menu shortcut.

Scoped action `description` changes the label shown in server, channel, and
message, and member action menus. Multiple configured `keys` work as aliases
when they are unique in the current action menu, and the popup shows them
together, such as `[x/u]`. If two actions in the same menu use the same
configured key, that key is ignored for both actions. If
an action has no unique configured key, it falls back to `1` through `9`, then
`0`.

<details>
<summary>Default keymap config</summary>

```toml
[keymap]
leader = "space"
StartComposer = "i"
OpenPaneFilter = "/"
FocusGuildPane = "1"
FocusChannelPane = "2"
FocusMessagePane = "3"
FocusMemberPane = "4"
SelectNext = "j"
SelectPrevious = "k"
CycleFocusNext = { keys = ["tab", "l", "right"] }
CycleFocusPrevious = { keys = ["<S-tab>", "h", "left"] }
HalfPageDown = "<C-d>"
HalfPageUp = "<C-u>"
ScrollMessageViewportDown = "J"
ScrollMessageViewportUp = "K"
JumpTop = "gg"
JumpBottom = "G"
ScrollHorizontalLeft = "H"
ScrollHorizontalRight = "L"
ResizePaneLeft = { keys = ["<A-h>", "<A-left>"] }
ResizePaneRight = { keys = ["<A-l>", "<A-right>"] }
Quit = "q"
CopyMessage = "y"
ReactMessage = "r"
ReplyMessage = "R"
DeleteMessage = "d"
EditMessage = "e"
OpenMessageUrl = "o"
ViewMessageAttachment = "v"
ToggleGuildPane = "<leader>1"
ToggleChannelPane = "<leader>2"
ToggleMemberPane = "<leader>4"
OpenFocusedPaneAction = "<leader>a"
OpenOptions = "<leader>o"
ChannelSwitcher = "<leader><leader>"
VoiceDeafen = "<leader>vd"
VoiceMute = "<leader>vm"
VoiceLeave = "<leader>vl"

[keymap.groups]
"<leader>v" = "Voice"

[keymap.guild_actions]
MarkAsRead = "m"
MuteServer = "u"
LeaveServer = "l"

[keymap.channel_actions]
JoinVoice = "j"
LeaveVoice = "l"
ShowPinnedMessages = "p"
ShowThreads = "t"
MarkAsRead = "m"
MuteChannel = "u"

[keymap.message_actions]
CopyMessage = "y"
ReactMessage = "r"
ReplyMessage = "R"
DeleteMessage = "d"
EditMessage = "e"
OpenMessageUrl = "o"
ViewMessageAttachment = "v"
GoToReferencedMessage = "g"
ShowMessageProfile = "p"
PinMessage = "P"
OpenThread = "t"
ShowReactionUsers = "u"
OpenPollVotePicker = "c"

[keymap.member_actions]
ShowProfile = "p"

[keymap.composer]
OpenEditor = "<C-e>"
PasteClipboard = "<C-v>"
InsertNewline = { keys = ["<S-enter>", "<C-enter>", "<A-enter>"] }
Submit = "enter"
Close = "esc"
ClearInput = "<C-c>"
RemoveLastAttachment = "delete"
DeletePreviousChar = "backspace"
DeletePreviousWord = { keys = ["<C-backspace>", "<C-w>"] }
MoveCursorUp = "up"
MoveCursorDown = "down"
MoveCursorWordLeft = "<C-left>"
MoveCursorLeft = "left"
MoveCursorWordRight = "<C-right>"
MoveCursorRight = "right"
MoveCursorHome = "home"
MoveCursorEnd = "end"
```

</details>

## Performance

Concord is designed to stay lightweight in normal terminal use. In observed
typical use, it usually uses about 20-40 MB of memory.

Image-heavy screens can temporarily use more memory because compressed image
bytes need to be decoded before they can be rendered in the terminal. When many
images are loaded, memory can briefly rise to around 100-200 MB while decoding
and then drop again as work completes and caches are pruned.

To keep resource usage bounded, Concord limits media work in several places:

- Attachment previews are downloaded with an 8 MiB per-preview cap.
- Attachment downloads are capped at 64 MiB.
- Up to 4 attachment previews are fetched at once.
- Up to 2 inline image previews are decoded at once.
- Inline image previews, avatars, and custom emoji use small LRU caches.
- Image preview requests prefer resized Discord proxy URLs sized for the
  terminal instead of original full-size media when possible.
- The preview quality preset can lower preview source dimensions or opt into
  original source images. It does not change avatar or custom emoji sizing.

Message history is also cached with a per-channel limit, so long-running
sessions do not keep every message in memory forever.

## FAQ

### Can my account be blocked?

Honestly, no.

There are some path that did trigger a account block:

- Trying to **create a new DM channel and send a message to an unknown user**(meaning there was no pre-existing DM created through the Discord client) can immediately block your account temporarily.
- Some features that requires a hCapcha challenge on Discord's side.

Other features have not caused blocks in my testing.

That said, Concord is not an official Discord client. Using unofficial clients, automated user accounts, or self-bots can violate Discord's TOS, so there is always some risk. Use it at your own discretion.

### Does Concord support CAPTCHA?

No. If Discord requires a CAPTCHA during login, use token login instead.

## Security

- Tokens are stored as **plain text** in Concord's config directory. So keep that file secure and do not share it. You can use the token from that file to log in to the official Discord client, so treat it like a password.
- On Unix, the credential's parent directory is created with `0700` and the credential file with `0600` permissions.
- All concord state (config, keymap, credential, log) lives under a single `concord/` directory inside `XDG_CONFIG_HOME` when it is set, or inside the platform config directory otherwise.
- No system keychain integration yet.

## Contributing

Any issues, pull requests, and feedback are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.

## License

Concord is licensed under GPL-3.0-only.