import { cliffy } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { ansi } = cliffy;
Chainable ansi escape sequence's. If invoked as method, a new Ansi instance will be returned.
await Deno.stdout.write(
new TextEncoder().encode(
ansi.cursorTo(0, 0).eraseScreen(),
),
);
Or shorter:
await Deno.stdout.write(
ansi.cursorTo(0, 0).eraseScreen.toBuffer(),
);