Sucrose.Commandog.exe is the heart of the Sucrose process model: a short-lived command dispatcher / process broker. Almost every cross-process action — set/restart/cycle the wallpaper, kill a process, open the Portal, run a service, import/export a theme, register startup, show a crash dialog — is performed by spawning Commandog with a single encoded argument string. Commandog parses that string, performs exactly one action (usually by launching the right executable or calling a shared helper), and then exits. It is not a resident service. This page explains how the broker works internally; the full command catalogue lives on the Command Reference page.
Stability disclaimer: Commandog's command string is an internal IPC protocol, not a stable, supported public CLI. End users never type these commands — the UI builds them. The format and the command set may change between versions. See Command Reference and Automation Examples.
src/Project/Sucrose.Commandog, re-runnable, that runs one command and exits via Environment.Exit(0).Key files: src/Project/Sucrose.Commandog/App.cs (entry point), Helper/Arguments.cs (the command switch), Helper/Parse.cs (typed argument parsing), Helper/Scheduler.cs (Windows Task Scheduler operations), Helper/Miscellaneous.cs (runtime type sniffing for Test). The command enum is src/Shared/Sucrose.Shared.Dependency/Enum/CommandType.cs; the delimiter constants are in src/Library/Sucrose.Memory/Manage/Readonly/General.cs.
App.cs Main():
SSDHG.Configure() (graphics — high-performance GPU) and SSDHR.Configure() (runtime — bundled private .NET runtime, RELEASE-only).Console.InputEncoding/OutputEncoding = UTF8 — required so the ✔ / ✖ Unicode delimiters survive (mojibake here means the wrong console encoding).Sucrose.Manager.Manage.General.Culture.Arguments.Parse(args).Environment.Exit(0) in finally — it does not stay resident.Built from constants in src/Library/Sucrose.Memory/Manage/Readonly/General.cs:
| Constant | Value |
|---|---|
StartCommandChar |
'✔' (U+2714) |
StartCommand |
"✔" |
ValueSeparatorChar |
'✖' (U+2716) |
ValueSeparator |
"✖" |
Layout:
✔<CommandName>✖<Value0>✖<Value1>✖<Value2>...
Examples:
✔Interface✖<path-to-Portal.exe>
✔Interface✖<path-to-Portal.exe>✖GeneralSetting
✔Live✖<path-to-engine.exe>
✔RestartLive✖Unknown
✔Watchdog✖<path-to-Watchdog.exe>✖<Base64(app✖ex✖show✖log)>
Anyone reproducing a command externally must emit these exact ✔ / ✖ characters.
Arguments.Parse (Helper/Arguments.cs):
string.Join(" ", args) to recombine the argument tokens into one string.StartsWith("✔") AND Contains("✖").✔ (Combined[1..]), then Split('✖').Enum.TryParse<CommandType>(Name, ignoreCase: true, ...) — command names are case-insensitive.switch on the parsed CommandType.Values are coerced by Parse.ArgumentValue<T> (Helper/Parse.cs):
T |
Conversion |
|---|---|
int |
int.TryParse |
bool |
bool.TryParse |
| an enum type | Enum.Parse |
| anything else | the raw string |
Miscellaneous.GetType(string) sniffs bool first, then int, else string — used only by the diagnostic Test command.
The switch in Arguments.cs maps each CommandType to a side effect. Run(x) below is Sucrose.Shared.Space.Helper.Processor.Run (a ShellExecute); many "open" commands simply pass a path or URL to Run. A representative slice:
| Command | Action in Commandog |
|---|---|
Live |
Run(value) — start the given engine exe directly. |
Kill |
Processor.Kill(name) — kill all processes by name. |
Interface |
Start Portal (Run(portal[, settingPage])); optional 2nd value = settings-page selector (ArgumentCommandType). |
Property / PropertyA |
Launch Sucrose.Property.exe (the Customize UI), with or without a theme argument. |
Update |
Launch Sucrose.Update.exe (optional 2nd value, run hidden). |
Reportdog / Backgroundog |
Launch the respective service exe. |
Watchdog |
When exactly 2 values: launch Sucrose.Watchdog.exe with the Base64 error payload (hidden). |
RestartLive |
Stop live + stop subprocess, kill Sucrose.Backgroundog.exe, Run.Start(), wait 1500 ms, retry if not running. (Wallpaper reload.) |
Cycyling |
Same as RestartLive but without killing Backgroundog (wallpaper slideshow advance; note the in-code spelling "Cycyling"). |
Scheduler |
Create / Enable / Disable / Delete a Windows scheduled task (SchedulerCommandType), task name Autorun for Sucrose. |
Startup / StartupM / StartupP |
Register Windows startup (per-user / machine / priority) via Skylark.Wing. |
Import / Export / Reset / Temp / Versioning |
Theme/library/file operations through Sucrose.Shared.Space.Helper.* (Import/Export/Reset/Temp are awaited async; Versioning calls the synchronous Delete.Folder). |
Log / Wiki / Report / Publish / Official / Repository / Discussions / QuotingGoogle / QuotingTranslate / Bundle |
Run(value) — open a URL or file (the Bundle case launches the downloaded installer). |
Test |
Diagnostic echo: prints each typed value to the console. |
The full CommandType table (31 commands), plus ArgumentCommandType (settings-page targets) and SchedulerCommandType, are documented on the Command Reference page. Two sub-enums:
ArgumentCommandType: OtherSetting, DonateSetting, SystemSetting, GeneralSetting, PersonalSetting, WallpaperSetting, PerformanceSetting — the 2nd value of Interface.SchedulerCommandType: Create, Enable, Delete, Disable.Commands are built by the UI and helper layers, never by end users:
Command() under src/Shared/Sucrose.Shared.Launcher/Command/*.cs builds a ✔...✖... string and calls Processor.Run(Commandog, ...): Interface.cs → ✔Interface✖<Portal>, Setting.cs → ✔Interface✖<Portal>✖GeneralSetting, Property.cs → ✔Property✖<Property>, Reload.cs → ✔RestartLive✖Unknown, Update.cs → ✔Update✖<Update> (or ...✖False for silent), Reportdog.cs → ✔Reportdog✖<Reportdog>, Version.cs → ✔Versioning✖<LocalAppData\Sucrose>✖<version>✖false.Sucrose.Shared.Space/Helper/Watchdog.cs builds ✔Watchdog✖<Watchdog>✖<Base64 payload>.Sucrose.Update's MainWindow builds ✔Bundle✖<path> to launch the downloaded installer.Sucrose.Shared.Engine/Event/Handler.cs emits ✔RestartLive✖Unknown.Note that Close.cs and Engine.cs are exceptions — they act locally (kill processes / start the engine) and do not route through Commandog.