[{"data":1,"prerenderedAt":199,"buildId":200},["ShallowReactive",2],{"docs:\u002Fintegrations":3},{"page":4,"section":17,"document":18,"credits":11,"prev":11,"next":197},{"id":5,"path":6,"file":7,"title":8,"sourceTitle":9,"description":10,"tagline":10,"eyebrow":11,"credits":11,"keywords":12,"icon":13,"layout":14,"sidebar":15,"toc":15,"kind":11,"group":11,"navigation":15,"order":16},"index","\u002Fintegrations","integrations\u002Findex.md","Overview","Integrations overview","Use readerly with GitHub Actions, your argument parser, your test runner, progress lines, Markdown answers and nostics diagnostics.",null,[],"i-lucide-plug","article",true,1,"integrations",{"nodes":19,"toc":194},[20,24,142,150],[21,22,23],"p",{},"readerly works next to the tools a CLI already has. It doesn't parse your commands, run your tests or render Markdown. Each page here shows where it meets one of them, with examples that ran against the source.",[25,26,27,57,81,98,110,126],"ul",{},[28,29,30,39,40,44,45,48,49,52,53,56],"li",{},[31,32,33,38],"strong",{},[34,35,37],"a",{"href":36},"\u002Fintegrations\u002Fgithub-actions","GitHub Actions","."," Detects the runner from ",[41,42,43],"code",{},"GITHUB_ACTIONS",", prints ",[41,46,47],{},"text",", and adds ",[41,50,51],{},"::error"," and ",[41,54,55],{},"::warning"," annotations on stderr, at most 10 of each.",[28,58,59,65,66,69,70,73,74,65,77,80],{},[31,60,61,38],{},[34,62,64],{"href":63},"\u002Fintegrations\u002Fargument-parsers","Argument parsers"," ",[41,67,68],{},"readerFlags(argv)"," takes the shared flags and leaves ",[41,71,72],{},"rest"," for ",[41,75,76],{},"node:util",[41,78,79],{},"parseArgs",", cac or your own parser.",[28,82,83,89,90,93,94,97],{},[31,84,85,38],{},[34,86,88],{"href":87},"\u002Fintegrations\u002Ftesting","Testing your CLI"," A fake ",[41,91,92],{},"Io"," runs one command as a terminal, an agent, GitHub Actions and ",[41,95,96],{},"--format json"," in the same test file.",[28,99,100,65,106,109],{},[31,101,102,38],{},[34,103,105],{"href":104},"\u002Fintegrations\u002Fprogress","Progress",[41,107,108],{},"out.progress(label)"," draws a live bar on a terminal, prints a line every 5 seconds in CI and pipes, and prints nothing for agents and JSON.",[28,111,112,65,118,121,122,125],{},[31,113,114,38],{},[34,115,117],{"href":116},"\u002Fintegrations\u002Fmarkdown-answers","Markdown answers",[41,119,120],{},"out.write()"," takes an answer the tool rendered itself, such as Markdown through ",[41,123,124],{},"@comark\u002Fansi"," for a person and as is for everyone else.",[28,127,128,65,134,137,138,141],{},[31,129,130,38],{},[34,131,133],{"href":132},"\u002Fintegrations\u002Fnostics","nostics",[41,135,136],{},"nosticsReporter(out)"," sends nostics diagnostics to ",[41,139,140],{},"createOut"," as records, without a dependency on nostics.",[143,144,149],"h2",{"id":145,"anchor":146},"typical-setups",{"label":147,"icon":148},"Section titled \"Typical setups\"","#","Typical setups",[25,151,152,164,180],{},[28,153,154,65,157,159,160,163],{},[31,155,156],{},"A linter or checker.",[41,158,140],{}," with ",[41,161,162],{},"out.diagnostic()",", annotations on GitHub Actions, and goldens per reader in your tests.",[28,165,166,169,170,172,173,176,177,38],{},[31,167,168],{},"A tool with subcommands."," cac or ",[41,171,79],{}," for the commands, ",[41,174,175],{},"readerFlags"," first, and ",[41,178,179],{},"process.exitCode = await command(argv)",[28,181,182,65,185,187,188,191,192,38],{},[31,183,184],{},"A docs or explain command.",[41,186,120],{}," with Markdown, rendered only when ",[41,189,190],{},"out.profile.format"," is ",[41,193,47],{},[195],{"id":145,"depth":196,"text":149},2,{"path":36,"title":37,"description":198},"How readerly detects GitHub Actions, prints text with file annotations on stderr, escapes them, caps them at 10, and what agents in CI get instead.",1795985394359,"22ea5d7b-bce0-4e3b-bca3-1fbe3722fcf7"]