Configuration
Onyo configuration options can be set locally using git config or tracked in
the repository using onyo config.
git configshould be used for preferences of only local relevance, such asonyo.core.editor.onyo configstores values in.onyo/configwhich is tracked in the repository. These settings are shared with all consumers of an Onyo repository, making it useful for configuration related to common workflows, such asonyo.new.template.
Within the Onyo code, configuration options are read in the following order of precedence:
git config (which follows git’s own order of precedence: system, global, and repository local configuration files)
onyo config
Options
onyo.core.editorThe editor to use for commands such as
editandnew. If unset, it will fallback tocore.editorconfiguration ofgitit self, then to the environmental variableEDITORand lastlynano. (default: unset)onyo.history.interactiveThe command used to display history when running
onyo history. (default:tig --follow)onyo.history.non-interactiveThe command used to print history when running
onyo historywith--non-interactive. (default:git --no-pager log --follow)onyo.new.templateThe default template to use with
onyo new. (default: “empty”)onyo.assets.name-formatThe name scheme for asset files and asset directories in the repository. Python format string that will be filled in by an asset’s content. (default: “{type}_{make}_{model}.{serial}”)
onyo.repo.versionThe version of the onyo repository.
Templates
This section describes some of the templates provided with onyo init in the
directory .onyo/templates/.
onyo new --keys <keys> --path <directory> (equivalent to
onyo new --keys <keys> --template empty --path <directory>) as defined
by .onyo/templates/empty is an empty YAML file, and keys must
additionally specify the keys used for asset names.
onyo new --edit --template laptop.example --path <directory> as defined by
.onyo/templates/laptop.example contains a simple example for a laptop asset
which already contains some fields, which are relevant for all assets of that
device type.
---
type:
make:
model:
serial:
RAM:
Size:
USB: