GitHub
Skip to content

Integrations overview

Use readerly with GitHub Actions, your argument parser, your test runner, progress lines, Markdown answers and nostics diagnostics.

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.

  • GitHub Actions. Detects the runner from GITHUB_ACTIONS, prints text, and adds ::error and ::warning annotations on stderr, at most 10 of each.
  • Argument parsers. readerFlags(argv) takes the shared flags and leaves rest for node:util parseArgs, cac or your own parser.
  • Testing your CLI. A fake Io runs one command as a terminal, an agent, GitHub Actions and --format json in the same test file.
  • Progress. 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.
  • Markdown answers. out.write() takes an answer the tool rendered itself, such as Markdown through @comark/ansi for a person and as is for everyone else.
  • nostics. nosticsReporter(out) sends nostics diagnostics to createOut as records, without a dependency on nostics.
  • A linter or checker. createOut with out.diagnostic(), annotations on GitHub Actions, and goldens per reader in your tests.
  • A tool with subcommands. cac or parseArgs for the commands, readerFlags first, and process.exitCode = await command(argv).
  • A docs or explain command. out.write() with Markdown, rendered only when out.profile.format is text.