{"_id":"@aphrody/doc-ai","_rev":"4-8db7e6d8e8f9258cab6b13b049a8d95a","name":"@aphrody/doc-ai","dist-tags":{"latest":"3.2.5"},"versions":{"3.2.1":{"name":"@aphrody/doc-ai","version":"3.2.1","author":"aphrody-code","license":"Apache-2.0","_id":"@aphrody/doc-ai@3.2.1","maintainers":[{"name":"yohan971","email":"yohanpierre@live.fr"}],"homepage":"https://github.com/aphrody-code/material-web/tree/main/packages/doc-ai#readme","bugs":{"url":"https://github.com/aphrody-code/material-web/issues"},"bin":{"doc-ai":"src/cli.ts"},"dist":{"shasum":"54be96e0978c9617896a959ce28ce1aa1f147f1e","tarball":"https://registry.npmjs.org/@aphrody/doc-ai/-/doc-ai-3.2.1.tgz","fileCount":42,"integrity":"sha512-kvxtjHnPRTEoX81rNmaNBFjr6jzrztgHOhOieqHyJggwFupuV0rH09MWeq6aGAfkBZX17+/OrTogvX9HPK99PA==","signatures":[{"sig":"MEYCIQCKEKvlkZAzADgQegLLqnUzLCrvFf1pV26Z8YD4dBDBmwIhALtebF22y+Iz/TGMOuUFkOchZ1jMBvImCa+eQbptuPP1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":144319},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"54be96e0978c9617896a959ce28ce1aa1f147f1e","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","typecheck:fast":"tsgo -p tsconfig.json --noEmit"},"_npmUser":{"name":"yohan971","email":"yohanpierre@live.fr"},"_integrity":"sha512-kvxtjHnPRTEoX81rNmaNBFjr6jzrztgHOhOieqHyJggwFupuV0rH09MWeq6aGAfkBZX17+/OrTogvX9HPK99PA==","repository":{"url":"git+https://github.com/aphrody-code/material-web.git","type":"git","directory":"packages/doc-ai"},"_npmVersion":"10.8.3","description":"AI-first documentation and automatic translation system","directories":{},"_nodeVersion":"24.3.0","dependencies":{"ai":"^6.0.193","@ai-sdk/google":"^3.0.80"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.3.14","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/doc-ai_3.2.1_1780527352848_0.21828652506670898","host":"s3://npm-registry-packages-npm-production"}},"3.2.2":{"name":"@aphrody/doc-ai","version":"3.2.2","author":"aphrody-code","license":"Apache-2.0","_id":"@aphrody/doc-ai@3.2.2","maintainers":[{"name":"yohan971","email":"yohanpierre@live.fr"}],"homepage":"https://github.com/aphrody-code/material-web/tree/main/packages/doc-ai#readme","bugs":{"url":"https://github.com/aphrody-code/material-web/issues"},"bin":{"doc-ai":"src/cli.ts"},"dist":{"shasum":"58d4280134e3aa5c0965dbda2906661bb9d3a917","tarball":"https://registry.npmjs.org/@aphrody/doc-ai/-/doc-ai-3.2.2.tgz","fileCount":42,"integrity":"sha512-+OIQjBRFCZtTjS61a4M1ELyfZgEnE14WGIWbdhia6JLMgWJZ7s2DzrSPxIOwszIT7gwY8nkbJ/N5I1z8GvIx0g==","signatures":[{"sig":"MEYCIQDOubQdaiRE7ETNjgQyi5SllCpabpUCgMv0E8noQZwi5gIhAKKL0+wmF5XfSz30ZVNmbAPqf9h7QcCgAU1LLFkJwYxc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":144319},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"58d4280134e3aa5c0965dbda2906661bb9d3a917","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","typecheck:fast":"tsgo -p tsconfig.json --noEmit"},"_npmUser":{"name":"yohan971","email":"yohanpierre@live.fr"},"_integrity":"sha512-+OIQjBRFCZtTjS61a4M1ELyfZgEnE14WGIWbdhia6JLMgWJZ7s2DzrSPxIOwszIT7gwY8nkbJ/N5I1z8GvIx0g==","repository":{"url":"git+https://github.com/aphrody-code/material-web.git","type":"git","directory":"packages/doc-ai"},"_npmVersion":"10.8.3","description":"AI-first documentation and automatic translation system","directories":{},"_nodeVersion":"24.3.0","dependencies":{"ai":"^6.0.193","@ai-sdk/google":"^3.0.80"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.3.14","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/doc-ai_3.2.2_1780528057141_0.006718048113513397","host":"s3://npm-registry-packages-npm-production"}},"3.2.4":{"name":"@aphrody/doc-ai","version":"3.2.4","author":"aphrody-code","license":"Apache-2.0","_id":"@aphrody/doc-ai@3.2.4","maintainers":[{"name":"yohan971","email":"yohanpierre@live.fr"}],"homepage":"https://github.com/aphrody-code/material-web/tree/main/packages/doc-ai#readme","bugs":{"url":"https://github.com/aphrody-code/material-web/issues"},"bin":{"doc-ai":"src/cli.ts"},"dist":{"shasum":"95946bde22d03951a2c387ee70b0579f61249b78","tarball":"https://registry.npmjs.org/@aphrody/doc-ai/-/doc-ai-3.2.4.tgz","fileCount":42,"integrity":"sha512-FUpH2jpopVhIuIdaLlLvljIuCDVSZGahng5NdzumZ1zkBvyrDg1Pp+w6Opx9DPZOFGBBdjIjtrSEqoGHcucQow==","signatures":[{"sig":"MEQCIBLcq9wgwHyECtCak2u1/ArvzAzpGbyiOBHDDffdX2++AiBiJb0AR4gqA4tpTfnZW6bGvbiC7dn9qBkydK0HkyK3vA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":144319},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","shasum":"95946bde22d03951a2c387ee70b0579f61249b78","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","typecheck:fast":"tsgo -p tsconfig.json --noEmit"},"_npmUser":{"name":"yohan971","email":"yohanpierre@live.fr"},"_integrity":"sha512-FUpH2jpopVhIuIdaLlLvljIuCDVSZGahng5NdzumZ1zkBvyrDg1Pp+w6Opx9DPZOFGBBdjIjtrSEqoGHcucQow==","repository":{"url":"git+https://github.com/aphrody-code/material-web.git","type":"git","directory":"packages/doc-ai"},"_npmVersion":"10.8.3","description":"AI-first documentation and automatic translation system","directories":{},"_nodeVersion":"24.3.0","dependencies":{"ai":"^6.0.193","@ai-sdk/google":"^3.0.80"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.3.14","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/doc-ai_3.2.4_1786525664455_0.46183524391939224","host":"s3://npm-registry-packages-npm-production"}},"3.2.5":{"name":"@aphrody/doc-ai","version":"3.2.5","description":"AI-first documentation and automatic translation system","homepage":"https://github.com/aphrody-code/material-web/tree/main/packages/doc-ai#readme","bugs":{"url":"https://github.com/aphrody-code/material-web/issues"},"license":"Apache-2.0","author":{"name":"aphrody-code"},"repository":{"type":"git","url":"git+https://github.com/aphrody-code/material-web.git","directory":"packages/doc-ai"},"bin":{"doc-ai":"src/cli.ts"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","typecheck:fast":"tsgo -p tsconfig.json --noEmit","test":"bun test"},"dependencies":{"@ai-sdk/google":"catalog:","ai":"catalog:"},"devDependencies":{"@types/node":"catalog:","bun-types":"catalog:","typescript":"catalog:"},"gitHead":"6981e124848acb9ce5364d87af955fd5fe992e23","_id":"@aphrody/doc-ai@3.2.5","_nodeVersion":"24.3.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-Ec2kxH4770JwVTwezoowFv131BpL4MR1cFRJiEB69oVKF4gEQMqWt30epZbtlCW30/d24xnJEM1Ec16JGbXHqg==","shasum":"822e9b00439f5da1fe1786107a0c78e694b1817f","tarball":"https://registry.npmjs.org/@aphrody/doc-ai/-/doc-ai-3.2.5.tgz","fileCount":10,"unpackedSize":47509,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCOIqAc0sqy4+1HSYx9aWk2/AaJCH47/TNtEomXskLySwIhALGF2wpXQsLFZcQT5JJKGl+VsQWEPPKJ0GSMvj39hwu4"}]},"_npmUser":{"name":"yohan971","email":"yohanpierre@live.fr"},"directories":{},"maintainers":[{"name":"yohan971","email":"yohanpierre@live.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/doc-ai_3.2.5_1789022193189_0.2745625008304293"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-03T22:55:52.574Z","modified":"2026-09-10T06:36:33.531Z","3.2.1":"2026-06-03T22:55:52.981Z","3.2.2":"2026-06-03T23:07:37.335Z","3.2.4":"2026-08-12T09:07:44.596Z","3.2.5":"2026-09-10T06:36:33.321Z"},"bugs":{"url":"https://github.com/aphrody-code/material-web/issues"},"author":{"name":"aphrody-code"},"license":"Apache-2.0","homepage":"https://github.com/aphrody-code/material-web/tree/main/packages/doc-ai#readme","repository":{"type":"git","url":"git+https://github.com/aphrody-code/material-web.git","directory":"packages/doc-ai"},"description":"AI-first documentation and automatic translation system","maintainers":[{"name":"yohan971","email":"yohanpierre@live.fr"}],"readme":"<!-- SPDX-License-Identifier: Apache-2.0 -->\n\n# @aphrody/doc-ai\n\nAI-first documentation and automatic translation CLI for the material-web M3\nmonorepo. It translates Markdown, generates Lit component API guides, and\nbulk-syncs every `docs/` folder — backed by **Google Gemini** through the\nVercel AI SDK (`@ai-sdk/google` + `ai`), with a deterministic static fallback\nwhen no credentials are set.\n\n## Commands\n\n```bash\ndoc-ai translate <file_or_dir> [lang]   # translate one .md file or a dir (recursive)\ndoc-ai generate <ts_file> [out_file]    # generate a Lit component API guide\ndoc-ai sync [lang]                      # translate every monorepo docs/ folder\ndoc-ai --help                           # full usage\n```\n\nFrom the monorepo root, the wrapper scripts are wired in:\n\n```bash\nbun run docs:translate <file_or_dir> [lang]   # packages/doc-ai/src/cli.ts translate\nbun run docs:ai                               # packages/doc-ai/src/cli.ts sync\n```\n\nTranslations are written next to each source as `<name>.<lang>.md` (default\nlanguage `fr`).\n\n## Configuration\n\n| Env var                              | Effect                                           |\n| ------------------------------------ | ------------------------------------------------ |\n| `GEMINI_API_KEY` \\| `GOOGLE_API_KEY` | Enable Gemini-backed generation/translation.     |\n| `DOC_AI_MODEL`                       | Override the model (default `gemini-2.5-flash`). |\n| `DOC_AI_GEMINI_BASE_URL`             | Override the Generative Language API base URL.   |\n| `DOC_AI_REQUEST_TIMEOUT_MS`          | Per-request network timeout (default `60000`).   |\n\nWithout credentials, `generate`/`translate` fall back to a deterministic static\ntemplate so the pipeline stays runnable offline and in CI.\n\n## Develop\n\n```bash\nbun run build        # tsc -> dist\nbun run typecheck    # tsc --noEmit (typecheck:fast = tsgo)\nbun run test         # bun test\n```\n","readmeFilename":"README.md"}