Skip to main content

hmcs config

Manage Desktop Homunculus app configuration.

Quick Examples

hmcs config list
hmcs config get port
hmcs config set port 3200
hmcs config set mods_dir /Users/me/.homunculus/mods
hmcs config reset port
hmcs config reset --all

list

Syntax

hmcs config list

Arguments

This subcommand takes no arguments.

Examples

Success:

KEY      VALUE
mods_dir /Users/me/.homunculus/mods
port 3100

Failure example:

[stderr]
...failed to parse ~/.homunculus/config.toml...

Behavior

  • Loads config from ~/.homunculus/config.toml.
  • Prints a table with KEY and VALUE columns sorted by key.
  • If no config file exists, defaults are used.

get

Syntax

hmcs config get <key>

Arguments

NameRequiredDescription
keyYesConfig key to read.

Examples

Success:

hmcs config get port
3100

Failure example:

hmcs config get foo
[stderr]
error: unknown config key 'foo'. ...valid keys: mods_dir, port

Behavior

  • Current keys are mods_dir and port.
  • Exits non-zero for unknown keys.

set

Syntax

hmcs config set <key> <value>

Arguments

NameRequiredDescription
keyYesConfig key to write (mods_dir or port).
valueYesNew value. Parsed as TOML literal when possible.

Examples

Success:

hmcs config set port 3200
hmcs config set mods_dir /Users/me/.homunculus/mods

Failure example (unknown key):

hmcs config set foo bar
[stderr]
error: unknown config key 'foo'. ...valid keys: mods_dir, port

Failure example (invalid type):

hmcs config set port not_a_number
[stderr]
error: invalid value for 'port': ...

Behavior

  • Reads current config, applies one key change, then writes back.
  • Value parsing order:
    1. Parse as TOML literal (for numbers, booleans, quoted strings).
    2. If parsing fails, treat the value as a plain string.
  • Exits non-zero when validation fails.

reset

Syntax

hmcs config reset <key>
hmcs config reset --all

Arguments

NameRequiredDescription
keyNoConfig key to reset to its default value.
--allNoReset all keys to their default values.

Either key or --all must be specified.

Examples

Reset a single key:

hmcs config reset port
port = 3100

Reset all keys:

hmcs config reset --all
all config reset to defaults

Failure example (no argument):

hmcs config reset
[stderr]
error: specify a key to reset, or use --all to reset all config

Behavior

  • With a key: replaces that key's value with its default and saves. Prints {key} = {default_value}.
  • With --all: saves default config (port = 3100, mods_dir = ~/.homunculus/mods/).
  • Exits non-zero for unknown keys.