From 67ee0d81892c86223037315468cef736f36ba684 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Mon, 23 Jun 2025 20:43:33 +0200 Subject: [PATCH] README.md: Reformatted with Prettier Signed-off-by: Ole Herman Schumacher Elgesem --- README.md | 65 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index c0e4d1b1..e7b4485b 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ The modules you use can be written by the CFEngine team, others in the community ## CFEngine Build Repositories -* [build-index](https://github.com/cfengine/build-index) - Index of modules -* [build-website](https://github.com/cfengine/build-website) - Website -* [cfbs](https://github.com/cfengine/cfbs) - Command line client -* [modules](https://github.com/cfengine/modules) - Official modules provided by the CFEngine team -* [module-template](https://github.com/cfengine/build-example) - Template for creating new modules +- [build-index](https://github.com/cfengine/build-index) - Index of modules +- [build-website](https://github.com/cfengine/build-website) - Website +- [cfbs](https://github.com/cfengine/cfbs) - Command line client +- [modules](https://github.com/cfengine/modules) - Official modules provided by the CFEngine team +- [module-template](https://github.com/cfengine/build-example) - Template for creating new modules ## Installation @@ -40,10 +40,10 @@ pip install . `cfbs` is implemented in Python and has a few dependencies: -* Python 3.5 or newer -* `git` CLI installed and in PATH -* `rsync` -* `autoconf` for configuring masterfiles module (typical usage but not required) +- Python 3.5 or newer +- `git` CLI installed and in PATH +- `rsync` +- `autoconf` for configuring masterfiles module (typical usage but not required) ## Usage @@ -139,7 +139,10 @@ Here is an example of a `input.json` file with responses: "while": "Do you want the module to delete more files?", "response": [ { "path": "/tmp/virus", "why": "It's malicious." }, - { "path": "/home/alice/.ssh/authorized_keys", "why": "She left the company." } + { + "path": "/home/alice/.ssh/authorized_keys", + "why": "She left the company." + } ] } ] @@ -249,19 +252,19 @@ We run both user-oriented and automation-oriented commands in automated tests as These commands are centered around a user making changes to a project (manually from the shell / command line), not a computer building/deploying it: -* `cfbs add`: Add a module to the project (local files/folders, prepended with `./` are also considered modules). -* `cfbs analyse`: Same as `cfbs analyze`. -* `cfbs analyze`: Analyze the policy set specified by the given path. -* `cfbs clean`: Remove modules which were added as dependencies, but are no longer needed. -* `cfbs help`: Print the help menu. -* `cfbs info`: Print information about a module. -* `cfbs init`: Initialize a new CFEngine Build project. -* `cfbs input`: Enter input for a module which accepts input. -* `cfbs remove`: Remove a module from the project. -* `cfbs search`: Search for modules in the index. -* `cfbs show`: Same as `cfbs info`. -* `cfbs status`: Show the status of the current project, including name, description, and modules. -* `cfbs update`: Update modules to newer versions. +- `cfbs add`: Add a module to the project (local files/folders, prepended with `./` are also considered modules). +- `cfbs analyse`: Same as `cfbs analyze`. +- `cfbs analyze`: Analyze the policy set specified by the given path. +- `cfbs clean`: Remove modules which were added as dependencies, but are no longer needed. +- `cfbs help`: Print the help menu. +- `cfbs info`: Print information about a module. +- `cfbs init`: Initialize a new CFEngine Build project. +- `cfbs input`: Enter input for a module which accepts input. +- `cfbs remove`: Remove a module from the project. +- `cfbs search`: Search for modules in the index. +- `cfbs show`: Same as `cfbs info`. +- `cfbs status`: Show the status of the current project, including name, description, and modules. +- `cfbs update`: Update modules to newer versions. They try to help the user with interactive prompts / menus. You can always add the `--non-interactive` to skip all interactive prompts (equivalent to pressing enter to use defaults). @@ -273,24 +276,24 @@ In order to improve the user experience we change the behavior of these, especia These commands are intended to be run as part of build systems / deployment pipelines (in addition to being run by human users): -* `cfbs download`: Download all modules / dependencies for the project. +- `cfbs download`: Download all modules / dependencies for the project. Modules are skipped if already downloaded. -* `cfbs build`: Build the project, combining all the modules into 1 output policy set. +- `cfbs build`: Build the project, combining all the modules into 1 output policy set. Download modules if necessary. Should work offline if things are already downloaded (by `cfbs download`). -* `cfbs get-input`: Get input data for a module. +- `cfbs get-input`: Get input data for a module. Includes both the specification for what the module accepts as well as the user's responses. Can be used on modules not yet added to project to get just the specification. Empty list `[]` is returned if the module was found, but it does not accept any input. -* `cfbs install`: Run this on a hub as root to install the policy set (copy the files from `out/masterfiles` to `/var/cfengine/masterfiles`). -* `cfbs pretty`: Run on a JSON file to pretty-format it. (May be expanded to other formats in the future). -* `cfbs set-input`: Set input data for a module. +- `cfbs install`: Run this on a hub as root to install the policy set (copy the files from `out/masterfiles` to `/var/cfengine/masterfiles`). +- `cfbs pretty`: Run on a JSON file to pretty-format it. (May be expanded to other formats in the future). +- `cfbs set-input`: Set input data for a module. Non-interactive version of `cfbs input`, takes the input as a JSON, validates it and stores it. `cfbs set-input` and `cfbs get-input` can be thought of as ways to save and load the input file. Similar to `cfbs get-input` the JSON contains both the specification (what the module accepts and how it's presented to the user) as well as the user's responses (if present). Expected usage is to run `cfbs get-input` to get the JSON, and then fill out the response part and run `cfbs set-input`. -* `cfbs generate-release-information`: An internal command used to generate JSON release information files from the [official CFEngine masterfiles](https://github.com/cfengine/masterfiles/). -* `cfbs validate`: Used to validate the [index JSON file](https://github.com/cfengine/build-index/blob/master/cfbs.json). +- `cfbs generate-release-information`: An internal command used to generate JSON release information files from the [official CFEngine masterfiles](https://github.com/cfengine/masterfiles/). +- `cfbs validate`: Used to validate the [index JSON file](https://github.com/cfengine/build-index/blob/master/cfbs.json). May be expanded to validate other files and formats in the future. **Note:** If you use `cfbs validate` as part of your automation, scripts, and build systems, be aware that we might add more strict validation rules in the future, so be prepared to sometimes have it fail after upgrading the version of cfbs.