Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,28 @@ Commands:
generate [options] Generate node identities, configure consensus, and emit a
Besu genesis.
help [command] display help for command


Usage: network-bootstrapper generate [options]

Generate node identities, configure consensus, and emit a Besu genesis.

Options:
-v, --validators <count> Number of validator nodes to generate. (default: 4)
-a, --allocations <file> Path to a genesis allocations JSON file. (default: none)
-o, --outputType <type> Output target (screen, file, kubernetes). (default: "screen")
--static-node-domain <domain> DNS suffix appended to validator peer hostnames for static-nodes entries.
--static-node-namespace <name> Namespace segment inserted between service name and domain for static-nodes entries.
--static-node-port <number> P2P port used for static-nodes enode URIs. (default: 30303)
--static-node-discovery-port <number> Discovery port used for static-nodes enode URIs. (default: 30303)
--consensus <algorithm> Consensus algorithm (IBFTv2, QBFT). (default: QBFT)
--chain-id <number> Chain ID for the genesis config. (default: random between 40000 and 50000)
--seconds-per-block <number> Block time in seconds. (default: 2)
--gas-limit <decimal> Block gas limit in decimal form. (default: 9007199254740991)
--gas-price <number> Base gas price (wei). (default: 0)
--evm-stack-size <number> EVM stack size limit. (default: 2048)
--contract-size-limit <number> Contract size limit in bytes. (default: 2147483647)
--accept-defaults Accept default values for all prompts when CLI flags are omitted. (default: disabled)
-h, --help display help for command

```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test": "bun test",
"helm": "helm upgrade --install network ./charts/network -n network --create-namespace --timeout 15m",
"docs:helm": "helm-docs --chart-search-root=. --skip-version-footer",
"docs:cli": "cat README.tpl > README.md && echo '\n```' >> README.md && bun src/index.ts --help >> README.md && echo '```' >> README.md",
"docs:cli": "cat README.tpl > README.md && printf '\\n```\\n' >> README.md && bun src/index.ts --help >> README.md && printf '\\n\\n' >> README.md && bun src/index.ts generate --help >> README.md && printf '\\n```\\n' >> README.md",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The docs:cli script is becoming long and hard to read. More importantly, it concatenates the help output of two different commands into a single markdown code block in README.md. This makes the documentation less clear and structured.

For better readability and semantic structure in the generated README.md, I suggest splitting the output into two separate, headed code blocks. This also makes the script's intent clearer.

As this script grows, you might also consider moving it to a separate shell script file (e.g., in a scripts/ directory) and calling it from here. This would significantly improve maintainability.

    "docs:cli": "cat README.tpl > README.md && printf '\\n### Main command\\n\\n\`\`\`text\\n' >> README.md && bun src/index.ts --help >> README.md && printf '\\n\`\`\`\\n\\n### \`generate\` command\\n\\n\`\`\`text\\n' >> README.md && bun src/index.ts generate --help >> README.md && printf '\\n\`\`\`\\n' >> README.md",

"package:pack": "helm package charts/network --destination .",
"package:push:harbor": "helm push ./network-*.tgz oci://harbor.settlemint.com/atk"
},
Expand Down