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

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.