{"_id":"@asanka-npm/a11y-gate-cli","_rev":"2-3187c84e9df7c4ceac15bafafa74b74f","name":"@asanka-npm/a11y-gate-cli","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.2":{"name":"@asanka-npm/a11y-gate-cli","version":"0.1.2","_id":"@asanka-npm/a11y-gate-cli@0.1.2","maintainers":[{"name":"asanka-npm","email":"inbox2asanka@gmail.com"}],"homepage":"https://github.com/asankagit/a11y-gate#readme","bugs":{"url":"https://github.com/asankagit/a11y-gate/issues"},"bin":{"a11y-gate":"dist/index.js"},"dist":{"shasum":"31fc706fe14fb9fb935b0690e33f6b6301b50545","tarball":"https://registry.npmjs.org/@asanka-npm/a11y-gate-cli/-/a11y-gate-cli-0.1.2.tgz","fileCount":4,"integrity":"sha512-MWyWqOkec1kv4zSXdWcmx9L+Z57cSkHPtrt+GP+XUPtj2Ivb8gt6YFXal5lpR6wi2lqG9K+R2S1qGsvWv906MA==","signatures":[{"sig":"MEUCIH50nubyQs7fiEH5sCE05AQq2UajaGQjS2/K6Aqe7UhxAiEAzUy+sy3xnohW7XDjCTAuqqodFVmz8XThBtjOt0UAg4A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16555},"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"99092ad45e693c98fe546ddd3f15039f3facfa96","scripts":{"dev":"tsup --watch","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"asanka-npm","email":"inbox2asanka@gmail.com"},"repository":{"url":"git+https://github.com/asankagit/a11y-gate.git","type":"git"},"_npmVersion":"10.9.3","description":"AST scanner and config generator for @a11y-gate/core","directories":{},"_nodeVersion":"22.20.0","dependencies":{"ts-morph":"^23.0.0","commander":"^12.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.1.0","typescript":"^5.4.5","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/a11y-gate-cli_0.1.2_1777816825054_0.002709932373943902","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Moved to @a11y-gate/cli"}},"time":{"created":"2026-05-03T14:00:25.003Z","modified":"2026-05-03T15:02:00.886Z","0.1.2":"2026-05-03T14:00:25.303Z"},"bugs":{"url":"https://github.com/asankagit/a11y-gate/issues"},"homepage":"https://github.com/asankagit/a11y-gate#readme","repository":{"url":"git+https://github.com/asankagit/a11y-gate.git","type":"git"},"description":"AST scanner and config generator for @a11y-gate/core","maintainers":[{"name":"asanka-npm","email":"inbox2asanka@gmail.com"}],"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"}