dsc-rs 0.2.1

Discourse CLI tool for managing multiple Discourse forums: track installs, run upgrades over SSH, manage emojis, sync topics and categories as Markdown, and more.
Documentation

dsc

A Discourse CLI tool written in Rust. Manage multiple Discourse forums from your terminal — track installs, run upgrades over SSH, manage emojis, perform backups, and sync topics and categories as local Markdown.

Most functionality uses the Discourse REST API. dsc update runs remote rebuilds via SSH.

Features

  • Track any number of Discourse installs via a single config file.
  • Manage categories, topics, settings, and groups across installs.
  • Run rebuilds over SSH and optionally post changelog updates.
  • Import from text or CSV, or add installs ad-hoc.
  • Pull/push individual topics or whole categories as Markdown.
  • Upload custom emojis in bulk.
  • List, install, and remove themes and plugins.
  • Create, list, and restore backups.

Installation

Prerequisites: a recent Rust toolchain (edition 2024; install via rustup).

# Clone and install
git clone https://github.com/bawmedical/dsc.git
cd dsc
cargo install --path .

Or build without installing:

cargo build --release
./target/release/dsc --help

Quick start

# Create a config file
cat > dsc.toml <<'EOF'
[[discourse]]
name = "myforum"
baseurl = "https://forum.example.com"
apikey = "<api key>"
api_username = "system"
ssh_host = "forum.example.com"
changelog_topic_id = 123
EOF

# List configured forums
dsc list

# Pull a topic into Markdown for editing
dsc topic pull myforum 42

# Push the edited topic back up
dsc topic push myforum ./topic-title.md 42

# Update a forum over SSH
dsc update myforum

Documentation

  • Configuration — config file format, search order, field reference
  • Commands:
    • list — list and filter installs
    • open — open a Discourse in the browser
    • add — add installs to config
    • import — import installs from file or stdin
    • update — run OS and Discourse updates over SSH
    • emoji — upload and list custom emoji
    • topic — pull, push, and sync topics as Markdown
    • category — list, pull, push, and copy categories
    • palette — list, pull, and push colour palettes
    • plugin — list, install, and remove plugins
    • theme — list, install, remove, pull, push, and duplicate themes
    • group — list, inspect, and copy groups
    • backup — create, list, and restore backups
    • setting — get and set site settings
  • Shell completions — bash, zsh, and fish
  • Development — building, testing, releasing, project layout

License

MIT. See LICENSE.