dsc group¶
List, inspect, copy, and destroy groups.
dsc group list¶
Lists all groups with their IDs, names, and full names. -v/--verbose includes additional fields where supported.
dsc group info¶
Shows details for a specific group. --with-defaults additionally includes the group's category and tag notification-level defaults (watching_category_ids, tracking_tags, etc.) as returned by the Discourse API for admins/owners; omitted by default.
dsc group members¶
Lists members of the specified group.
dsc group copy¶
Copies the specified group. If --target is omitted, copies within the same Discourse.
- The copied group name is slugified and suffixed with
-copy(e.g.,staff->staff-copy). - The copied group full name is set to
Copy of <original full name>. - All other fields match the source, except the ID which is assigned by Discourse.
<group-id> can be found using dsc group list.
dsc group destroy¶
Permanently deletes a group via DELETE /admin/groups/:id.json. Refuses automatic (built-in) groups such as admins or trust_level_1, as Discourse does. Honours --dry-run, which reports the resolved group and exact request without changing anything. JSON/YAML output returns the group's id, name, and action; a structured dry-run also includes request. Text remains the default.
dsc group add¶
Bulk-add members to a group by email. The input is one email per line; blank lines and # comments are ignored; duplicates and case differences are collapsed. Reads stdin when <local-path> is omitted or -. With --notify, Discourse sends each added user a notification.
Emails must resolve to existing users on the Discourse — the endpoint does not auto-invite unknown addresses. To invite new people, use Discourse's invites UI (or Phase 2's planned dsc invite).
Honours --dry-run (-n), which prints the cleaned email list without sending.
# From a file
dsc group add myforum 42 ./new-members.txt
# From stdin with a pipeline
printf 'alice@example.com\nbob@example.com\n' | dsc group add myforum 42
# Preview first
dsc -n group add myforum 42 ./new-members.txt
The symmetric per-user view is dsc user groups.