pub enum SettingCommand {
Set {
discourse: Option<String>,
setting: Option<String>,
value: Option<String>,
tags: Option<String>,
},
Get {
discourse: String,
setting: String,
},
List {
discourse: String,
format: ListFormat,
verbose: bool,
},
Pull {
discourse: String,
local_path: PathBuf,
changed_only: bool,
category: Option<String>,
},
Push {
discourse: String,
local_path: PathBuf,
reset_unlisted: bool,
},
Diff {
source: String,
target: String,
changed_only: bool,
category: Option<String>,
format: ListFormat,
},
}Variants§
Set
Set a site setting on a Discourse (or all tagged Discourses).
Usage:
dsc setting set
Fields
Tag filter (comma/semicolon separated, match-any). Apply across all
Discourses matching any of the tags. When set, omit <discourse>
and pass <setting> <value> as the only positionals.
Get
Get the current value of a site setting.
List
List all site settings.
Fields
format: ListFormatOutput format.
Pull
Snapshot all site settings (with metadata) to a local file.
See spec/setting-sync.md for the full schema and workflow. The generated file is a self-documenting YAML (or JSON) including each setting’s default, type, category, and description.
Fields
local_path: PathBufOutput path. Format detected by extension (.json → JSON,
otherwise YAML). Defaults to settings.yaml.
Push
Apply a settings snapshot file to a Discourse (idempotent).
Compares each setting in the file against the server and PUTs only
values that differ. Combine with --dry-run to preview the plan.
Fields
Diff
Compare site settings between two sources.
Each source can be a Discourse name (live fetch) or a path to a
snapshot file produced by dsc setting pull. Sources are detected
by whether the argument refers to an existing file on disk; if not,
it is treated as a Discourse name.
Fields
changed_only: boolFilter to settings where at least one source differs from default. Reduces noise when most settings on both sides are still default.
category: Option<String>Limit to settings in this category (e.g. required, email).
Only effective when both sources carry category metadata.
format: ListFormatOutput format.
Trait Implementations§
Source§impl FromArgMatches for SettingCommand
impl FromArgMatches for SettingCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for SettingCommand
impl Subcommand for SettingCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand