Skip to content

HomeSetup Developer Handbook

Applications handbook

Table of contents

Settings

The Settings plug-in exposes the hspylib-settings command-line tooling. It requires the HomeSetup Python virtual environment and the settings/setman packages to be installed.

"help"

Purpose

Display the upstream python3 -m settings -h usage screen.

Returns

0 if the command was successfully executed; non-zero otherwise.

Parameters

N/A

Examples

__hhs settings help

"version"

Purpose

Print the Settings plug-in version reported by python3 -m settings -v.

Returns

0 if the command was successfully executed; non-zero otherwise.

Parameters

N/A

Examples

__hhs settings version

"execute"

Purpose

Run the Settings manager operations. Execution is delegated to the Python modules provided by HomeSetup.

Returns

0 if the command was successfully executed; non-zero otherwise.

Parameters

  • $1 Optional : When omitted, the command shows the python3 -m setman -h help output.
  • source task : Exports selected settings to a file or .envrc for direnv consumption.
  • -f <file> Optional : Override the output file name. Defaults to settings-export-<timestamp>.
  • -n <namespace> Optional : Restrict the exported namespace.
  • Remaining arguments are interpreted as KEY VALUE pairs.
  • Any other arguments : Passed verbatim to python3 -m setman for normal operation.

Examples

__hhs settings execute              # display setman usage
__hhs settings execute list         # list configured settings
__hhs settings execute source -f .envrc HSPM_TOKEN abcd1234

Notes

  • The plug-in exits with an error if the HomeSetup Python virtual environment is not active.
  • When using the source task, duplicate entries are removed and the tool reports how many settings were exported.