[{"data":1,"prerenderedAt":1458,"buildId":1459},["ShallowReactive",2],{"docs:\u002Fguide\u002Fprompts":3},{"page":4,"section":16,"document":17,"credits":10,"prev":1452,"next":1456},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":8,"description":9,"tagline":9,"eyebrow":10,"credits":10,"keywords":11,"icon":12,"layout":13,"sidebar":14,"toc":14,"kind":10,"group":10,"navigation":14,"order":15},"prompts","\u002Fguide\u002Fprompts","guide\u002Fprompts.md","Prompts and input","How out.ask and out.confirm get a value from a flag, --input, an env var, a prompt or a default, and when they stop with action_required.",null,[],"i-lucide-message-circle-question","article",true,10,"guide",{"nodes":18,"toc":1440},[19,31,39,46,77,106,112,128,552,579,585,588,699,705,725,735,741,757,815,839,846,860,866,883,962,1000,1021,1030,1036,1043,1053,1097,1110,1134,1140,1153,1161,1183,1189,1198,1222,1229,1403,1427,1434],[20,21,22,26,27,30],"p",{},[23,24,25],"code",{},"out.ask"," and ",[23,28,29],{},"out.confirm"," get a value your command needs. They prompt only a person who can answer, and every other reader gets a flag to pass instead of a question that waits forever.",[32,33,38],"h2",{"id":34,"anchor":35},"why-prompts-need-a-gate",{"label":36,"icon":37},"Section titled \"Why prompts need a gate\"","#","Why prompts need a gate",[20,40,41,42,45],{},"A prompt that waits on stdin hangs a command no person is watching. Most CLIs check ",[23,43,44],{},"process.stdin.isTTY"," before they ask, and that check fails under Gemini CLI and Cline, which run commands in a real TTY. readerly asks only when all of these hold:",[47,48,49,57,63,66],"ul",{},[50,51,52,53,56],"li",{},"the reader is ",[23,54,55],{},"terminal",",",[50,58,59,60,56],{},"the format is ",[23,61,62],{},"text",[50,64,65],{},"stdin and stderr are TTYs,",[50,67,68,69,72,73,76],{},"neither ",[23,70,71],{},"--no-input"," nor ",[23,74,75],{},"--non-interactive"," is passed.",[20,78,79,82,83,86,87,90,91,94,95,98,99,26,102,105],{},[23,80,81],{},"profile.interactive"," holds that answer, and ",[23,84,85],{},"canPrompt(profile)"," from ",[23,88,89],{},"readerly\u002Fprompt"," checks the same conditions on any profile, such as one you built yourself. ",[23,92,93],{},"profile.why.interactive"," names the condition that failed, for example ",[23,96,97],{},"reader is agent",". Coding agents, CI, pipes, ",[23,100,101],{},"json",[23,103,104],{},"jsonl"," never see a prompt.",[32,107,111],{"id":108,"anchor":109},"asking-for-a-value",{"label":110,"icon":37},"Section titled \"Asking for a value\"","Asking for a value",[20,113,114,116,117,120,121,26,124,127],{},[23,115,25],{}," resolves a string. You parse your own flags and pass the value you found as ",[23,118,119],{},"value",". readerly uses ",[23,122,123],{},"flag",[23,125,126],{},"env"," to look up the other sources and to name them when the value is missing.",[129,130,134],"pre",{"language":131,"filename":132,"class":133,"wrap":14},"ts","deploy.ts","shiki shiki-themes github-light-default github-dark-default dark:github-dark-default",[23,135,137,160,161,160,175,160,177,160,223,160,272,160,294,160,305,160,327,160,332,160,340,160,361,160,371,160,381,160,391,160,401,160,418,160,423,160,428,160,470,160,481,160,506,160,519,160,530,160,542,160,547],{"class":136},"language-ts",[138,139,142,146,150,153,157],"span",{"class":140,"style":141},"line","display: inline",[138,143,145],{"style":144},"color:#CF222E;--shiki-dark:#FF7B72","import",[138,147,149],{"style":148},"color:#1F2328;--shiki-dark:#E6EDF3"," { parseArgs } ",[138,151,152],{"style":144},"from",[138,154,156],{"style":155},"color:#0A3069;--shiki-dark:#A5D6FF"," \"node:util\"",[138,158,159],{"style":148},";","\n",[138,162,163,165,168,170,173],{"class":140,"style":141},[138,164,145],{"style":144},[138,166,167],{"style":148}," { createOut, readerFlags } ",[138,169,152],{"style":144},[138,171,172],{"style":155}," \"readerly\"",[138,174,159],{"style":148},[138,176],{"class":140,"style":141},[138,178,179,182,185,188,192,195,199,202,206,209,211,214,217,220],{"class":140,"style":141},[138,180,181],{"style":144},"export",[138,183,184],{"style":144}," async",[138,186,187],{"style":144}," function",[138,189,191],{"style":190},"color:#8250DF;--shiki-dark:#D2A8FF"," deploy",[138,193,194],{"style":148},"(",[138,196,198],{"style":197},"color:#953800;--shiki-dark:#FFA657","argv",[138,200,201],{"style":144},":",[138,203,205],{"style":204},"color:#0550AE;--shiki-dark:#79C0FF"," string",[138,207,208],{"style":148},"[])",[138,210,201],{"style":144},[138,212,213],{"style":197}," Promise",[138,215,216],{"style":148},"\u003C",[138,218,219],{"style":204},"number",[138,221,222],{"style":148},"> {",[138,224,225,228,231,234,237,240,243,245,247,250,253,255,257,260,263,266,269],{"class":140,"style":141},[138,226,227],{"style":144},"  const",[138,229,230],{"style":204}," out",[138,232,233],{"style":144}," =",[138,235,236],{"style":190}," createOut",[138,238,239],{"style":148},"\u003C{ ",[138,241,242],{"style":197},"account",[138,244,201],{"style":144},[138,246,205],{"style":204},[138,248,249],{"style":148},"; ",[138,251,252],{"style":197},"region",[138,254,201],{"style":144},[138,256,205],{"style":204},[138,258,259],{"style":148}," }>({ tool: ",[138,261,262],{"style":155},"\"acme\"",[138,264,265],{"style":148},", command: ",[138,267,268],{"style":155},"\"deploy\"",[138,270,271],{"style":148},", argv });",[138,273,274,276,279,282,285,288,291],{"class":140,"style":141},[138,275,227],{"style":144},[138,277,278],{"style":148}," { ",[138,280,281],{"style":204},"values",[138,283,284],{"style":148}," } ",[138,286,287],{"style":144},"=",[138,289,290],{"style":190}," parseArgs",[138,292,293],{"style":148},"({",[138,295,296,299,302],{"class":140,"style":141},[138,297,298],{"style":148},"    args: ",[138,300,301],{"style":190},"readerFlags",[138,303,304],{"style":148},"(argv).rest,",[138,306,307,310,313,316,319,322,324],{"class":140,"style":141},[138,308,309],{"style":148},"    options: { prod: { type: ",[138,311,312],{"style":155},"\"boolean\"",[138,314,315],{"style":148}," }, account: { type: ",[138,317,318],{"style":155},"\"string\"",[138,320,321],{"style":148}," }, region: { type: ",[138,323,318],{"style":155},[138,325,326],{"style":148}," } },",[138,328,329],{"class":140,"style":141},[138,330,331],{"style":148},"  });",[138,333,334,337],{"class":140,"style":141},[138,335,336],{"style":144},"  try",[138,338,339],{"style":148}," {",[138,341,342,345,348,350,353,356,359],{"class":140,"style":141},[138,343,344],{"style":144},"    const",[138,346,347],{"style":204}," account",[138,349,233],{"style":144},[138,351,352],{"style":144}," await",[138,354,355],{"style":148}," out.",[138,357,358],{"style":190},"ask",[138,360,293],{"style":148},[138,362,363,366,369],{"class":140,"style":141},[138,364,365],{"style":148},"      name: ",[138,367,368],{"style":155},"\"account\"",[138,370,56],{"style":148},[138,372,373,376,379],{"class":140,"style":141},[138,374,375],{"style":148},"      message: ",[138,377,378],{"style":155},"\"Account\"",[138,380,56],{"style":148},[138,382,383,386,389],{"class":140,"style":141},[138,384,385],{"style":148},"      flag: ",[138,387,388],{"style":155},"\"--account\"",[138,390,56],{"style":148},[138,392,393,396,399],{"class":140,"style":141},[138,394,395],{"style":148},"      env: ",[138,397,398],{"style":155},"\"ACME_ACCOUNT\"",[138,400,56],{"style":148},[138,402,403,406,409,412,415],{"class":140,"style":141},[138,404,405],{"style":148},"      choices: [",[138,407,408],{"style":155},"\"personal\"",[138,410,411],{"style":148},", ",[138,413,414],{"style":155},"\"team\"",[138,416,417],{"style":148},"],",[138,419,420],{"class":140,"style":141},[138,421,422],{"style":148},"      value: values.account,",[138,424,425],{"class":140,"style":141},[138,426,427],{"style":148},"    });",[138,429,430,432,435,437,439,441,443,446,449,452,455,458,461,464,467],{"class":140,"style":141},[138,431,344],{"style":144},[138,433,434],{"style":204}," region",[138,436,233],{"style":144},[138,438,352],{"style":144},[138,440,355],{"style":148},[138,442,358],{"style":190},[138,444,445],{"style":148},"({ name: ",[138,447,448],{"style":155},"\"region\"",[138,450,451],{"style":148},", message: ",[138,453,454],{"style":155},"\"Region\"",[138,456,457],{"style":148},", flag: ",[138,459,460],{"style":155},"\"--region\"",[138,462,463],{"style":148},", default: ",[138,465,466],{"style":155},"\"eu\"",[138,468,469],{"style":148},", value: values.region });",[138,471,472,475,478],{"class":140,"style":141},[138,473,474],{"style":148},"    out.",[138,476,477],{"style":190},"set",[138,479,480],{"style":148},"({ account, region });",[138,482,483,485,488,490,493,495,498,500,503],{"class":140,"style":141},[138,484,474],{"style":148},[138,486,487],{"style":190},"log",[138,489,194],{"style":148},[138,491,492],{"style":155},"`Deployed ${",[138,494,242],{"style":148},[138,496,497],{"style":155},"} to ${",[138,499,252],{"style":148},[138,501,502],{"style":155},"}.`",[138,504,505],{"style":148},");",[138,507,508,511,513,516],{"class":140,"style":141},[138,509,510],{"style":144},"    return",[138,512,355],{"style":148},[138,514,515],{"style":190},"end",[138,517,518],{"style":148},"();",[138,520,521,524,527],{"class":140,"style":141},[138,522,523],{"style":148},"  } ",[138,525,526],{"style":144},"catch",[138,528,529],{"style":148}," (error) {",[138,531,532,534,536,539],{"class":140,"style":141},[138,533,510],{"style":144},[138,535,355],{"style":148},[138,537,538],{"style":190},"fail",[138,540,541],{"style":148},"(error);",[138,543,544],{"class":140,"style":141},[138,545,546],{"style":148},"  }",[138,548,549],{"class":140,"style":141},[138,550,551],{"style":148},"}",[20,553,554,557,558,561,562,565,566,569,570,572,573,578],{},[23,555,556],{},"name"," is the field's key in ",[23,559,560],{},"--input"," and in the ",[23,563,564],{},"missing"," list. ",[23,567,568],{},"choices"," limits the answer: a value outside it from a flag, ",[23,571,560],{}," or the env is a usage failure, and a prompt asks again. See ",[574,575,577],"a",{"href":576},"\u002Fintegrations\u002Fargument-parsers","Argument parsers"," for other parsers.",[32,580,584],{"id":581,"anchor":582},"where-a-value-comes-from",{"label":583,"icon":37},"Section titled \"Where a value comes from\"","Where a value comes from",[20,586,587],{},"Each step runs only when the one before it gave no value:",[589,590,591,607],"table",{},[592,593,594],"thead",{},[595,596,597,601,604],"tr",{},[598,599,600],"th",{},"Step",[598,602,603],{},"Source",[598,605,606],{},"Example",[608,609,610,626,643,656,669,686],"tbody",{},[595,611,612,616,621],{},[613,614,615],"td",{},"1",[613,617,618,619],{},"The flag, as ",[23,620,119],{},[613,622,623],{},[23,624,625],{},"--account team",[595,627,628,631,638],{},[613,629,630],{},"2",[613,632,633,635,636],{},[23,634,560],{},", by ",[23,637,556],{},[613,639,640],{},[23,641,642],{},"--input '{\"account\":\"team\"}'",[595,644,645,648,651],{},[613,646,647],{},"3",[613,649,650],{},"The env var, when not empty",[613,652,653],{},[23,654,655],{},"ACME_ACCOUNT=team",[595,657,658,661,664],{},[613,659,660],{},"4",[613,662,663],{},"A prompt, when one may run",[613,665,666],{},[23,667,668],{},"? Account (personal\u002Fteam): ",[595,670,671,674,681],{},[613,672,673],{},"5",[613,675,676,677,680],{},"The default, plus a ",[23,678,679],{},"next:"," line naming the flag",[613,682,683],{},[23,684,685],{},"default: \"eu\"",[595,687,688,691,697],{},[613,689,690],{},"6",[613,692,693,696],{},[23,694,695],{},"action_required",", exit code 2",[613,698],{},[20,700,701,702,704],{},"With ",[23,703,625],{}," and no region, a coding agent gets the default and a line that says how to change it:",[129,706,707],{"language":62,"class":133,"wrap":14},[23,708,710,160,715,160,720],{"class":709},"language-text",[138,711,712],{"class":140,"style":141},[138,713,714],{},"acme deploy: ok. no problems.",[138,716,717],{"class":140,"style":141},[138,718,719],{},"Deployed team to eu.",[138,721,722],{"class":140,"style":141},[138,723,724],{},"next: acme deploy --prod --account team --region \u003Cregion>",[20,726,727,728,730,731,734],{},"A person at a terminal with no flags gets one prompt per question on stderr: ",[23,729,668],{},", then ",[23,732,733],{},"? Region (default eu): ",". The prompt shows the choices and the default, and an empty answer takes the default.",[32,736,740],{"id":737,"anchor":738},"input-as-json",{"label":739,"icon":37},"Section titled \"Input as JSON\"","Input as JSON",[20,742,743,745,746,748,749,752,753,756],{},[23,744,560],{}," passes several values at once, keyed by ",[23,747,556],{},". It takes inline JSON, ",[23,750,751],{},"@path"," for a file, or ",[23,754,755],{},"@-"," for stdin.",[129,758,760],{"language":759,"frame":55,"class":133,"wrap":14},"sh",[23,761,763,160,779,160,792],{"class":762},"language-sh",[138,764,765,768,770,773,776],{"class":140,"style":141},[138,766,767],{"style":197},"acme",[138,769,191],{"style":155},[138,771,772],{"style":204}," --prod",[138,774,775],{"style":204}," --input",[138,777,778],{"style":155}," '{\"account\":\"team\",\"region\":\"us\"}'",[138,780,781,783,785,787,789],{"class":140,"style":141},[138,782,767],{"style":197},[138,784,191],{"style":155},[138,786,772],{"style":204},[138,788,775],{"style":204},[138,790,791],{"style":155}," @deploy.json",[138,793,794,797,800,803,806,808,810,812],{"class":140,"style":141},[138,795,796],{"style":204},"echo",[138,798,799],{"style":155}," '{\"account\":\"team\"}'",[138,801,802],{"style":144}," |",[138,804,805],{"style":197}," acme",[138,807,191],{"style":155},[138,809,772],{"style":204},[138,811,775],{"style":204},[138,813,814],{"style":155}," @-",[20,816,817,818,820,821,824,825,828,829,832,833,835,836,838],{},"A flag beats ",[23,819,560],{},": ",[23,822,823],{},"--account personal --input '{\"account\":\"team\",\"region\":\"us\"}'"," deploys ",[23,826,827],{},"personal"," to ",[23,830,831],{},"us",". readerly reads ",[23,834,560],{}," once per run, and only when a question has no ",[23,837,119],{},".",[20,840,841,842,845],{},"Nothing else reads stdin. Without ",[23,843,844],{},"--input @-",", readerly never waits on it, so an open, empty pipe can't hang the command. Bad input is a usage failure, and the message never echoes what you passed:",[129,847,848],{"language":62,"class":133,"wrap":14},[23,849,850,160,855],{"class":709},[138,851,852],{"class":140,"style":141},[138,853,854],{},"acme deploy: failed. --input is not valid JSON.",[138,856,857],{"class":140,"style":141},[138,858,859],{},"fix: Pass --input a JSON object, @file or @- for stdin.",[32,861,865],{"id":862,"anchor":863},"confirming",{"label":864,"icon":37},"Section titled \"Confirming\"","Confirming",[20,867,868,870,871,874,875,878,879,882],{},[23,869,29],{}," resolves a boolean through the same steps, with ",[23,872,873],{},"--yes"," or ",[23,876,877],{},"-y"," between the env var and the prompt. The golden ",[23,880,881],{},"acme check"," asks before it applies fixes:",[129,884,886],{"language":131,"filename":885,"class":133,"wrap":14},"check.ts",[23,887,888,160,907,160,917,160,927,160,937,160,947,160,957],{"class":136},[138,889,890,893,896,898,900,902,905],{"class":140,"style":141},[138,891,892],{"style":144},"const",[138,894,895],{"style":204}," fix",[138,897,233],{"style":144},[138,899,352],{"style":144},[138,901,355],{"style":148},[138,903,904],{"style":190},"confirm",[138,906,293],{"style":148},[138,908,909,912,915],{"class":140,"style":141},[138,910,911],{"style":148},"  name: ",[138,913,914],{"style":155},"\"fix\"",[138,916,56],{"style":148},[138,918,919,922,925],{"class":140,"style":141},[138,920,921],{"style":148},"  flag: ",[138,923,924],{"style":155},"\"--fix\"",[138,926,56],{"style":148},[138,928,929,932,935],{"class":140,"style":141},[138,930,931],{"style":148},"  default: ",[138,933,934],{"style":204},"false",[138,936,56],{"style":148},[138,938,939,942,945],{"class":140,"style":141},[138,940,941],{"style":148},"  message: ",[138,943,944],{"style":155},"\"Apply 2 safe fixes?\"",[138,946,56],{"style":148},[138,948,949,952,955],{"class":140,"style":141},[138,950,951],{"style":148},"  reason: ",[138,953,954],{"style":155},"\"applies 2 safe fixes\"",[138,956,56],{"style":148},[138,958,959],{"class":140,"style":141},[138,960,961],{"style":148},"});",[20,963,964,965,968,969,411,972,411,975,26,978,980,981,411,984,411,987,26,989,992,993,996,997,838],{},"A person at a terminal gets ",[23,966,967],{},"? Apply 2 safe fixes? (y\u002FN) "," on stderr. ",[23,970,971],{},"y",[23,973,974],{},"yes",[23,976,977],{},"true",[23,979,615],{}," confirm, ",[23,982,983],{},"n",[23,985,986],{},"no",[23,988,934],{},[23,990,991],{},"0"," refuse, in any case, and an empty answer takes the default. With ",[23,994,995],{},"default: true",", the hint is ",[23,998,999],{},"(Y\u002Fn)",[20,1001,1002,1003,1005,1006,1008,1009,1012,1013,201],{},"When no prompt may run, a default of ",[23,1004,934],{}," adds a ",[23,1007,679],{}," line with the flag and ",[23,1010,1011],{},"reason",". A coding agent gets this from the ",[574,1014,1016,1017,1020],{"href":1015},"https:\u002F\u002Fgithub.com\u002Floadsheet\u002Freaderly\u002Fblob\u002Fmain\u002Ftest\u002Fgolden\u002Fagent.stdout.txt","golden ",[23,1018,1019],{},"agent"," output",[129,1022,1023],{"language":62,"class":133,"wrap":14},[23,1024,1025],{"class":709},[138,1026,1027],{"class":140,"style":141},[138,1028,1029],{},"next: acme check --fix   (applies 2 safe fixes)",[20,1031,1032,1033,1035],{},"A default of ",[23,1034,977],{}," adds no line, because the command already did what the flag would.",[1037,1038,1042],"h3",{"id":1039,"anchor":1040},"destructive-confirms",{"label":1041,"icon":37},"Section titled \"Destructive confirms\"","Destructive confirms",[20,1044,1045,1046,1049,1050,1052],{},"Set ",[23,1047,1048],{},"requireExact"," to make the person type a name. Neither ",[23,1051,873],{}," nor a default can confirm it.",[129,1054,1056],{"language":131,"filename":1055,"class":133,"wrap":14},"drop.ts",[23,1057,1058],{"class":136},[138,1059,1060,1062,1065,1067,1069,1071,1073,1075,1078,1080,1083,1085,1088,1091,1094],{"class":140,"style":141},[138,1061,892],{"style":144},[138,1063,1064],{"style":204}," ok",[138,1066,233],{"style":144},[138,1068,352],{"style":144},[138,1070,355],{"style":148},[138,1072,904],{"style":190},[138,1074,445],{"style":148},[138,1076,1077],{"style":155},"\"confirm\"",[138,1079,451],{"style":148},[138,1081,1082],{"style":155},"\"Drop prod-db?\"",[138,1084,457],{"style":148},[138,1086,1087],{"style":155},"\"--confirm\"",[138,1089,1090],{"style":148},", requireExact: ",[138,1092,1093],{"style":155},"\"prod-db\"",[138,1095,1096],{"style":148}," });",[20,1098,964,1099,1102,1103,1106,1107,1109],{},[23,1100,1101],{},"? Drop prod-db? Type prod-db to confirm: ",", and only ",[23,1104,1105],{},"prod-db"," confirms. A coding agent that passed ",[23,1108,873],{}," gets:",[129,1111,1112],{"language":62,"class":133,"wrap":14},[23,1113,1114,160,1119,160,1124,160,1129],{"class":709},[138,1115,1116],{"class":140,"style":141},[138,1117,1118],{},"acme db drop: action required. --confirm is required.",[138,1120,1121],{"class":140,"style":141},[138,1122,1123],{},"fix: Pass it with --confirm, --input '{\"confirm\": …}'.",[138,1125,1126],{"class":140,"style":141},[138,1127,1128],{},"missing: --confirm",[138,1130,1131],{"class":140,"style":141},[138,1132,1133],{},"rerun: acme db drop --confirm prod-db",[32,1135,1139],{"id":1136,"anchor":1137},"findings-print-above-the-prompt",{"label":1138,"icon":37},"Section titled \"Findings print above the prompt\"","Findings print above the prompt",[20,1141,1142,1143,1145,1146,1152],{},"Before a prompt writes anything, readerly renders what the command collected so far. The verdict and rows go to stdout, then the question goes to stderr. A person at a terminal running the golden ",[23,1144,881],{}," sees the ",[574,1147,1149],{"href":1148},"https:\u002F\u002Fgithub.com\u002Floadsheet\u002Freaderly\u002Fblob\u002Fmain\u002Ftest\u002Fgolden\u002Fterminal.stdout.txt",[23,1150,1151],{},"terminal.stdout.txt"," rows first, then:",[129,1154,1155],{"language":62,"class":133,"wrap":14},[23,1156,1157],{"class":709},[138,1158,1159],{"class":140,"style":141},[138,1160,967],{},[20,1162,1163,1164,1167,1168,1170,1171,1175,1176,26,1179,1182],{},"After the answer, ",[23,1165,1166],{},"out.end()"," prints only what is new, here the ",[23,1169,679],{}," line. If the answer changed the counts, the verdict prints again below. ",[574,1172,1174],{"href":1173},"\u002Fguide\u002Frenderers","Custom renderers"," see this as the ",[23,1177,1178],{},"head",[23,1180,1181],{},"tail"," parts.",[32,1184,1188],{"id":1185,"anchor":1186},"when-nothing-gives-a-value",{"label":1187,"icon":37},"Section titled \"When nothing gives a value\"","When nothing gives a value",[20,1190,1191,1192,1194,1195,1109],{},"When every step comes up empty, the command stops with ",[23,1193,695],{}," and exit code 2. A coding agent running ",[23,1196,1197],{},"acme deploy --prod",[129,1199,1200],{"language":62,"class":133,"wrap":14},[23,1201,1202,160,1207,160,1212,160,1217],{"class":709},[138,1203,1204],{"class":140,"style":141},[138,1205,1206],{},"acme deploy: action required. --account is required.",[138,1208,1209],{"class":140,"style":141},[138,1210,1211],{},"fix: Pass it with --account, ACME_ACCOUNT, --input '{\"account\": …}'.",[138,1213,1214],{"class":140,"style":141},[138,1215,1216],{},"missing: --account (ACME_ACCOUNT), one of personal, team",[138,1218,1219],{"class":140,"style":141},[138,1220,1221],{},"rerun: acme deploy --prod --account \u003Caccount>",[20,1223,1224,1225,1228],{},"The same run with ",[23,1226,1227],{},"--json"," prints this document on stdout:",[129,1230,1231],{"language":101,"class":133,"wrap":14},[23,1232,1234,160,1239,160,1252,160,1264,160,1272,160,1294,160,1304,160,1309,160,1317,160,1322,160,1333,160,1344,160,1355,160,1362,160,1369,160,1374,160,1379,160,1384,160,1389,160,1399],{"class":1233},"language-json",[138,1235,1236],{"class":140,"style":141},[138,1237,1238],{"style":148},"{",[138,1240,1241,1245,1247,1250],{"class":140,"style":141},[138,1242,1244],{"style":1243},"color:#116329;--shiki-dark:#7EE787","  \"schema\"",[138,1246,820],{"style":148},[138,1248,1249],{"style":155},"\"acme.deploy\u002Fv1\"",[138,1251,56],{"style":148},[138,1253,1254,1257,1259,1262],{"class":140,"style":141},[138,1255,1256],{"style":1243},"  \"status\"",[138,1258,820],{"style":148},[138,1260,1261],{"style":155},"\"action_required\"",[138,1263,56],{"style":148},[138,1265,1266,1269],{"class":140,"style":141},[138,1267,1268],{"style":1243},"  \"error\"",[138,1270,1271],{"style":148},": {",[138,1273,1274,1277,1279,1282,1285,1287,1289,1292],{"class":140,"style":141},[138,1275,1276],{"style":1243},"    \"fix\"",[138,1278,820],{"style":148},[138,1280,1281],{"style":155},"\"Pass it with --account, ACME_ACCOUNT, --input '{",[138,1283,1284],{"style":144},"\\\"",[138,1286,242],{"style":155},[138,1288,1284],{"style":144},[138,1290,1291],{"style":155},": …}'.\"",[138,1293,56],{"style":148},[138,1295,1296,1299,1301],{"class":140,"style":141},[138,1297,1298],{"style":1243},"    \"message\"",[138,1300,820],{"style":148},[138,1302,1303],{"style":155},"\"--account is required.\"",[138,1305,1306],{"class":140,"style":141},[138,1307,1308],{"style":148},"  },",[138,1310,1311,1314],{"class":140,"style":141},[138,1312,1313],{"style":1243},"  \"missing\"",[138,1315,1316],{"style":148},": [",[138,1318,1319],{"class":140,"style":141},[138,1320,1321],{"style":148},"    {",[138,1323,1324,1327,1329,1331],{"class":140,"style":141},[138,1325,1326],{"style":1243},"      \"field\"",[138,1328,820],{"style":148},[138,1330,368],{"style":155},[138,1332,56],{"style":148},[138,1334,1335,1338,1340,1342],{"class":140,"style":141},[138,1336,1337],{"style":1243},"      \"flag\"",[138,1339,820],{"style":148},[138,1341,388],{"style":155},[138,1343,56],{"style":148},[138,1345,1346,1349,1351,1353],{"class":140,"style":141},[138,1347,1348],{"style":1243},"      \"env\"",[138,1350,820],{"style":148},[138,1352,398],{"style":155},[138,1354,56],{"style":148},[138,1356,1357,1360],{"class":140,"style":141},[138,1358,1359],{"style":1243},"      \"choices\"",[138,1361,1316],{"style":148},[138,1363,1364,1367],{"class":140,"style":141},[138,1365,1366],{"style":155},"        \"personal\"",[138,1368,56],{"style":148},[138,1370,1371],{"class":140,"style":141},[138,1372,1373],{"style":155},"        \"team\"",[138,1375,1376],{"class":140,"style":141},[138,1377,1378],{"style":148},"      ]",[138,1380,1381],{"class":140,"style":141},[138,1382,1383],{"style":148},"    }",[138,1385,1386],{"class":140,"style":141},[138,1387,1388],{"style":148},"  ],",[138,1390,1391,1394,1396],{"class":140,"style":141},[138,1392,1393],{"style":1243},"  \"rerun\"",[138,1395,820],{"style":148},[138,1397,1398],{"style":155},"\"acme deploy --prod --account \u003Caccount>\"",[138,1400,1401],{"class":140,"style":141},[138,1402,551],{"style":148},[20,1404,1405,1407,1408,1411,1412,1414,1415,1418,1419,1421,1422,1426],{},[23,1406,564],{}," lists each input with its flag, env var and choices. ",[23,1409,1410],{},"rerun"," is the invocation with the flag added, with reader flags such as ",[23,1413,1227],{}," left out. Pass ",[23,1416,1417],{},"required"," to replace the message and ",[23,1420,23],{}," to add an error code. The ",[574,1423,1425],{"href":1424},"\u002Fguide\u002Ffailures","failures page"," shows how each format prints it.",[20,1428,1429,1430,1433],{},"A question asked after a bad reader flag, such as ",[23,1431,1432],{},"--format yaml",", throws that usage failure before it prompts.",[20,1435,1436,1437,838],{},"Next: ",[574,1438,1439],{"href":1424},"Failures and exit codes",[1441,1443,1444,1445,1446,1450,1451],{"id":34,"depth":1442,"text":38},2,{"id":108,"depth":1442,"text":111},{"id":581,"depth":1442,"text":584},{"id":737,"depth":1442,"text":740},{"id":862,"depth":1442,"text":865,"children":1447},[1448],{"id":1039,"depth":1449,"text":1042},3,{"id":1136,"depth":1442,"text":1139},{"id":1185,"depth":1442,"text":1188},{"path":1453,"title":1454,"description":1455},"\u002Fguide\u002Fbudget","Budget","How readerly fits agent output into 8,000 characters, which lines it keeps, the hidden footer, --max-chars and --full, and planBudget on its own.",{"path":1424,"title":1439,"description":1457},"The Failure envelope, failure(), actionRequired(), FailureError, toFailure and out.fail, readerly's exit codes, and how each format prints a failure.",1795985393119,"22ea5d7b-bce0-4e3b-bca3-1fbe3722fcf7"]