1
0

docs: expand netupgrade usage and configuration docs

Update the README with installation, requirements, supported actions, config format, and usage details. Align the CLI help text with current behavior and add startup checks for required runtime dependencies.
This commit is contained in:
2026-04-25 23:59:28 +02:00
parent 9de65f9aa5
commit 2ed34b97be
3 changed files with 113 additions and 26 deletions
+14 -9
View File
@@ -51,10 +51,10 @@ Supported action types currently include:
## Main issues identified
### 1. Documentation accuracy problems
- `README.md` contains a typo in the configuration path (`netuprade` instead of `netupgrade`)
- The CLI help mentions `-b` but that option is not implemented
- `--help` exists in code but is not documented in the displayed usage
- The configuration format is not documented in enough detail
- `README.md` and CLI help were updated to better match current behavior
- The previous typo in the configuration path (`netuprade`) has been fixed
- The unsupported `-b` option was removed from the displayed help
- The configuration format and supported actions are now documented in more detail
### 2. Shell robustness concerns
- Node parsing relies on replacing `;` with spaces and re-splitting:
@@ -71,8 +71,7 @@ Supported action types currently include:
- The `docker-stacks` remote loop should be reviewed carefully for quoting and path safety
### 4. UX and dependency issues
- `whiptail` is required for selection but is not checked before use
- `nano` is required for log viewing but is not checked before use
- Required runtime dependencies are now checked at startup (`ssh`, `whiptail`, `nano`, `sed`, `tee`)
- The workflow is highly interactive and not well suited for automation
- `rm -i` introduces an extra prompt even when the rest of the flow is meant to be streamlined
@@ -91,10 +90,10 @@ Supported action types currently include:
## Recommended direction
### Short term
- Fix documentation and help output to match actual behavior
- Correct the remote command bugs, especially for `pacman`
- Add dependency checks for required external tools
- Either implement or remove unsupported CLI options such as `-b`
- Improve parsing of node entries to avoid whitespace-splitting issues
- Review `docker-stacks` remote command quoting and behavior
- Consider making SSH user, log path, and editor configurable
### Medium term
- Improve parsing of node entries to avoid whitespace-splitting issues
@@ -108,6 +107,12 @@ Supported action types currently include:
- Consider a safer declarative configuration format if the project grows
- Add test coverage for parsing and command construction
## Recent changes
- `README.md` was expanded to document installation, requirements, usage, configuration format, and supported actions
- `bin/netupgrade` help output was aligned with actual CLI behavior and now documents `--help`
- A startup dependency check was added before loading configuration or opening the interactive selector
- The unsupported `-b` option remains unimplemented and is no longer shown in help output
## Change guidance
- Preserve backward compatibility for existing config files where possible
- Prefer incremental hardening over a full rewrite