{"_id":"@effinrich/forgekit-storybook-plugin","_rev":"5-0eff4b5386cae5aaf45205d21f7965db","name":"@effinrich/forgekit-storybook-plugin","dist-tags":{"latest":"2.1.2"},"versions":{"2.0.0":{"name":"@effinrich/forgekit-storybook-plugin","version":"2.0.0","keywords":["storybook","react","testing","code-generation","interaction-tests","playwright","accessibility","a11y","story-generation"],"author":{"name":"Rich Tillman"},"license":"MIT","_id":"@effinrich/forgekit-storybook-plugin@2.0.0","maintainers":[{"name":"effinsnafu","email":"richtillman@gmail.com"}],"homepage":"https://github.com/effinrich/forgekit-storybook-plugin#readme","bugs":{"url":"https://github.com/effinrich/forgekit-storybook-plugin/issues"},"bin":{"forgekit-storybook-plugin":"bin/forgekit.js"},"dist":{"shasum":"d56d0854ebbd29147aa27385e2c126f335d6c935","tarball":"https://registry.npmjs.org/@effinrich/forgekit-storybook-plugin/-/forgekit-storybook-plugin-2.0.0.tgz","fileCount":27,"integrity":"sha512-heBC7M1g4p5/Uiu3MTJyt0cQP5XWqPoB3xxIt1Ujc3E9TKwkFdNIEsuF6Xb0iDUCFVyvtyGOmyXduu8dKoSV5Q==","signatures":[{"sig":"MEYCIQDnzRxWKPhBUcEeA6wQfg5jAVJBQk+LihVuEN1Szw9M8wIhANaOgHcwXDcjfbWnEoigm6+S6UiPNryC8wD5fawlxDO8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335073},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.17.1"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"52c185af8c0b25829faaf3f462aa752387eeb0ca","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","test":"vitest run","build":"tsup","release":"commit-and-tag-version","typecheck":"npx tsc --noEmit","test:watch":"vitest","postrelease":"git push --follow-tags origin main && npm publish --access public","release:major":"commit-and-tag-version --release-as major","release:minor":"commit-and-tag-version --release-as minor","prepublishOnly":"npm run build"},"_npmUser":{"name":"effinsnafu","email":"richtillman@gmail.com"},"repository":{"url":"git+https://github.com/effinrich/forgekit-storybook-plugin.git","type":"git"},"_npmVersion":"11.11.0","description":"Auto-generate Storybook stories, interaction tests, Playwright component tests, and accessibility audits from React component analysis","directories":{},"_nodeVersion":"25.8.1","dependencies":{"chalk":"^5.4.1","yargs":"^17.7.2","chokidar":"^4.0.3","fast-glob":"^3.3.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.3","@types/node":"^22.13.0","@types/yargs":"^17.0.33","commit-and-tag-version":"^12.7.1"},"peerDependencies":{"storybook":">=8.0.0","typescript":">=5.0.0"},"peerDependenciesMeta":{"storybook":{"optional":true},"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/forgekit-storybook-plugin_2.0.0_1774827750547_0.9136529126576454","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to forgekit-storybook-mcp — install that instead"},"2.1.0":{"name":"@effinrich/forgekit-storybook-plugin","version":"2.1.0","keywords":["storybook","react","testing","code-generation","interaction-tests","playwright","accessibility","a11y","story-generation"],"author":{"name":"Rich Tillman"},"license":"MIT","_id":"@effinrich/forgekit-storybook-plugin@2.1.0","maintainers":[{"name":"effinsnafu","email":"richtillman@gmail.com"}],"homepage":"https://github.com/effinrich/forgekit-storybook-plugin#readme","bugs":{"url":"https://github.com/effinrich/forgekit-storybook-plugin/issues"},"bin":{"forgekit-storybook-plugin":"bin/forgekit.js"},"dist":{"shasum":"be2be278e017d1d2384217a27e84e8c172addabd","tarball":"https://registry.npmjs.org/@effinrich/forgekit-storybook-plugin/-/forgekit-storybook-plugin-2.1.0.tgz","fileCount":27,"integrity":"sha512-zg/2cmp9cZtTHM+bJyeGb9qDfXZ0F7S6rIYv60JLmrgE0C6VfJ5cZfjL3/uxJDmKelwQE81RYqBPqRlo5cYizA==","signatures":[{"sig":"MEYCIQCmwA0YbPb71MUykNoIJYwrJHCZuJ8NYJvGutFjkE+QSwIhAJj6i6DrgYntpDaQQ2QgJby98CXAT/PbBjm/DnY1OSlG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":356887},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.17.1"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"f2d86daccc23c6a7addba0262a2c75446ac0f226","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","test":"vitest run","build":"tsup","release":"commit-and-tag-version","typecheck":"npx tsc --noEmit","test:watch":"vitest","postrelease":"git push --follow-tags origin main && npm publish --access public","release:major":"commit-and-tag-version --release-as major","release:minor":"commit-and-tag-version --release-as minor","prepublishOnly":"npm run build"},"_npmUser":{"name":"effinsnafu","email":"richtillman@gmail.com"},"repository":{"url":"git+https://github.com/effinrich/forgekit-storybook-plugin.git","type":"git"},"_npmVersion":"11.11.0","description":"Auto-generate Storybook stories, interaction tests, Playwright component tests, and accessibility audits from React component analysis","directories":{},"_nodeVersion":"25.8.1","dependencies":{"chalk":"^5.4.1","yargs":"^17.7.2","chokidar":"^4.0.3","fast-glob":"^3.3.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.3","@types/node":"^22.13.0","@types/yargs":"^17.0.33","commit-and-tag-version":"^12.7.1"},"peerDependencies":{"storybook":">=8.0.0","typescript":">=5.0.0"},"peerDependenciesMeta":{"storybook":{"optional":true},"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/forgekit-storybook-plugin_2.1.0_1774896172975_0.9355126842425459","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to forgekit-storybook-mcp — install that instead"},"2.1.1":{"name":"@effinrich/forgekit-storybook-plugin","version":"2.1.1","keywords":["storybook","react","testing","code-generation","interaction-tests","playwright","accessibility","a11y","story-generation"],"author":{"name":"Rich Tillman"},"license":"MIT","_id":"@effinrich/forgekit-storybook-plugin@2.1.1","maintainers":[{"name":"effinsnafu","email":"richtillman@gmail.com"}],"homepage":"https://github.com/effinrich/forgekit-storybook-plugin#readme","bugs":{"url":"https://github.com/effinrich/forgekit-storybook-plugin/issues"},"bin":{"forgekit-storybook-plugin":"bin/forgekit.js"},"dist":{"shasum":"fb40f452ac6959b1332ef3e445606feedfc003a2","tarball":"https://registry.npmjs.org/@effinrich/forgekit-storybook-plugin/-/forgekit-storybook-plugin-2.1.1.tgz","fileCount":27,"integrity":"sha512-ynGZx6wsHZSyKo215NLXk7QPhXOKskNP56SqFa+GqQ/0fu5ml0Uqr8CvLtzVUudwWFrKDkXfk7i7CMXZ0fEmNQ==","signatures":[{"sig":"MEUCIDbW6XLYMJ18UK7iHrPQQTLP2nT2rk+BLxDpfHOcNiPNAiEArH8EZKHIU/DtE43UTzGZ/iv9VDQZ93KLRzHvNmekY5M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":357744},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.17.1"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"81cfa9589d2e03f2b7e6802bff97c032391f71cd","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","test":"vitest run","build":"tsup","release":"commit-and-tag-version","typecheck":"npx tsc --noEmit","test:watch":"vitest","postrelease":"git push --follow-tags origin main && npm publish --access public","release:major":"commit-and-tag-version --release-as major","release:minor":"commit-and-tag-version --release-as minor","prepublishOnly":"npm run build"},"_npmUser":{"name":"effinsnafu","email":"richtillman@gmail.com"},"repository":{"url":"git+https://github.com/effinrich/forgekit-storybook-plugin.git","type":"git"},"_npmVersion":"10.9.0","description":"Auto-generate Storybook stories, interaction tests, Playwright component tests, and accessibility audits from React component analysis","directories":{},"_nodeVersion":"23.2.0","dependencies":{"chalk":"^5.4.1","yargs":"^17.7.2","chokidar":"^4.0.3","fast-glob":"^3.3.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.3","@types/node":"^22.13.0","@types/yargs":"^17.0.33","commit-and-tag-version":"^12.7.1"},"peerDependencies":{"storybook":">=8.0.0","typescript":">=5.0.0"},"peerDependenciesMeta":{"storybook":{"optional":true},"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/forgekit-storybook-plugin_2.1.1_1774906570764_0.5486469553394075","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to forgekit-storybook-mcp — install that instead"},"2.1.2":{"name":"@effinrich/forgekit-storybook-plugin","version":"2.1.2","keywords":["storybook","react","testing","code-generation","interaction-tests","playwright","accessibility","a11y","story-generation"],"author":{"name":"Rich Tillman"},"license":"MIT","_id":"@effinrich/forgekit-storybook-plugin@2.1.2","maintainers":[{"name":"effinsnafu","email":"richtillman@gmail.com"}],"homepage":"https://github.com/effinrich/forgekit-storybook-plugin#readme","bugs":{"url":"https://github.com/effinrich/forgekit-storybook-plugin/issues"},"bin":{"forgekit-storybook-plugin":"bin/forgekit.js"},"dist":{"shasum":"07da37ce2ff5bb944a34403a0dfb4517d654de32","tarball":"https://registry.npmjs.org/@effinrich/forgekit-storybook-plugin/-/forgekit-storybook-plugin-2.1.2.tgz","fileCount":27,"integrity":"sha512-gRSz6VUPcalGARjlOpn7/54gsZLSogC+e/So47k9b4o9sJdwDmUa4oq3tnJh0An8f+OQFGc3GFzzgsvBOoyLRw==","signatures":[{"sig":"MEYCIQDnsIEw62Yi9VsNvkqZ8VjTEllZskTNvsQl4qsjJY7Q5AIhAIOY1Re7/WauVMlnm6n+V+HKFGaeFR+xWYvFyZqLd8CD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":407293},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.17.1"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"f29ec85dcd080d6a5210adfc93570f74f4e2db74","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","test":"vitest run","build":"tsup","release":"commit-and-tag-version","typecheck":"npx tsc --noEmit","test:watch":"vitest","postrelease":"git push --follow-tags origin main && npm publish --access public","release:major":"commit-and-tag-version --release-as major","release:minor":"commit-and-tag-version --release-as minor","prepublishOnly":"npm run build"},"_npmUser":{"name":"effinsnafu","email":"richtillman@gmail.com"},"repository":{"url":"git+https://github.com/effinrich/forgekit-storybook-plugin.git","type":"git"},"_npmVersion":"10.9.0","description":"Auto-generate Storybook stories, interaction tests, Playwright component tests, and accessibility audits from React component analysis","directories":{},"_nodeVersion":"23.2.0","dependencies":{"chalk":"^5.4.1","yargs":"^17.7.2","chokidar":"^4.0.3","fast-glob":"^3.3.3"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","vitest":"^3.0.0","typescript":"^5.7.3","@types/node":"^22.13.0","@types/yargs":"^17.0.33","commit-and-tag-version":"^12.7.1"},"peerDependencies":{"storybook":">=8.0.0","typescript":">=5.0.0"},"peerDependenciesMeta":{"storybook":{"optional":true},"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/forgekit-storybook-plugin_2.1.2_1774987359430_0.32697045641616995","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to forgekit-storybook-mcp — install that instead"}},"time":{"created":"2026-03-29T23:42:30.404Z","modified":"2026-05-08T14:35:57.501Z","2.0.0":"2026-03-29T23:42:30.706Z","2.1.0":"2026-03-30T18:42:53.171Z","2.1.1":"2026-03-30T21:36:10.990Z","2.1.2":"2026-03-31T20:02:39.578Z"},"bugs":{"url":"https://github.com/effinrich/forgekit-storybook-plugin/issues"},"author":{"name":"Rich Tillman"},"license":"MIT","homepage":"https://github.com/effinrich/forgekit-storybook-plugin#readme","keywords":["storybook","react","testing","code-generation","interaction-tests","playwright","accessibility","a11y","story-generation"],"repository":{"url":"git+https://github.com/effinrich/forgekit-storybook-plugin.git","type":"git"},"description":"Auto-generate Storybook stories, interaction tests, Playwright component tests, and accessibility audits from React component analysis","maintainers":[{"name":"effinsnafu","email":"richtillman@gmail.com"}],"readme":"# ForgeKit Storybook Plugin\n\nAuto-generate Storybook stories, interaction tests, Playwright component tests, and accessibility audits from React component analysis.\n\nForgeKit Storybook Plugin analyzes your React components — props, callbacks, union types, features — and generates complete `.stories.tsx` files with controls, variants, interaction tests, and a11y audits. No configuration required.\n\n## Install\n\n```bash\nnpm install -D @effinrich/forgekit-storybook-plugin\n```\n\n**Peer dependencies** (optional):\n\n- `storybook >= 8.0.0`\n- `typescript >= 5.0.0`\n\nRun `npx forgekit-storybook-plugin init` to check prerequisites and see what's installed.\n\n## Quick Start\n\n```bash\n# Generate a story for a single component\nnpx forgekit-storybook-plugin story src/components/Button.tsx\n\n# Generate stories for every component in a directory\nnpx forgekit-storybook-plugin stories src/components/\n\n# Check coverage without generating anything\nnpx forgekit-storybook-plugin coverage src/components/\n```\n\n## CLI Commands\n\n### `forgekit-storybook-plugin story <path>`\n\nGenerate a Storybook story for a single React component.\n\n```bash\nnpx forgekit-storybook-plugin story src/Button.tsx\nnpx forgekit-storybook-plugin story src/Button.tsx --dry-run\nnpx forgekit-storybook-plugin story src/Button.tsx --overwrite --skip-interaction-tests\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `--story-title` | auto-inferred | Custom Storybook title |\n| `--skip-interaction-tests` | `false` | Skip generating play functions |\n| `--overwrite` | `false` | Overwrite existing story file |\n| `--dry-run` | `false` | Preview without writing files |\n\n### `forgekit-storybook-plugin stories <dir>`\n\nBulk generate stories for all components in a directory.\n\n```bash\nnpx forgekit-storybook-plugin stories src/components/\nnpx forgekit-storybook-plugin stories src/components/ --include-tests --overwrite\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `--skip-interaction-tests` | `false` | Skip generating play functions |\n| `--overwrite` | `false` | Overwrite existing story files |\n| `--dry-run` | `false` | Preview without writing files |\n| `--include-tests` | `false` | Also generate Playwright component tests |\n\n### `forgekit-storybook-plugin test <path>`\n\nGenerate a Playwright component test for a React component.\n\n```bash\nnpx forgekit-storybook-plugin test src/Button.tsx\nnpx forgekit-storybook-plugin test src/Button.tsx --dry-run\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `--overwrite` | `false` | Overwrite existing test file |\n| `--dry-run` | `false` | Preview without writing files |\n\n### `forgekit-storybook-plugin watch <dir>`\n\nWatch a directory and auto-generate stories when components change.\n\n```bash\nnpx forgekit-storybook-plugin watch src/components/\nnpx forgekit-storybook-plugin watch src/components/ --debounce 500\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `--skip-interaction-tests` | `false` | Skip generating play functions |\n| `--debounce` | `300` | Debounce interval in milliseconds |\n\n### `forgekit-storybook-plugin coverage <dir>`\n\nReport story coverage for a directory without generating files.\n\n```bash\nnpx forgekit-storybook-plugin coverage src/components/\nnpx forgekit-storybook-plugin coverage src/components/ --json\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `--json` | `false` | Output results as JSON |\n\nCoverage grades: **A** (≥ 90%) · **B** (≥ 75%) · **C** (≥ 50%) · **D** (≥ 25%) · **F** (< 25%)\n\n### `forgekit-storybook-plugin init`\n\nCheck prerequisites and display the setup guide.\n\n## What Gets Generated\n\nFor each component, ForgeKit Storybook Plugin can generate up to **9 Storybook stories**:\n\n| Story | Condition | Tests |\n| --- | --- | --- |\n| **Default** | Always | Component with default/required props |\n| **Sizes** | `size` prop with union values | All size variants side by side |\n| **Variants** | `variant` prop with union values | All style variants |\n| **ColorPalettes** | `colorPalette` prop with union values | All color options |\n| **Disabled** | `disabled`/`isDisabled` prop | Disabled state rendering |\n| **ClickInteraction** | Any `onClick`/`onPress` callback | Click fires handler |\n| **KeyboardNavigation** | Any interactive callback | Tab focus + Enter triggers |\n| **RendersCorrectly** | Always | Mounts without crashing |\n| **AccessibilityAudit** | Always | axe-core a11y check |\n\nAnd up to **7 Playwright test cases** (visual regression, interaction, accessibility).\n\n## Programmatic API\n\n```typescript\nimport {\n  forgeStory,\n  forgeStories,\n  forgeTest,\n  analyzeComponent,\n  generateStoryContent,\n  scoreCoverage,\n  scanDirectory,\n  watchDirectory,\n} from '@effinrich/forgekit-storybook-plugin';\n```\n\n### `forgeStory(options)`\n\nAnalyze a component, generate a story, and optionally write it to disk.\n\n```typescript\nconst result = await forgeStory({\n  componentPath: 'src/Button.tsx',\n  overwrite: false,\n  dryRun: false,\n});\n// result: { storyPath, content, analysis, storiesGenerated, written }\n```\n\n### `forgeStories(options)`\n\nBulk generate stories for all components in a directory.\n\n```typescript\nconst result = await forgeStories({\n  dir: 'src/components',\n  includeComponentTests: true,\n});\n// result: { generated, failed, alreadyCovered, notAnalyzable, total, coverage, errors }\n```\n\n### `forgeTest(options)`\n\nGenerate a Playwright component test for a component.\n\n```typescript\nconst result = await forgeTest({\n  componentPath: 'src/Button.tsx',\n});\n// result: { testPath, content, analysis, written }\n```\n\n### `analyzeComponent(filePath)`\n\nLow-level: parse a React component and extract props, imports, features, and export type.\n\n```typescript\nconst analysis = analyzeComponent('src/Button.tsx');\n// analysis: { componentName, props, imports, features, exportType }\n```\n\n### `scoreCoverage(covered, total)`\n\nCalculate coverage percentage and letter grade.\n\n```typescript\nconst report = scoreCoverage(8, 10);\n// report: { covered: 8, total: 10, percentage: 80, grade: 'B' }\n```\n\n## Component Analysis\n\nForgeKit Storybook Plugin detects:\n\n- **Props** — name, type, required, callbacks, union values (`'sm' | 'md' | 'lg'`)\n- **Features** — children, React Router, React Query, Chakra UI\n- **Export type** — default, named, or both\n- **Patterns** — `React.forwardRef`, `React.memo`, intersection types\n\nControls are auto-mapped: `text`, `number`, `boolean`, `select` (for unions), `action` (for callbacks).\n\n## Copilot / AI Agent Skill\n\nForgeKit Storybook Plugin ships with a [Copilot skill](.agents/skills/forgekit-storybook-plugin/SKILL.md) so AI agents know when and how to invoke it. To install:\n\n**Project-level** (already included in this repo):\n```\n.agents/skills/forgekit-storybook-plugin/SKILL.md\n```\nAny Copilot session in this workspace will automatically pick it up.\n\n**Global** (available in all your projects):\n```bash\nmkdir -p ~/.agents/skills/forgekit-storybook-plugin\ncp .agents/skills/forgekit-storybook-plugin/SKILL.md ~/.agents/skills/forgekit-storybook-plugin/\n```\n\n**Via the skills registry:**\n```bash\nnpx skills add effinrich/forgekit-storybook-plugin@forgekit-storybook-plugin\n```\n\nOnce installed, you can say things like \"generate stories for my components\" or \"check story coverage\" in chat and the agent will run the right CLI commands.\n\n## Requirements\n\n- Node.js ≥ 18.17.1\n- React components (`.tsx` / `.jsx`)\n- Storybook ≥ 8.0.0 (optional peer dep — CLI works without it for dry-run/analysis)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}