{"_id":"@buddy-works/storybook","_rev":"2-f310a8ec3b4a6a1c0b22980e5d786b46","name":"@buddy-works/storybook","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@buddy-works/storybook","version":"1.0.0","keywords":["storybook-addon","storybook-addons","test","visual-regression","visual-testing","visual-tests","snapshot","screenshot","review","tunnel","buddy","bdy","ci"],"author":{"url":"https://buddy.works","name":"Buddy"},"license":"MIT","_id":"@buddy-works/storybook@1.0.0","maintainers":[{"name":"mical","email":"michal83h@gmail.com"},{"name":"bylek","email":"bylek77@gmail.com"},{"name":"bartoszwrobel591","email":"bartoszwrobel591@gmail.com"},{"name":"sztwiorok","email":"raphael@buddy.works"}],"homepage":"https://buddy.works/docs/cli","bugs":{"url":"https://github.com/buddy/storybook/issues"},"bin":{"bdy":"bin/bdy.js"},"dist":{"shasum":"dbb73e3f231223b17acd240c6bbea36b0ae812be","tarball":"https://registry.npmjs.org/@buddy-works/storybook/-/storybook-1.0.0.tgz","fileCount":5,"integrity":"sha512-u8OrCWOQnyDQqYseyxGqTgfevukrfJTOdhqm7w3Kk3AePqCCcjWyR9pRfLk/5Y17XxEL1orZAXqBqJ/H95sDQA==","signatures":[{"sig":"MEQCIFrl1+tsbnZGhVKiPUA94wjE09SRSHewdgxAWC9lXMSOAiA2g8OZh7GJ/Iu6bTPs09SzTHT6EJg2DrxMMEVSFvqgrQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6484},"main":"preset.js","engines":{"node":">=24.14"},"gitHead":"2858f829311ebe87c4d81a1535b1bb5cc980d493","_npmUser":{"name":"bylek","email":"bylek77@gmail.com"},"storybook":{"icon":"https://avatars.githubusercontent.com/u/351497","displayName":"Buddy Visual Tests","supportedFrameworks":["react","vue","angular","web-components","ember","html","svelte","preact"],"unsupportedFrameworks":["react-native"]},"repository":{"url":"git+https://github.com/buddy/storybook.git","type":"git"},"_npmVersion":"11.9.0","description":"Buddy visual regression testing and tunnels for Storybook. Upload your built Storybook to Buddy, review visual diffs of every story, and share your local Storybook through a public tunnel URL. A thin proxy for the bdy CLI.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"bdy":"^1.22.90"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/storybook_1.0.0_1786706210775_0.3690371357692661","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-08-14T11:16:50.487Z","modified":"2026-09-02T06:47:19.077Z","1.0.0":"2026-08-14T11:16:50.953Z"},"bugs":{"url":"https://github.com/buddy/storybook/issues"},"author":{"url":"https://buddy.works","name":"Buddy"},"license":"MIT","homepage":"https://buddy.works/docs/cli","keywords":["storybook-addon","storybook-addons","test","visual-regression","visual-testing","visual-tests","snapshot","screenshot","review","tunnel","buddy","bdy","ci"],"repository":{"url":"git+https://github.com/buddy/storybook.git","type":"git"},"description":"Buddy visual regression testing and tunnels for Storybook. Upload your built Storybook to Buddy, review visual diffs of every story, and share your local Storybook through a public tunnel URL. A thin proxy for the bdy CLI.","maintainers":[{"email":"michal83h@gmail.com","name":"mical"},{"email":"bylek77@gmail.com","name":"bylek"},{"email":"bartoszwrobel591@gmail.com","name":"bartoszwrobel591"},{"email":"mganczarczyk@proton.me","name":"mganczarczyk"},{"email":"raphael@buddy.works","name":"sztwiorok"}],"readme":"# Buddy Visual Tests for Storybook (`@buddy-works/storybook`)\n\nVisual regression testing for your Storybook, powered by [Buddy](https://buddy.works) and the [`bdy`](https://www.npmjs.com/package/bdy) CLI.\n\n`@buddy-works/storybook` is a thin proxy around `bdy`, packaged and documented specifically for Storybook workflows:\n\n- **Visual regression testing** — upload your built Storybook to Buddy; every story becomes a snapshot that is rendered, compared against the baseline, and queued for review with visual diffs.\n- **Instant sharing** — expose your local Storybook dev server through a public tunnel URL for quick reviews, without deploying anything.\n- **CI-ready** — works in any CI provider (commit, branch, and PR metadata are detected automatically) and authenticates with a single token.\n\n## Installation\n\n```sh\nnpm install --save-dev @buddy-works/storybook\n```\n\nThis installs the `bdy` command into your project.\n\n## Authentication\n\nUploading requires your visual test suite token — there are two ways to provide it.\n\n### Option A — suite token in an environment variable\n\nCopy the token from your visual test suite settings in Buddy and expose it as `BUDDY_VT_TOKEN`:\n\n```sh\nexport BUDDY_VT_TOKEN=<your-suite-token>\n```\n\n### Option B — sign in and link a suite\n\nSign in once, then link your project to a visual test suite. From the project root:\n\n```sh\nnpx bdy login\nnpx bdy tests visual link\n```\n\n```sh\nnpx bdy tests visual link -w my-workspace -p my-project -s my-suite\n```\n\n`link` stores the selection in a `.bdy/project.json` file in the current directory, and `upload` resolves the suite token from it automatically. Run `upload` from the same directory, passing the path to the built Storybook.\n\n## Quick start\n\n### 1. Build your Storybook\n\n```sh\nnpm run build-storybook\n```\n\n### 2. Upload it\n\nPass the path to the built Storybook directory (the one containing `index.html`, `iframe.html`, and `index.json` — `storybook-static` by default):\n\n```sh\nnpx bdy tests visual upload ./storybook-static\n```\n\nWithout the path, `upload` expects the current directory to be the built Storybook.\n\nThe CLI reads the story index, uploads the build, and creates a visual test session in Buddy. Open the session in Buddy to review per-story diffs and approve or reject changes.\n\n## Running in CI\n\nIn CI, use Option A: provide the suite token via the `BUDDY_VT_TOKEN` environment variable.\n\nExample GitHub Actions job:\n\n```yaml\nvisual-tests:\n  runs-on: ubuntu-latest\n  steps:\n    - uses: actions/checkout@v4\n    - uses: actions/setup-node@v4\n      with:\n        node-version: 24\n    - run: npm ci\n    - run: npm run build-storybook\n    - run: npx bdy tests visual upload ./storybook-static\n      env:\n        BUDDY_VT_TOKEN: ${{ secrets.BUDDY_VT_TOKEN }}\n```\n\nThe same pattern works in Buddy pipelines, GitLab CI, CircleCI, Jenkins, and others — CI and git metadata (branch, commit, pull request) are detected automatically.\n\n### Suggested `package.json` scripts\n\n```json\n{\n  \"scripts\": {\n    \"build-storybook\": \"storybook build\",\n    \"visual-tests\": \"npm run build-storybook && bdy tests visual upload ./storybook-static\"\n  }\n}\n```\n\n## Share your local Storybook\n\nExpose the Storybook dev server through a public HTTPS tunnel:\n\n```sh\nnpm run storybook            # serves on http://localhost:6006\nnpx bdy tunnel http 6006\n```\n\nYou get a public URL you can send to anyone. Restrict access when needed:\n\n```sh\nnpx bdy tunnel http 6006 -a user:pass   # basic auth\nnpx bdy tunnel http 6006 -w 1.1.1.1     # IP allowlist\n```\n\nYou can also serve an already-built Storybook directly from disk:\n\n```sh\nnpx bdy tunnel http -n my-storybook -s ./storybook-static\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}