Discord Sync CLI

Canonical version: Discord Sync CLI.

Discord Sync CLI (discord-sync) is a CLI/TUI I built to export and synchronize Discord servers, channels, and threads to JSON, HTML & Markdown. Years of community knowledge live in Discord, and none of it is really yours: no offline access, no proper export, and attachment links that silently expire. This tool turns any channel your token can read into a local archive you own and can explore.

Under the hood, it drives DiscordChatExporter through Docker, then adds everything that makes archiving practical over time: sync-state tracking, incremental updates, asset preservation, and readable output.

2026-08-25 - discord export channel

Caption: Exporting a Discord channel with discord-sync

2026-08-25 - discord export thread

Caption: A synchronized thread, rendered for offline reading

Features

  • Interactive TUI (discord-sync tui) — browse every server your token can see, drill into channels, select what to sync (✓ synced, ◇ selected), and queue syncs
  • Full CLI parity — every TUI scenario is scriptable: servers, channels, select, sync, sync-all, and more
  • Incremental syncs — only messages newer than the last recorded message ID are fetched, then merged into the master exports
  • Asset preservation — Discord CDN links are signed and expire; discord-sync assets downloads attachments, embeds, and stickers into a local store keyed by stable URLs, before the links die
  • HTML + Markdown output — one page/file per thread plus an index, with Discord deep links back to every message. The HTML includes an "Explored" review workflow; the Markdown is Obsidian-friendly, with YAML frontmatter and an explore flag for triage

Requirements

  • Docker — exports run through the official tyrrrz/discordchatexporter image (pulled automatically on first use)
  • A Discord token — bot or user. Careful: automating a user token violates Discord's Terms of Service and can lead to account termination; use a bot token where possible
  • Bun ≥ 1.4 — only to build from source; release binaries exist for Linux, macOS, and Windows

References


About Sébastien

Ready to get to the next level?

Found this valuable? Share it with someone who needs it.

Join 6,000+ readers. Get practical systems for knowledge & AI. Free.

Subscribe ✨

Free: Knowledge System Checklist

A clear roadmap to building your own knowledge system. Subscribe and get it straight to your inbox.

6,000+ readers. No spam. Unsubscribe anytime.

Subscribe