knighn screens

Draw every route of a code project (Next.js, Vite, TanStack Start, Expo web) as PNG files.

knighn screens [options] [FOLDER]
Argument What it is
FOLDER The project folder.
Option What it does Default
-o, --out <out> The folder the pictures go to.
--routes <routes> Only these routes, with commas: /,/venue/[id].
--states <states> State names with commas, "all", or "found" for the states found in the code. the first state of each route
--widths <widths> Widths in pixels with commas: 390,1440.
--scenes <scenes> Scenes from knighn/scenes.knighn.tsx: "all", "none" or names with commas. all, unless --routes is given
--components <components> Components drawn alone: "all" for the shared ones (a ui folder, shadcn/ui, used more than once), "none", or names with commas. the shared ones, unless --routes is given
--restart Start the dev server again first.
--query <query> More query parameters for every page, such as knighnMockKind=desktop (a=1&b=2)
--mock Draw with mock data and still pages (knighnMock=1&knighnStill=1), as Storybook mode.
--keep-overlays Keep the start-up overlays (onboarding, cookie banners, chat widgets) in the pictures.
--json Output as JSON.