babyrite is a lightweight, fast citation message Discord bot.
# Latest Release
docker pull ghcr.io/m1sk9/babyrite:latest
# Minor Release
docker pull ghcr.io/m1sk9/babyrite:v2
# Specific Release
docker pull ghcr.io/m1sk9/babyrite:v2.0.0API Support: requires Discord API v10
- Message Previews: babyrite parses Discord message links and displays messages as embedded content.
- GitHub Permalink Expansion: babyrite can expand GitHub permalinks and display the content of the linked file.
- Lightweight: babyrite uses distroless as its base image and consists of a very lightweight Docker Image.
- Fast: babyrite is developed in Rust and is very fast!
- OSS: babyrite is open-source and licensed under the Apache License 2.0. It also provides a way to host it yourself as well as publish it as OSS.
- Easy to Use: babyrite is very easy to use and can be deployed in seconds.
Detects Discord message links (https://discord.com/channels/...) and expands them as embedded content.
- Supports Production, PTB, and Canary client URLs
- Expands up to 3 links per message
- Validates NSFW channels, permissions, and privacy
Detects GitHub permalinks (blob URLs containing a commit SHA) and expands file content as code blocks.
- Supports line range specifications (
#L10-L20) - Expands up to 3 links per message
- Display truncated to 50 lines by default (configurable); only the displayed lines are downloaded, up to a 1MB read limit
You can install babyrite using Docker. The following command will pull the latest version of babyrite.
docker pull ghcr.io/m1sk9/babyrite:v1- babyrite is tested on macOS and Linux (major distributions) as recommended environment.
- Also compatible with Windows, but we recommend running it on macOS or Linux. (v0.19.0+)
- Starting with macOS 28, Apple is ending support for Intel-based applications, so support has also been discontinued in babyrite (v1.4.7+).
- ARM64 environments are supported (v0.16.0+)
It is recommended to use Docker Compose when setting up babyrite. Direct startup using Docker images or binary files is also possible but not recommended.
services:
app:
image: ghcr.io/m1sk9/babyrite:v1
env_file:
- .env
restart: alwaysIf you are using orchestration tools such as k8s or Docker Swarm, please configure them according to their respective configuration files.
You can customize the behavior of babyrite by using a dedicated configuration file. The settings are written in TOML format. Refer to config/config.toml for configuration items.
You can also start with the default settings without configuring. The following are the default settings used in that case.
[log]
level = "babyrite=info"
format = "compact"
[features]
github_permalink = true
[github]
max_lines = 50| Key | Description | Default Value |
|---|---|---|
log.level |
Log level filter (same syntax as RUST_LOG). Overridden by RUST_LOG if set. |
"babyrite=info" |
log.format |
Log output format: "compact" or "json". |
"compact" |
json_logging |
Deprecated. Use log.format = "json". Only used when log.format is unset. |
false |
features.github_permalink |
Enable or disable GitHub Permalink expansion. | true |
github.max_lines |
Maximum number of lines to display without truncation. | 50 |
babyrite uses tracing and emits logs to standard output.
- Log level is resolved in this order: the
RUST_LOGenvironment variable (if set) takes precedence, otherwise thelog.levelsetting inconfig.tomlis used (defaultbabyrite=info). For development, setRUST_LOG=babyrite=debugorlog.level = "babyrite=debug"to surface detailed debug logs (cache hit/miss, external API timings, permission-check decisions). - Structured output for Grafana Loki and similar. Set
log.format = "json"to emit one JSON object per line. Each line carries structured fields — includingmessage_id,guild_id, andchannel_idfrom the per-request span — so a single request can be correlated end-to-end. Scrape the container's stdout with Promtail or Grafana Alloy and query the fields in LogQL with the| jsonparser.
The environment variables used by babyrite are as follows. Note that the only environment variable required for startup is DISCORD_API_TOKEN.
| Key | Description |
|---|---|
DISCORD_API_TOKEN |
Discord API token |
CONFIG_FILE |
Path to the configuration file (recursive path) |
RUST_LOG |
Log level filter. Overrides log.level in the configuration file when set. |
babyrite is published under Apache License 2.0.
® 2023 - 2026 m1sk9babyrite is not affiliated with Discord.