Skip to content
Silvertree2010Public

About

Native moddable client for Discord, Matrix and Stoat

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

94 Commits

Folders and files

Repository files navigation

cord

A native, moddable chat client for Discord, Matrix and Stoat in one app.

Servers, spaces, DMs and friends from all three networks share a single server bar and a single friends list. Every object carries a small network badge, everything else behaves the same.

Status

Early development. Nothing here is usable yet.

Goals

  • Full Discord feature parity: text, threads, forums, reactions, embeds, stickers, voice, video, screen share with audio, stages, soundboard, events, server management
  • Matrix (via matrix-rust-sdk, with E2EE) and Stoat on the same footing
  • Built-in client mods that usually need Vencord: message logger, hidden channels, silent typing, emoji and sticker passthrough, stream quality unlock, Spotify controls, translation and more, each toggleable
  • Block based UI: every panel is a block. Pick a preset on first launch, flip simple toggles, or rearrange everything in edit mode. Layouts are plain files and can be shared
  • Themes with hot reload, design tokens and full QML component overrides
  • Mod API in QML/JS, the built-in features use the same API

Stack

Rust core, Qt 6 / QML UI through cxx-qt. Voice through PipeWire and Opus, Discord E2EE through libdave, Matrix and Stoat calls through LiveKit, screen capture through the XDG desktop portal with hardware encoding.

Screenshots

Chat

Setup

Install

From source into ~/.local, or any other prefix via PREFIX=:

./install.sh
./install.sh --uninstall

The script builds a release binary, installs bin/cord, share/cord/qml, the desktop entry and the icon, and prints the Arch package names of any missing dependency.

On Arch Linux:

cd packaging/arch
makepkg -si

Runtime dependencies: Qt 6 (base, declarative, multimedia), GStreamer with base, good and bad plugins, gst-plugin-pipewire, PipeWire, libsecret, opus. Optional: playerctl, wl-clipboard or xclip.

Building

Requires Rust, Qt 6.8+ (base, declarative, multimedia), PipeWire, libsecret.

cargo run -p cord

Configuration

Everything lives in ~/.config/cord:

  • ui.json: layout and UI settings
  • cfg.json: application settings
  • themes/*.json: themes
  • mods/<name>/main.qml: mods
  • blocks/<id>.qml: overrides for built-in blocks

Local cache

Cord keeps a cache of recent messages in ~/.local/share/cord/cache.db (or $CORD_HOME/data/cache.db) so channels open instantly. It stores:

  • the last messages of every channel you opened, including direct messages and group chats, as plaintext JSON
  • message logger entries: edit history and the text of messages that were deleted, while the message logger is enabled

The file is created with mode 0600. It is capped at 500 messages per channel and about 20000 rows overall; when the global cap is hit the least recently used channels are dropped first. Matrix encrypted rooms are never cached, and neither are demo accounts. Removing an account deletes its cached rows.

To clear it, quit cord and delete cache.db together with cache.db-wal and cache.db-shm, or remove the account in the settings.

Only one cord instance can run per profile; a second launch prints a message and exits.

Mods

A mod is a directory with a main.qml under mods/.

Mods are full-trust arbitrary code. A mod runs inside the app process with the same rights as the app: it can read every message and token the UI can reach, call every backend function, read and write files in your config directory and run network requests. There is no sandbox and no permission system. Only install mods you have read or trust. The name core is reserved for built-in features. The cset helper refuses accs.json and cfg.json, and ls/rdf do not expose the data directory or *.sec files; these are guard rails against mistakes, not a security boundary.

import QtQuick
import Cord

Item {
    Component.onCompleted: {
        S.hook("send", o => o)
        S.regBlk("clock", Qt.resolvedUrl("Clock.qml"), "Clock")
    }
}

Theme format

A theme is a JSON object with the keys bg, bg2, bg3, bg4, hov, sel, ln, tx, tx2, tx3, ac, acTx, ok, warn, err, ment, r, rs, font, mono, fs and dens. Colors are #RRGGBB, or #RRGGBBAA when 8 digits are used.

Keyboard shortcuts

  • Ctrl+K: quick switcher
  • Ctrl+,: settings
  • Ctrl+E: edit layout
  • Alt+Up / Alt+Down: previous / next channel
  • Shift+Esc: mark read
  • Up: edit last message
  • Middle click: open in second chat

Disclaimer

Using third party clients on Discord is against Discord's Terms of Service and may get your account suspended. Use at your own risk. Matrix and Stoat explicitly allow third party clients.

Some built-in features deviate from what the official Discord client does and carry a higher ban risk. They are tagged ban in the feature list: silent typing, no read receipts, hidden channels, emoji and sticker passthrough, and stream quality unlock.

Discord REST calls are rate limited by Discord. Cord honours X-RateLimit-*, Retry-After and global limits per route bucket and waits instead of retrying blindly, but heavy automation from mods can still get an account flagged.

License

GPL-3.0-or-later

About

Native moddable client for Discord, Matrix and Stoat

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages