From 6ac7a8474d2321a317197c86b24cc3b65d2d8e39 Mon Sep 17 00:00:00 2001 From: cwasicki <126617870+cwasicki@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:39:37 +0200 Subject: [PATCH] Add doc on generate-config CLI command to README Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com> --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ef01a42..9e84c67 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The following platforms are officially supported (tested): ## CLI -This package ships the `gridpool-cli` command with two subcommands. +This package ships the `gridpool-cli` command with three subcommands. ### Setup @@ -62,6 +62,38 @@ To save without opening a window: gridpool-cli render-graph --no-show --output component_graph.png ``` +### Generate microgrid config + +Derive metadata, formulas and component IDs for one or more microgrids from the +Assets API and print them as dotted-key TOML to stdout: + +```bash +gridpool-cli generate-config [ ...] +``` + +Redirect stdout to save the result: + +```bash +gridpool-cli generate-config > microgrid.toml +``` + +You can layer existing config files with the Assets API by precedence +(`--default` < Assets API < `--override`). Values from a `--default` file are +overridden by the API, while a `--override` file keeps its own values and the +API only fills the gaps: + +```bash +gridpool-cli generate-config \ + --default defaults.toml \ + --override overrides.toml > microgrid.toml +``` + +If no microgrid IDs are given, they are taken from the supplied files: + +```bash +gridpool-cli generate-config --override existing.toml > microgrid.toml +``` + ## Contributing If you want to know how to build this project and contribute to it, please