mleku on Nostr: IMO the design scheme used in the Go tools is better - you have subcommands and you ...
IMO the design scheme used in the Go tools is better - you have subcommands and you have flags on subcommands, generally you try to keep that simple and not use flags very much and constrain them to common patterns like -v for verbose and -o for output
i don't think that CLI commands are "written for machines" either, they are just meant to be composable as scripts for a shell, and shells have also got a bunch of logic statements like if and do-until and similar. they are basically APIs, and usually flags are like configurations, usually all of them have a default if not given
Published at
2025-05-04 06:27:25Event JSON
{
"id": "2967492c567a9d357e7df33e7a2ad81df6a664f951e8e632edbad5c2410a2bd7",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1746340045,
"kind": 1,
"tags": [
[
"e",
"688c89f3bd571d2ca9159863b0e2b9dc77713ae2b80e7eba004295764de56434",
"",
"root",
"0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd"
],
[
"e",
"098ffe587d8d5ea64935f31d103127c300534e0945be02a11ae686438e52a99f",
"wss://theforest.nostr1.com/",
"reply",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
],
[
"p",
"0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd"
],
[
"p",
"06639a386c9c1014217622ccbcf40908c4f1a0c33e23f8d6d68f4abf655f8f71"
],
[
"p",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1"
]
],
"content": "IMO the design scheme used in the Go tools is better - you have subcommands and you have flags on subcommands, generally you try to keep that simple and not use flags very much and constrain them to common patterns like -v for verbose and -o for output\n\ni don't think that CLI commands are \"written for machines\" either, they are just meant to be composable as scripts for a shell, and shells have also got a bunch of logic statements like if and do-until and similar. they are basically APIs, and usually flags are like configurations, usually all of them have a default if not given",
"sig": "ad4a63afd653133c45c8fd342b261b9c678295cb79235e5fb52d255dadfc4329143ac4b74c21606fb2d0d34eb6343419a1b9e3ac6cffeec3a4855e2e16f2a9cf"
}