{"_id":"@a11y-gate/cli","name":"@a11y-gate/cli","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@a11y-gate/cli","version":"0.1.2","repository":{"type":"git","url":"git+https://github.com/asankagit/a11y-gate.git"},"homepage":"https://github.com/asankagit/a11y-gate#readme","bugs":{"url":"https://github.com/asankagit/a11y-gate/issues"},"description":"AST scanner and config generator for @a11y-gate/core","type":"commonjs","main":"dist/index.js","bin":{"a11y-gate":"dist/index.js"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit"},"dependencies":{"commander":"^12.1.0","ts-morph":"^23.0.0"},"devDependencies":{"@types/node":"^20.14.0","tsup":"^8.1.0","typescript":"^5.4.5"},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"_id":"@a11y-gate/cli@0.1.2","gitHead":"9644fe7557307991ea050faecd249639adc1d482","types":"./dist/index.d.ts","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-lJowUP00YxEEmVfeG5HI1Ubq1cAwIe6RmQ63T79pReO4UOI35HBZzlHaizq/ZYS7rsNuvW2ldFKvzrSHKowdvA==","shasum":"3660417c5c41a1bddc3e16c8598aa2b0f9bcbfaf","tarball":"https://registry.npmjs.org/@a11y-gate/cli/-/cli-0.1.2.tgz","fileCount":4,"unpackedSize":16544,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDNh20uX2Vh0uvqvAfMdgxK50HZpd3D34Q0CIQJwn5pIQIhAL/+SAjOR63uTrfdsBZCbH6cAw8Xv6/8GxUooEskiQ9a"}]},"_npmUser":{"name":"asanka-npm","email":"inbox2asanka@gmail.com"},"directories":{},"maintainers":[{"name":"asanka-npm","email":"inbox2asanka@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.2_1777820114826_0.3037009840225624"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-03T14:55:14.767Z","0.1.2":"2026-05-03T14:55:14.979Z","modified":"2026-05-03T14:55:15.160Z"},"maintainers":[{"name":"asanka-npm","email":"inbox2asanka@gmail.com"}],"description":"AST scanner and config generator for @a11y-gate/core","homepage":"https://github.com/asankagit/a11y-gate#readme","repository":{"type":"git","url":"git+https://github.com/asankagit/a11y-gate.git"},"bugs":{"url":"https://github.com/asankagit/a11y-gate/issues"},"readme":"# @a11y-gate/cli\n\nDev-time CLI that scans your React/Next.js project via AST and generates the\n`a11y-gate.config.json` consumed by `@a11y-gate/core`.\n\n## Install\n\n```bash\nnpm install --save-dev @a11y-gate/cli\n# or\npnpm add -D @a11y-gate/cli\n```\n\n## Commands\n\n### `a11y-gate scan`\n\nWalks your `src/` directory, identifies React components with typed props, and\noutputs `raw-metadata.json`.\n\n```bash\nnpx a11y-gate scan\n# or with options:\nnpx a11y-gate scan --src src --output raw-metadata.json\n```\n\n**Options:**\n\n| Flag | Default | Description |\n|---|---|---|\n| `-s, --src <dir>` | `src` | Source directory to scan |\n| `-o, --output <file>` | `raw-metadata.json` | Output path |\n\n**Output example (`raw-metadata.json`):**\n\n```json\n[\n  {\n    \"componentName\": \"LegacyDrawer\",\n    \"path\": \"src/components/layout/Drawer.tsx\",\n    \"props\": [\"isOpen\", \"title\", \"onClose\", \"width\"]\n  }\n]\n```\n\n### `a11y-gate review`\n\nInteractive prompt that annotates `raw-metadata.json` and writes\n`a11y-gate.config.json`. Re-running preserves existing values as defaults.\n\n```bash\nnpx a11y-gate review\n```\n\n**Options:**\n\n| Flag | Default | Description |\n|---|---|---|\n| `-i, --input <file>` | `raw-metadata.json` | Input metadata file |\n| `-o, --output <file>` | `a11y-gate.config.json` | Output config path |\n| `-e, --existing <file>` | *(auto-detected)* | Existing config for defaults |\n\n**Output example (`a11y-gate.config.json`):**\n\n```json\n{\n  \"version\": \"1\",\n  \"components\": [\n    {\n      \"componentName\": \"LegacyDrawer\",\n      \"componentType\": \"side-tray\",\n      \"triggerProp\": \"isOpen\",\n      \"closeHandler\": \"onClose\",\n      \"rootSelector\": \"#root\"\n    }\n  ]\n}\n```\n\n## Workflow\n\n```\nnpx a11y-gate scan       # 1. Extract component metadata\n# (optional) pipe raw-metadata.json through an LLM via your IDE to pre-fill intent\nnpx a11y-gate review     # 2. Annotate and approve → a11y-gate.config.json\n```\n\nThe CLI is LLM-agnostic. The `scan` output is structured for easy LLM processing,\nbut annotating manually via `review` works equally well.\n","readmeFilename":"README.md","_rev":"1-e29d0d6d7e222c336a09bf58b8e420ae"}