| name | dsc |
| description | Manage Discourse forums from the command line — create and manage topics, posts, and categories using the dsc CLI. Use when working with a Discourse forum, creating posts or topics, managing categories, or any Discourse content task. |
dsc — Discourse CLI
dsc wraps the Discourse API. Install: gem install discourse_cli_tool
Setup
dsc config set --site mysite --host https://forum.example.com --api-key KEY --api-username admin
dsc config list
Config precedence: CLI flags > DISCOURSE_HOST / DISCOURSE_API_KEY / DISCOURSE_API_USERNAME env vars > ~/.config/dsc/config.yml
Global flags
| Flag | Description |
|---|
--site NAME | Use a named site from config |
--host URL | Override host |
--api-key KEY | Override API key |
--api-username USER | Override API username |
--json | Output raw JSON (pipe to jq) |
--quiet | Suppress output, exit code only |
Raw content (topics and posts)
Commands that accept --raw resolve content in this order:
--raw "inline content" — use directly
- No flag, stdin is piped — read from stdin
- No flag, interactive terminal — open
$EDITOR
dsc topics create --title "Hello" --raw "Content"
echo "Content" | dsc topics create --title "Hello"
dsc topics create --title "Hello"
Command reference
- references/categories.md — list, show, create, update, delete categories
- references/topics.md — list, show, create, update, delete topics
- references/posts.md — list, show, create, update, delete posts