ANYCONFIG_CLI(1)
π NAME π
okay so this is the manual page for anyconfig_cli β specifically anyconfig_cli 0.9.5. The manual name is ANYCONFIG_CLI(1), and bestie, we're about to make it make sense. π
β¨ SYNOPSIS β¨
the shape of it is literally:
anyconfig_cli [Options...] CONF_PATH_OR_PATTERN_0
[CONF_PATH_OR_PATTERN_1 ..]
π OPTIONS π
--versionβ show the program's version number and exit. iconic little info drop.-h,--helpβ show this help message and exit. the classic save-me button.-L,--listβ list supported config types. yes bestie, the whole menu.-o OUTPUT,--output=OUTPUTβ output file path. where the result goes.-I ITYPE,--itype=ITYPEβ select type of Input config files fromini,json,xml,yaml[Automatically detected by file ext]. if you don't pick, it auto-detects from the file ext.-O OTYPE,--otype=OTYPEβ select type of Output config files fromini,json,xml,yamland so on [Automatically detected by file ext]. same auto-detect vibe for output.-M MERGE,--merge=MERGEβ select strategy to merge multiple configs fromreplace,noreplace,merge_dicts,merge_dicts_and_lists[merge_dicts]. the default is[merge_dicts].-A ARGS,--args=ARGSβ argument configs to override. drop extra config in here.--atype=ATYPEβ explicitly select the type of argument to provide configs fromini,json,xml,yamland so on. If this option is not set, the original parser is used:'K:V'will become{K: V},'K:V_0,V_1,..'will become{K: [V_0, V_1, ...]}, and'K_0:V_0;K_1:V_1'will become{K_0: V_0, K_1: V_1}(where the tyep of K isstr, type of V is one ofInt,str, etc.--query=QUERYβ specify JMESPath expression to query part of config. for example, if a config is{'a': {'b': {'c': 0, 'd': [1, 2, 3]}}},'--query a.b.d[0]'gives1and'--query a.b'gives{'c': 0, 'd': [1, 2, 3]}.--get=GETβ specify key path to get part of config. for example, if a config is{'a': {'b': {'c': 0, 'd': 1}}},'--get a.b.c'gives0and'--get a.b'gives{'c': 0, 'd': 1}.--set=GETβ specify key path to set (update) part of config. for example,'--set a.b.c=1'to a config{'a': {'b': {'c': 0, 'd': 1}}}gives{'a': {'b': {'c': 1, 'd': 1}}}.-x,--ignore-missingβ ignore missing input files. no dramatic gasping over absent files.-T,--templateβ enable support to load jinja2 based template configuration files. fancy template hours.-E,--envβ load configuration defaults from environment values. let the env do its thing.-S SCHEMA,--schema=SCHEMAβ specify Schema file[s] path. yes, one or more.--validateβ only validate input files and do not output. You must specify schema file with-S/--schemaoption. no schema, no validation party.--gen-schemaβ generate JSON schema for givne config file[s] and output it. schema generation moment.-s,--silentβ silent or quiet mode. shhh era.-q,--quietβ same as--silentoption. twins.-v,--verboseβ verbose mode. tell me everything, bestie.
π EXAMPLES π
List supported configuration types.
anyconfig_cli --list
Load a YAML config /etc/xyz/conf.d/a.conf and dump parsed result to stdout in JSON format by specifying input and output formats explicitly.
anyconfig_cli -I yaml -O json /etc/xyz/conf.d/a.conf
Similar to the previous example but inputs may be multiple files as the input is glob pattern.
anyconfig_cli -I yaml '/etc/xyz/conf.d/*.conf' -o xyz.conf --otype json
Similar to the previous example but configuration specified w/ -A (--args) option added.
anyconfig_cli '/etc/xyz/conf.d/*.json' -o xyz.yml --atype json -A '{"obsoletes": "sysdata", "conflicts": "sysdata-old"}'
Same as the previous example.
anyconfig_cli '/etc/xyz/conf.d/*.json' -o xyz.yml -A obsoletes:sysdata;conflicts:sysdata-old
Load multiple JSON files with merge strategy noreplace.
anyconfig_cli -O json '/etc/foo.d/*.json' -M noreplace
Get the part of input configuration files.
anyconfig_cli '/etc/foo.d/*.json' --get a.b.c
Set the part of input configuration files.
anyconfig_cli '/etc/foo.d/*.json' --set a.b.c=1
Validate input configuration files with JSON schema.
anyconfig_cli --validate -S foo.conf.schema.yml '/etc/foo.d/*.xml'
Generate JSON schema for input configuration files.
anyconfig_cli --gen-schema '/etc/foo.d/*.xml' -o foo.conf.schema.yml
Load environment variables and output it as JSON data.
anyconfig_cli --env -O json
π¦ NOTES π¦
- python-anyconfig (
anyconfig_cli) home page:https://github.com/ssato/python-anyconfig - python-anyconfig (
anyconfig_cli) Online Doc:http://python-anyconfig.readthedocs.org/en/latest/
that's the whole manual, bestie! source/version: anyconfig_cli 0.9.5; date: June 2018; manual name: ANYCONFIG_CLI(1). mwah πβ¨
π¦ where this page comes from
- nixos 26.05: python3.13-anyconfig 0.14.0
- nixos 26.05: python3.14-anyconfig 0.14.0
- nixpkgs unstable: python3.13-anyconfig 0.14.0
- nixpkgs unstable: python3.14-anyconfig 0.14.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms