cli: argparse-style errors and choices; add parity ledger generator
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <string>
|
||||
int main(int argc, char** argv){
|
||||
detz::cli::Parser p; auto cmd = p.parse(argc, argv);
|
||||
if(!cmd.opts.error.empty()){ std::fputs((cmd.opts.error + "\n").c_str(), stderr); return 2; }
|
||||
if(cmd.opts.version){ std::puts(("tai " + std::string(detz::kVersion)).c_str()); return 0; }
|
||||
if(cmd.opts.cap_manifest){ std::fputs("# tai CAP agent manifest\n", stdout); return 0; }
|
||||
if(cmd.name=="run" && !cmd.args.empty()){
|
||||
|
||||
Reference in New Issue
Block a user