Skip to main content
Use @qawolf/flows/cli when the flow does not need a browser, Android device, or iOS device.
import { flow } from "@qawolf/flows/cli";
import { readFile } from "node:fs/promises";

export default flow("Read build metadata", "Basic", async () => {
  const metadata = await readFile("build-metadata.json", "utf8");

  console.log(JSON.parse(metadata));
});

Use The Basic Target

CLI flows currently support one target.
export default flow("CLI task", "Basic", async ({ input }) => {
  console.log(input);
});

Use Node APIs Directly

CLI flows run in Node, so prefer the Node standard library for ordinary file, process, and network work.
import { writeFile } from "node:fs/promises";

export default flow("Write report", "Basic", async () => {
  await writeFile("report.json", JSON.stringify({ status: "ok" }));
});

Pass Data To Later Flows

Use input for values passed into the flow and setOutput(...) for values a later flow can read.
export default flow(
  "Prepare account fixture",
  "Basic",
  async ({ input, setOutput, test }) => {
    await test("publish account fixture", async () => {
      setOutput("account", {
        input,
        role: "admin",
      });
    });
  },
);
Use CLI flows for setup, teardown, notifications, and other non-UI work. Reach for input, setOutput(...), and test(...) when you need QA Wolf runtime state. For the exact CLI target and callback context shape, see the CLI Reference.
Last modified on April 24, 2026