npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trylayout/qa

v0.7.6

Published

Open source frontend QA protocol runner for coding agents.

Readme

Layout QA

npm CI License: MIT

Layout QA is an open source frontend QA protocol for coding agents.

It gives agents a repeatable way to set up a frontend, run browser checks, capture screenshots, and report concrete visual, UX, and state issues from the active coding session.

Primary Agent Flow

Set up the repo once:

npx @trylayout/qa setup

Run a QA pass:

npx @trylayout/qa test "test the changed checkout flow" --json

Each run writes:

.layout/runs/<timestamp-scenario-viewport>/
  index.html
  result.json
  screenshots/

The CLI exits 0 on pass and 1 on failure.

Commands

Primary commands:

trylayout setup [options]
trylayout test "intent" [options]

Remote PR check commands:

trylayout pr setup [options]
trylayout pr run "intent" --repo <owner/repo> --ref <branch> [options]
trylayout pr status <run_id> [options]

Protocol commands:

trylayout init [options]
trylayout check [flow_id ...] [options]
trylayout install-browsers
trylayout mock-api [options]
trylayout run --target-url <url> [options]

Use npx @trylayout/qa <command> when running without installing. The layout-qa package and binary are equivalent aliases.

Common Options

--json             Print machine-readable JSON.
--open             Open generated local HTML reports. With setup, open docs.
--intent <text>    Natural-language QA intent metadata.
--timeout <ms>     Browser run timeout.
--branch <name>    Branch name for report metadata.
--commit-sha <sha> Commit SHA metadata.

Remote PR options:

--api-url <url>    Layout API base URL. Defaults to https://api.trylayout.com/v1/qa.
--api-key <key>    Layout organization API key. Defaults to LAYOUT_API_KEY.
--repo <name>      Repository full name, e.g. owner/repo.
--ref <name>       Branch/ref for a PR check. Defaults to --branch.
--run-id <id>      Layout run id for status checks.
--wait             Poll until the PR check is ready.

Protocol/local options:

--target-url <url> URL of an already-running frontend to test.
--scenario <name>  Scenario to activate. Defaults to happy_path.
--flows <path>     Flow manifest path. Defaults to .layout/qa.json.
--app <name>       App key from manifest apps.<name>.
--mock-root <path> Mock service root.
--port <number>    Port for mock-api or a single service.
--out <path>       Artifact directory. Defaults to .layout/runs.
--viewport <value> Viewport preset or size: desktop, tablet, mobile, or WIDTHxHEIGHT.
--headed           Show the browser instead of running headless.
--start-app        Start the app from .layout/qa.json before local checks.
--serve-mocks      Start manifest services before local checks.
--skip-install     With --start-app, skip app.install.
--force            Overwrite starter protocol files during setup/init.

Protocol Manifest

Default path: .layout/qa.json.

trylayout setup creates a starter manifest and starter mock API scenarios. Edit the app command, QA environment, and flows so future agents can reproduce the same checks.

{
  "version": 1,
  "apps": {
    "app": {
      "root": ".",
      "install": "npm ci",
      "start": "npm run dev -- --host 127.0.0.1 --port $PORT",
      "healthUrl": "http://127.0.0.1:$PORT/",
      "services": {
        "api": {
          "type": "generated",
          "root": ".layout/api",
          "scenario": "happy_path"
        }
      },
      "env": {
        "VITE_API_BASE_URL": "$services.api.url"
      },
      "flows": [
        {
          "id": "smoke",
          "label": "Smoke",
          "steps": [
            {"visit": "/"},
            {"screenshot": "Home loaded", "expect": {"noConsoleErrors": true}}
          ]
        }
      ]
    }
  },
  "viewports": ["desktop"]
}

Running Against An Existing Server

If the app is already running, skip the manifest start command:

npx @trylayout/qa test "check the current page" \
  --target-url http://localhost:5173 \
  --json

Remote PR Checks

The hosted product is a GitHub PR check, not a dashboard workflow. GitHub is the system of record; the Layout dashboard is only for inspecting screenshots, logs, and run details when a compact PR check is not enough.

Generate a GitHub Actions workflow:

npx @trylayout/qa pr setup

Add LAYOUT_API_KEY as a GitHub repository secret, then open a pull request. The generated workflow calls Layout remotely and fails the GitHub check when Layout finds issues or cannot complete the run.

Run the same remote check manually:

npx @trylayout/qa pr run "test this pull request" \
  --repo owner/repo \
  --ref feature-branch \
  --wait \
  --json

Lower-Level Checks

Run explicit manifest flows:

npx @trylayout/qa check smoke --start-app --skip-install --json

Start only the built-in mock API:

npx @trylayout/qa mock-api --scenario happy_path

Install Chromium if Playwright asks for a browser:

npx @trylayout/qa install-browsers

Package Names

  • Canonical npm package: @trylayout/qa
  • Convenience npm alias: layout-qa
  • CLI binaries: trylayout and layout-qa

Issues and examples are welcome in GitHub Issues.