@hasna/skills 0.1.26 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. package/LICENSE +1 -10
  2. package/README.md +141 -39
  3. package/bin/index.js +30122 -27575
  4. package/bin/mcp.js +22112 -18593
  5. package/dist/cli/cli.test-utils.d.ts +15 -0
  6. package/dist/cli/commands/auth.d.ts +2 -0
  7. package/dist/cli/commands/install.d.ts +1 -1
  8. package/dist/cli/commands/runtime-mcp.d.ts +4 -0
  9. package/dist/index.d.ts +9 -4
  10. package/dist/index.js +11607 -597
  11. package/dist/lib/auth-store.d.ts +13 -0
  12. package/dist/lib/installer.d.ts +58 -55
  13. package/dist/lib/mcp-contracts.d.ts +86 -0
  14. package/dist/lib/project-state.d.ts +43 -0
  15. package/dist/lib/registry-data/business-marketing.d.ts +2 -0
  16. package/dist/lib/registry-data/communication.d.ts +2 -0
  17. package/dist/lib/registry-data/content-generation.d.ts +2 -0
  18. package/dist/lib/registry-data/data-analysis.d.ts +2 -0
  19. package/dist/lib/registry-data/design-branding.d.ts +2 -0
  20. package/dist/lib/registry-data/development-tools.d.ts +2 -0
  21. package/dist/lib/registry-data/education-learning.d.ts +2 -0
  22. package/dist/lib/registry-data/event-management.d.ts +2 -0
  23. package/dist/lib/registry-data/finance-compliance.d.ts +2 -0
  24. package/dist/lib/registry-data/health-wellness.d.ts +2 -0
  25. package/dist/lib/registry-data/index.d.ts +2 -0
  26. package/dist/lib/registry-data/media-processing.d.ts +2 -0
  27. package/dist/lib/registry-data/productivity-organization.d.ts +2 -0
  28. package/dist/lib/registry-data/project-management.d.ts +2 -0
  29. package/dist/lib/registry-data/research-writing.d.ts +2 -0
  30. package/dist/lib/registry-data/science-academic.d.ts +2 -0
  31. package/dist/lib/registry-data/travel-lifestyle.d.ts +2 -0
  32. package/dist/lib/registry-data/web-browser.d.ts +2 -0
  33. package/dist/lib/registry-types.d.ts +27 -0
  34. package/dist/lib/registry.d.ts +6 -18
  35. package/dist/lib/remote-registry.d.ts +3 -0
  36. package/dist/lib/run-state.d.ts +60 -0
  37. package/dist/lib/skill-aliases.d.ts +17 -0
  38. package/dist/lib/skillinfo.d.ts +5 -1
  39. package/dist/mcp/discovery-tools.d.ts +2 -0
  40. package/dist/mcp/helpers.d.ts +26 -0
  41. package/dist/mcp/http.d.ts +10 -0
  42. package/dist/mcp/index.d.ts +3 -2
  43. package/dist/mcp/operation-tools.d.ts +2 -0
  44. package/dist/mcp/resource-meta-tools.d.ts +2 -0
  45. package/dist/mcp/schedule-tools.d.ts +2 -0
  46. package/dist/mcp/server.d.ts +4 -0
  47. package/dist/types/api.d.ts +7 -4
  48. package/package.json +23 -10
  49. package/skills/_common/http-client.ts +1 -1
  50. package/skills/_common/index.ts +2 -3
  51. package/skills/_common/install.sh +5 -110
  52. package/skills/_common/installer.ts +31 -282
  53. package/skills/_common/skill-install.ts +14 -181
  54. package/skills/ad-creative-pack/SKILL.md +45 -0
  55. package/skills/ad-creative-pack/package.json +14 -0
  56. package/skills/advanced-math/package.json +3 -1
  57. package/skills/advanced-math/src/calculators.ts +118 -0
  58. package/skills/advanced-math/src/cli.ts +130 -0
  59. package/skills/advanced-math/src/conversion.ts +90 -0
  60. package/skills/advanced-math/src/finance.ts +75 -0
  61. package/skills/advanced-math/src/formatting.ts +95 -0
  62. package/skills/advanced-math/src/index.ts +24 -702
  63. package/skills/advanced-math/src/runtime.ts +49 -0
  64. package/skills/advanced-math/src/symbolic.ts +110 -0
  65. package/skills/advanced-math/src/types.ts +36 -0
  66. package/skills/analyze-data/SKILL.md +2 -2
  67. package/skills/analyze-data/src/analysis.ts +401 -0
  68. package/skills/analyze-data/src/cli.ts +66 -0
  69. package/skills/analyze-data/src/formatters.ts +235 -0
  70. package/skills/analyze-data/src/index.ts +6 -1027
  71. package/skills/analyze-data/src/logger.ts +36 -0
  72. package/skills/analyze-data/src/parsers.ts +57 -0
  73. package/skills/analyze-data/src/stats.ts +151 -0
  74. package/skills/analyze-data/src/types.ts +85 -0
  75. package/skills/api-docs-portal/SKILL.md +46 -0
  76. package/skills/api-docs-portal/package.json +9 -0
  77. package/skills/api-test-suite/src/index.ts +13 -0
  78. package/skills/apidocs/package.json +1 -1
  79. package/skills/apidocs/src/index.ts +3 -0
  80. package/skills/audio/package.json +2 -3
  81. package/skills/audio-cleanup-lab/SKILL.md +2 -2
  82. package/skills/audio-extract/CLAUDE.md +1 -1
  83. package/skills/audio-transcript-pack/SKILL.md +43 -0
  84. package/skills/audio-transcript-pack/package.json +10 -0
  85. package/skills/blog-article/CLAUDE.md +12 -0
  86. package/skills/blog-article/SKILL.md +45 -0
  87. package/skills/{create-blog-article → blog-article}/package.json +3 -3
  88. package/skills/brand-kit/SKILL.md +45 -0
  89. package/skills/brand-kit/package.json +14 -0
  90. package/skills/brand-photo-shoot/SKILL.md +28 -0
  91. package/skills/brand-photo-shoot/package.json +10 -0
  92. package/skills/brand-style-guide/SKILL.md +2 -2
  93. package/skills/brand-style-guide/src/index.ts +0 -0
  94. package/skills/budget-variance-analyzer/SKILL.md +2 -2
  95. package/skills/businessactivity/package.json +1 -1
  96. package/skills/businessactivity/src/index.ts +3 -0
  97. package/skills/calendar-events/src/ai-parser.ts +103 -0
  98. package/skills/calendar-events/src/api.ts +157 -0
  99. package/skills/calendar-events/src/auth.ts +22 -0
  100. package/skills/calendar-events/src/config.ts +6 -0
  101. package/skills/calendar-events/src/format.ts +96 -0
  102. package/skills/calendar-events/src/help.ts +54 -0
  103. package/skills/calendar-events/src/index.ts +21 -524
  104. package/skills/calendar-events/src/logger.ts +34 -0
  105. package/skills/calendar-events/src/types.ts +67 -0
  106. package/skills/compress-video/SKILL.md +2 -2
  107. package/skills/consolelog/package.json +1 -1
  108. package/skills/consolelog/src/index.ts +3 -0
  109. package/skills/contract-review-report/SKILL.md +43 -0
  110. package/skills/contract-review-report/package.json +10 -0
  111. package/skills/convert/SKILL.md +2 -3
  112. package/skills/customer-feedback-report/SKILL.md +44 -0
  113. package/skills/customer-feedback-report/package.json +10 -0
  114. package/skills/dashboard-builder/package.json +3 -1
  115. package/skills/database-explorer/package.json +3 -1
  116. package/skills/deepresearch/README.md +4 -13
  117. package/skills/deploy/src/http-client.ts +1 -1
  118. package/skills/diff-viewer/package.json +4 -1
  119. package/skills/doc-generate/package.json +0 -1
  120. package/skills/doc-generate/src/ai.ts +50 -0
  121. package/skills/doc-generate/src/cli.ts +203 -0
  122. package/skills/doc-generate/src/dependencies.ts +44 -0
  123. package/skills/doc-generate/src/document-builder.ts +299 -0
  124. package/skills/doc-generate/src/index.ts +40 -764
  125. package/skills/doc-generate/src/markdown-parser.ts +125 -0
  126. package/skills/doc-generate/src/types.ts +68 -0
  127. package/skills/domainpurchase/SKILL.md +1 -1
  128. package/skills/domainpurchase/package.json +1 -1
  129. package/skills/domainpurchase/src/index.ts +3 -0
  130. package/skills/domainsearch/SKILL.md +1 -1
  131. package/skills/domainsearch/package.json +1 -1
  132. package/skills/domainsearch/src/index.ts +3 -0
  133. package/skills/email-sequence/SKILL.md +44 -0
  134. package/skills/email-sequence/package.json +14 -0
  135. package/skills/excel/CLAUDE.md +2 -2
  136. package/skills/experiment-power-calculator/package.json +3 -1
  137. package/skills/extract-invoice/src/cli.ts +97 -0
  138. package/skills/extract-invoice/src/extractor.ts +170 -0
  139. package/skills/extract-invoice/src/file-utils.ts +46 -0
  140. package/skills/extract-invoice/src/formatters.ts +144 -0
  141. package/skills/extract-invoice/src/index.ts +44 -629
  142. package/skills/extract-invoice/src/runtime.ts +46 -0
  143. package/skills/extract-invoice/src/types.ts +88 -0
  144. package/skills/folder-tree/package.json +3 -1
  145. package/skills/form-filler/package.json +3 -1
  146. package/skills/generate-api-client/package.json +3 -1
  147. package/skills/generate-api-client/src/generator.ts +47 -0
  148. package/skills/generate-api-client/src/index.ts +3 -777
  149. package/skills/generate-api-client/src/logger.ts +34 -0
  150. package/skills/generate-api-client/src/python-generator.ts +245 -0
  151. package/skills/generate-api-client/src/spec-loader.ts +48 -0
  152. package/skills/generate-api-client/src/type-mappers.ts +79 -0
  153. package/skills/generate-api-client/src/types.ts +76 -0
  154. package/skills/generate-api-client/src/typescript-generator.ts +247 -0
  155. package/skills/generate-book-cover/package.json +3 -1
  156. package/skills/generate-dockerfile/src/cli.ts +78 -0
  157. package/skills/generate-dockerfile/src/dockerfile-templates.ts +392 -0
  158. package/skills/generate-dockerfile/src/index.ts +12 -790
  159. package/skills/generate-dockerfile/src/logger.ts +30 -0
  160. package/skills/generate-dockerfile/src/project-detection.ts +68 -0
  161. package/skills/generate-dockerfile/src/support-files.ts +171 -0
  162. package/skills/generate-dockerfile/src/types.ts +29 -0
  163. package/skills/generate-documentation/src/ai.ts +131 -0
  164. package/skills/generate-documentation/src/cli.ts +71 -0
  165. package/skills/generate-documentation/src/code-parser.ts +300 -0
  166. package/skills/generate-documentation/src/file-processing.ts +182 -0
  167. package/skills/generate-documentation/src/index.ts +13 -753
  168. package/skills/generate-documentation/src/runtime.ts +35 -0
  169. package/skills/generate-documentation/src/types.ts +30 -0
  170. package/skills/generate-env/package.json +3 -1
  171. package/skills/generate-env/src/cli.ts +85 -0
  172. package/skills/generate-env/src/detection.ts +161 -0
  173. package/skills/generate-env/src/env-data.ts +66 -0
  174. package/skills/generate-env/src/generators.ts +240 -0
  175. package/skills/generate-env/src/index.ts +76 -676
  176. package/skills/generate-env/src/runtime.ts +30 -0
  177. package/skills/generate-env/src/types.ts +32 -0
  178. package/skills/generate-favicon/package.json +3 -1
  179. package/skills/generate-mock-data/package.json +3 -1
  180. package/skills/generate-mock-data/src/ai.ts +102 -0
  181. package/skills/generate-mock-data/src/formatters.ts +84 -0
  182. package/skills/generate-mock-data/src/generator.ts +377 -0
  183. package/skills/generate-mock-data/src/index.ts +15 -716
  184. package/skills/generate-mock-data/src/logger.ts +37 -0
  185. package/skills/generate-mock-data/src/presets.ts +110 -0
  186. package/skills/generate-mock-data/src/types.ts +21 -0
  187. package/skills/generate-pr-description/src/ai.ts +144 -0
  188. package/skills/generate-pr-description/src/cli.ts +80 -0
  189. package/skills/generate-pr-description/src/clipboard.ts +30 -0
  190. package/skills/generate-pr-description/src/formatters.ts +231 -0
  191. package/skills/generate-pr-description/src/git.ts +153 -0
  192. package/skills/generate-pr-description/src/index.ts +21 -714
  193. package/skills/generate-pr-description/src/types.ts +49 -0
  194. package/skills/generate-presentation/src/ai-clients.ts +61 -0
  195. package/skills/generate-presentation/src/cli.ts +126 -0
  196. package/skills/generate-presentation/src/index.ts +3 -751
  197. package/skills/generate-presentation/src/logger.ts +67 -0
  198. package/skills/generate-presentation/src/presentation-generator.ts +425 -0
  199. package/skills/generate-presentation/src/runtime.ts +6 -0
  200. package/skills/generate-presentation/src/security.ts +12 -0
  201. package/skills/generate-presentation/src/types.ts +28 -0
  202. package/skills/generate-qrcode/package.json +4 -1
  203. package/skills/generate-regex/package.json +3 -1
  204. package/skills/generate-resume/src/cli.ts +157 -0
  205. package/skills/generate-resume/src/index.ts +13 -917
  206. package/skills/generate-resume/src/parsers.ts +95 -0
  207. package/skills/generate-resume/src/renderers.ts +538 -0
  208. package/skills/generate-resume/src/security.ts +39 -0
  209. package/skills/generate-resume/src/types.ts +86 -0
  210. package/skills/generate-social-posts/src/ai.ts +88 -0
  211. package/skills/generate-social-posts/src/cli.ts +118 -0
  212. package/skills/generate-social-posts/src/exporters.ts +126 -0
  213. package/skills/generate-social-posts/src/generator.ts +130 -0
  214. package/skills/generate-social-posts/src/index.ts +19 -709
  215. package/skills/generate-social-posts/src/platforms.ts +39 -0
  216. package/skills/generate-social-posts/src/runtime.ts +34 -0
  217. package/skills/generate-social-posts/src/source.ts +116 -0
  218. package/skills/generate-social-posts/src/types.ts +58 -0
  219. package/skills/gif-maker/package.json +4 -1
  220. package/skills/github-manager/package.json +3 -1
  221. package/skills/gmail/CLAUDE.md +1 -1
  222. package/skills/highlight-reel-generator/src/index.ts +19 -0
  223. package/skills/hook/src/commands/create.ts +20 -845
  224. package/skills/hook/src/templates/root.ts +196 -0
  225. package/skills/hook/src/templates/source.ts +647 -0
  226. package/skills/http-server/package.json +3 -1
  227. package/skills/icon-pack/README.md +28 -0
  228. package/skills/icon-pack/SKILL.md +23 -0
  229. package/skills/icon-pack/package.json +29 -0
  230. package/skills/{audio → icon-pack}/tsconfig.json +10 -12
  231. package/skills/image/package.json +1 -2
  232. package/skills/implementation-agent/package.json +3 -1
  233. package/skills/implementation-agent/src/ai-generation.ts +225 -0
  234. package/skills/implementation-agent/src/index.ts +3 -960
  235. package/skills/implementation-agent/src/minimist.d.ts +15 -0
  236. package/skills/implementation-agent/src/templates.ts +686 -0
  237. package/skills/implementation-agent/src/types.ts +53 -0
  238. package/skills/implementation-plan/package.json +3 -1
  239. package/skills/implementation-todo/package.json +3 -1
  240. package/skills/invoice/package.json +1 -1
  241. package/skills/invoice/src/index.ts +3 -0
  242. package/skills/invoice-reconciliation/SKILL.md +42 -0
  243. package/skills/invoice-reconciliation/package.json +10 -0
  244. package/skills/landing-page-pack/SKILL.md +47 -0
  245. package/skills/landing-page-pack/package.json +14 -0
  246. package/skills/latex-table-generator/package.json +3 -1
  247. package/skills/logo-design/SKILL.md +25 -44
  248. package/skills/logo-design/package.json +3 -15
  249. package/skills/lorem-generator/package.json +3 -1
  250. package/skills/lorem-generator/src/index.ts +13 -0
  251. package/skills/managehook/package.json +1 -1
  252. package/skills/managehook/src/index.ts +3 -0
  253. package/skills/managemcp/package.json +1 -1
  254. package/skills/managemcp/src/index.ts +3 -0
  255. package/skills/manageskill/package.json +1 -1
  256. package/skills/manageskill/src/index.ts +3 -0
  257. package/skills/markdown-validator/package.json +3 -1
  258. package/skills/markdown-validator/src/index.ts +1 -4
  259. package/skills/market-research-report/SKILL.md +41 -0
  260. package/skills/market-research-report/package.json +10 -0
  261. package/skills/mcp-builder/package.json +4 -1
  262. package/skills/mcp-builder/src/ai-descriptions.ts +37 -0
  263. package/skills/mcp-builder/src/generators.ts +513 -0
  264. package/skills/mcp-builder/src/index.ts +7 -908
  265. package/skills/mcp-builder/src/minimist.d.ts +15 -0
  266. package/skills/mcp-builder/src/naming.ts +12 -0
  267. package/skills/mcp-builder/src/options.ts +170 -0
  268. package/skills/mcp-builder/src/templates.ts +149 -0
  269. package/skills/mcp-builder/src/types.ts +42 -0
  270. package/skills/meeting-pack/SKILL.md +43 -0
  271. package/skills/meeting-pack/package.json +10 -0
  272. package/skills/merge-pdfs/package.json +5 -1
  273. package/skills/migration-plan-pack/SKILL.md +45 -0
  274. package/skills/migration-plan-pack/package.json +10 -0
  275. package/skills/music/package.json +2 -3
  276. package/skills/music-album/SKILL.md +37 -0
  277. package/skills/music-album/package.json +10 -0
  278. package/skills/notion-manager/package.json +3 -1
  279. package/skills/npmpublish/CLAUDE.md +5 -8
  280. package/skills/npmpublish/README.md +5 -26
  281. package/skills/npmpublish/src/index.ts +9 -147
  282. package/skills/one-page-website/SKILL.md +46 -0
  283. package/skills/one-page-website/package.json +10 -0
  284. package/skills/one-page-website/tsconfig.json +8 -0
  285. package/skills/pdf-generate/src/cli.ts +162 -0
  286. package/skills/pdf-generate/src/html.ts +84 -0
  287. package/skills/pdf-generate/src/index.ts +11 -800
  288. package/skills/pdf-generate/src/markdown.ts +27 -0
  289. package/skills/pdf-generate/src/pdf-writer.ts +78 -0
  290. package/skills/pdf-generate/src/runtime.ts +34 -0
  291. package/skills/pdf-generate/src/security.ts +37 -0
  292. package/skills/pdf-generate/src/templates.ts +311 -0
  293. package/skills/pdf-generate/src/types.ts +28 -0
  294. package/skills/pdf-read/SKILL.md +10 -10
  295. package/skills/pdf-to-dataset/SKILL.md +45 -0
  296. package/skills/pdf-to-dataset/package.json +10 -0
  297. package/skills/pdf-to-markdown/SKILL.md +49 -0
  298. package/skills/pdf-to-markdown/package.json +10 -0
  299. package/skills/pdf-to-markdown/tsconfig.json +10 -0
  300. package/skills/performance-audit-report/SKILL.md +42 -0
  301. package/skills/performance-audit-report/package.json +10 -0
  302. package/skills/persona-based-adwriter/src/index.ts +19 -0
  303. package/skills/photo-album/SKILL.md +29 -0
  304. package/skills/photo-album/package.json +9 -0
  305. package/skills/photo-album/tsconfig.json +4 -0
  306. package/skills/pitch-deck/SKILL.md +43 -0
  307. package/skills/pitch-deck/package.json +9 -0
  308. package/skills/playlist-maker/SKILL.md +33 -0
  309. package/skills/playlist-maker/package.json +9 -0
  310. package/skills/playlist-maker/tsconfig.json +4 -0
  311. package/skills/product-mockup/SKILL.md +45 -0
  312. package/skills/product-mockup/package.json +3 -20
  313. package/skills/product-mockup/tsconfig.json +3 -5
  314. package/skills/project-retro-companion/src/index.ts +19 -0
  315. package/skills/proposal-pack/SKILL.md +45 -0
  316. package/skills/proposal-pack/package.json +10 -0
  317. package/skills/read-pdf/SKILL.md +5 -4
  318. package/skills/repo-onboarding-report/SKILL.md +42 -0
  319. package/skills/repo-onboarding-report/package.json +10 -0
  320. package/skills/sales-call-recapper/src/index.ts +20 -0
  321. package/skills/salescopy/package.json +1 -1
  322. package/skills/salescopy/src/index.ts +3 -0
  323. package/skills/scaffold-project/src/ai-detect.ts +136 -0
  324. package/skills/scaffold-project/src/file-generators.ts +292 -0
  325. package/skills/scaffold-project/src/index.ts +8 -991
  326. package/skills/scaffold-project/src/project-config.ts +338 -0
  327. package/skills/scaffold-project/src/templates.ts +173 -0
  328. package/skills/scaffold-project/src/types.ts +58 -0
  329. package/skills/scientific-figure-check/package.json +3 -1
  330. package/skills/sdk-generator/SKILL.md +45 -0
  331. package/skills/sdk-generator/package.json +10 -0
  332. package/skills/sdk-generator/tsconfig.json +8 -0
  333. package/skills/security-audit/src/index.ts +25 -6
  334. package/skills/security-audit-report/SKILL.md +40 -0
  335. package/skills/security-audit-report/package.json +10 -0
  336. package/skills/seo-content-pack/SKILL.md +44 -0
  337. package/skills/seo-content-pack/package.json +9 -0
  338. package/skills/short-video-pack/SKILL.md +30 -0
  339. package/skills/short-video-pack/package.json +10 -0
  340. package/skills/slack-assistant/package.json +3 -1
  341. package/skills/slide-deck-generator/SKILL.md +44 -0
  342. package/skills/slide-deck-generator/package.json +10 -0
  343. package/skills/sms/package.json +1 -1
  344. package/skills/sms/src/index.ts +15 -0
  345. package/skills/social-content-calendar/SKILL.md +45 -0
  346. package/skills/social-content-calendar/package.json +14 -0
  347. package/skills/split-pdf/package.json +4 -1
  348. package/skills/subtitle/package.json +2 -1
  349. package/skills/subtitle/src/index.ts +3 -0
  350. package/skills/terraform-generator/package.json +3 -1
  351. package/skills/test-suite-generator/SKILL.md +41 -0
  352. package/skills/test-suite-generator/package.json +10 -0
  353. package/skills/timesheet/package.json +1 -1
  354. package/skills/timesheet/src/index.ts +3 -0
  355. package/skills/transcript/SKILL.md +1 -8
  356. package/skills/validate-config/package.json +3 -1
  357. package/skills/video/package.json +6 -4
  358. package/skills/video-downloader/package.json +3 -1
  359. package/skills/video-highlight-pack/SKILL.md +44 -0
  360. package/skills/video-highlight-pack/package.json +10 -0
  361. package/skills/voiceover-jingle-pack/SKILL.md +28 -0
  362. package/skills/voiceover-jingle-pack/package.json +10 -0
  363. package/skills/watermark/package.json +6 -1
  364. package/skills/webcrawling/package.json +2 -1
  365. package/skills/write/SKILL.md +6 -6
  366. package/dist/server/serve.d.ts +0 -11
  367. package/skills/apidocs/.claude/settings.json +0 -5
  368. package/skills/audio/.env.example +0 -14
  369. package/skills/audio/QUICKSTART.md +0 -158
  370. package/skills/audio/README.md +0 -256
  371. package/skills/audio/src/index-local.ts +0 -206
  372. package/skills/audio/src/index.ts +0 -95
  373. package/skills/audio/src/providers/elevenlabs.ts +0 -115
  374. package/skills/audio/src/providers/google.ts +0 -116
  375. package/skills/audio/src/providers/minimax.ts +0 -83
  376. package/skills/audio/src/providers/openai.ts +0 -115
  377. package/skills/audio/src/types.ts +0 -79
  378. package/skills/audiobook-chapter-proofer/CLAUDE.md +0 -19
  379. package/skills/audiobook-chapter-proofer/package.json +0 -27
  380. package/skills/audiobook-chapter-proofer/src/index.ts +0 -285
  381. package/skills/browse/src/client.ts +0 -373
  382. package/skills/browse/src/index-local.ts +0 -430
  383. package/skills/browse/src/index.ts +0 -110
  384. package/skills/browse/src/sse-server.ts +0 -919
  385. package/skills/browse/src/types.ts +0 -104
  386. package/skills/consolelog/src/server/index.ts +0 -508
  387. package/skills/create-blog-article/CLAUDE.md +0 -19
  388. package/skills/create-blog-article/src/index.ts +0 -745
  389. package/skills/create-blog-article/tsconfig.json +0 -10
  390. package/skills/deepresearch/src/agents/query-generator.ts +0 -91
  391. package/skills/deepresearch/src/agents/synthesizer.ts +0 -111
  392. package/skills/deepresearch/src/index.ts +0 -224
  393. package/skills/deepresearch/src/research.ts +0 -166
  394. package/skills/deepresearch/src/services/anthropic.ts +0 -69
  395. package/skills/deepresearch/src/services/exa.ts +0 -108
  396. package/skills/deepresearch/src/services/firecrawl.ts +0 -88
  397. package/skills/deepresearch/src/services/openai.ts +0 -81
  398. package/skills/deepresearch/src/types.ts +0 -76
  399. package/skills/deepresearch/src/utils/file.ts +0 -111
  400. package/skills/deepresearch/src/utils/logger.ts +0 -84
  401. package/skills/domainpurchase/src/server/index.ts +0 -332
  402. package/skills/domainsearch/src/server/index.ts +0 -229
  403. package/skills/e2bswarm/README.md +0 -135
  404. package/skills/e2bswarm/SKILL.md +0 -118
  405. package/skills/e2bswarm/examples/tasks-example.json +0 -38
  406. package/skills/e2bswarm/package.json +0 -59
  407. package/skills/e2bswarm/src/commands/collect.ts +0 -135
  408. package/skills/e2bswarm/src/commands/install.ts +0 -164
  409. package/skills/e2bswarm/src/commands/kill.ts +0 -62
  410. package/skills/e2bswarm/src/commands/spawn.ts +0 -134
  411. package/skills/e2bswarm/src/commands/status.ts +0 -90
  412. package/skills/e2bswarm/src/commands/sync.ts +0 -208
  413. package/skills/e2bswarm/src/index.ts +0 -121
  414. package/skills/e2bswarm/src/lib/config.ts +0 -75
  415. package/skills/e2bswarm/src/lib/e2b.ts +0 -490
  416. package/skills/e2bswarm/src/lib/github.ts +0 -253
  417. package/skills/e2bswarm/src/lib/logger.ts +0 -41
  418. package/skills/e2bswarm/src/lib/paths.ts +0 -75
  419. package/skills/e2bswarm/src/lib/tasks.ts +0 -320
  420. package/skills/e2bswarm/src/types/index.ts +0 -107
  421. package/skills/e2bswarm/templates/codebox/e2b.Dockerfile +0 -38
  422. package/skills/e2bswarm/templates/codebox/e2b.toml +0 -3
  423. package/skills/e2bswarm/templates/setup.sh +0 -21
  424. package/skills/e2bswarm/tsconfig.json +0 -19
  425. package/skills/generate-book-cover/src/index.ts +0 -694
  426. package/skills/image/src/index-local.ts +0 -206
  427. package/skills/image/src/index.ts +0 -96
  428. package/skills/image/src/providers/google.ts +0 -79
  429. package/skills/image/src/providers/minimax.ts +0 -94
  430. package/skills/image/src/providers/openai.ts +0 -80
  431. package/skills/image/src/providers/xai.ts +0 -73
  432. package/skills/image/src/types.ts +0 -37
  433. package/skills/logo-design/CLAUDE.md +0 -30
  434. package/skills/logo-design/src/index.ts +0 -322
  435. package/skills/managehook/src/server/index.ts +0 -108
  436. package/skills/managemcp/src/server/index.ts +0 -108
  437. package/skills/manageskill/src/server/index.ts +0 -108
  438. package/skills/music/CLAUDE.md +0 -9
  439. package/skills/music/src/index.ts +0 -94
  440. package/skills/music/tsconfig.json +0 -10
  441. package/skills/pdf-read/src/index.ts +0 -320
  442. package/skills/product-mockup/CLAUDE.md +0 -19
  443. package/skills/product-mockup/src/index.ts +0 -290
  444. package/skills/read-pdf/src/index.ts +0 -388
  445. package/skills/remove-background/src/index.ts +0 -405
  446. package/skills/scaffold-project/my-app/.env.example +0 -2
  447. package/skills/scaffold-project/my-app/README.md +0 -72
  448. package/skills/scaffold-project/my-app/package.json +0 -29
  449. package/skills/scaffold-project/my-app/src/index.ts +0 -23
  450. package/skills/scaffold-project/my-app/tsconfig.json +0 -33
  451. package/skills/sound-effects/SKILL.md +0 -34
  452. package/skills/sound-effects/package.json +0 -21
  453. package/skills/sound-effects/src/index.ts +0 -172
  454. package/skills/sound-effects/tsconfig.json +0 -8
  455. package/skills/transcript/src/chunker.ts +0 -215
  456. package/skills/transcript/src/formatter.ts +0 -134
  457. package/skills/transcript/src/index-local.ts +0 -226
  458. package/skills/transcript/src/index.ts +0 -110
  459. package/skills/transcript/src/providers/elevenlabs.ts +0 -133
  460. package/skills/transcript/src/providers/gemini.ts +0 -192
  461. package/skills/transcript/src/providers/index.ts +0 -54
  462. package/skills/transcript/src/providers/openai.ts +0 -203
  463. package/skills/transcript/src/types.ts +0 -106
  464. package/skills/video/.env.example +0 -14
  465. package/skills/video/EXAMPLES.md +0 -266
  466. package/skills/video/LICENSE +0 -192
  467. package/skills/video/README.md +0 -174
  468. package/skills/video/src/cli.ts +0 -155
  469. package/skills/video/src/index-local.ts +0 -148
  470. package/skills/video/src/index.ts +0 -96
  471. package/skills/video/src/providers/google-veo.ts +0 -126
  472. package/skills/video/src/providers/index.ts +0 -22
  473. package/skills/video/src/providers/minimax.ts +0 -100
  474. package/skills/video/src/providers/openai-sora.ts +0 -164
  475. package/skills/video/src/providers/runway.ts +0 -159
  476. package/skills/video/src/types.ts +0 -35
  477. package/skills/video/tsconfig.json +0 -22
  478. package/skills/voiceover-casting-assistant/CLAUDE.md +0 -19
  479. package/skills/voiceover-casting-assistant/package.json +0 -27
  480. package/skills/voiceover-casting-assistant/src/index.ts +0 -255
  481. package/skills/voiceover-casting-assistant/tsconfig.json +0 -10
  482. package/skills/webcrawling/src/commands/config.ts +0 -34
  483. package/skills/webcrawling/src/commands/crawl.ts +0 -33
  484. package/skills/webcrawling/src/commands/scrape.ts +0 -32
  485. package/skills/webcrawling/src/commands/sessions.ts +0 -42
  486. package/skills/webcrawling/src/lib/crawler.ts +0 -174
  487. package/skills/webcrawling/src/lib/storage.ts +0 -130
  488. package/skills/webcrawling/src/types/index.ts +0 -45
  489. package/skills/webcrawling/src/utils/logger.ts +0 -30
  490. package/skills/webcrawling/src/utils/paths.ts +0 -28
  491. /package/skills/{audiobook-chapter-proofer → blog-article}/tsconfig.json +0 -0
@@ -4,7 +4,8 @@
4
4
  "description": "Web crawling service using Firecrawl API",
5
5
  "type": "module",
6
6
  "bin": {
7
- "webcrawling": "./bin/cli.ts"
7
+ "webcrawling": "src/index.ts",
8
+ "webcrawl": "src/index.ts"
8
9
  },
9
10
  "scripts": {
10
11
  "dev": "bun run bin/cli.ts",
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: Article Writer
2
+ name: write
3
3
  description: Generate high-quality articles using parallel AI agents. Supports research, writing, and optional cover image generation. Write single articles or batch process multiple topics with configurable parallelism.
4
4
  ---
5
5
 
@@ -7,6 +7,8 @@ description: Generate high-quality articles using parallel AI agents. Supports r
7
7
 
8
8
  This skill spawns parallel AI agents to research and write articles on any topic. Each article goes through a multi-phase pipeline:
9
9
 
10
+ This CLI is API-backed. Set `SKILL_API_KEY` when routing through the hosted skills/connectors runtime; provider-specific keys are managed by that runtime.
11
+
10
12
  1. **Research Agent** - Gathers information and key points about the topic
11
13
  2. **Writer Agent** - Creates a well-structured article based on the research
12
14
  3. **Image Agent** (optional) - Generates a cover image for the article
@@ -45,12 +47,10 @@ bun run src/index.ts batch \
45
47
 
46
48
  ## Configuration
47
49
 
48
- Set up API keys as environment variables:
50
+ Set the hosted runtime API key:
51
+
49
52
  ```bash
50
- export ANTHROPIC_API_KEY=your_anthropic_key # Required
51
- export OPENAI_API_KEY=your_openai_key # For image generation
52
- export GOOGLE_API_KEY=your_google_key # Alternative image provider
53
- export XAI_API_KEY=your_xai_key # Alternative image provider
53
+ export SKILL_API_KEY=your_skill_api_key
54
54
  ```
55
55
 
56
56
  ## Output Format
@@ -1,11 +0,0 @@
1
- /**
2
- * Bun HTTP server for the Skills Dashboard.
3
- * Serves the Vite-built React dashboard and provides API routes.
4
- */
5
- export declare function createFetchHandler(options?: {
6
- dashboardDir?: string;
7
- dashboardExists?: boolean;
8
- }): (req: Request) => Promise<Response>;
9
- export declare function startServer(port?: number, options?: {
10
- open?: boolean;
11
- }): Promise<void>;
@@ -1,5 +0,0 @@
1
- {
2
- "env": {
3
- "CLAUDE_CODE_TASK_LIST_ID": "service-apidocs-dev"
4
- }
5
- }
@@ -1,14 +0,0 @@
1
- # Audio Generation API Keys
2
- # Copy this file to .env and fill in your API keys
3
-
4
- # ElevenLabs API Key
5
- # Get your key from: https://elevenlabs.io/
6
- ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
7
-
8
- # OpenAI API Key
9
- # Get your key from: https://platform.openai.com/api-keys
10
- OPENAI_API_KEY=your_openai_api_key_here
11
-
12
- # Google Cloud Text-to-Speech API Key
13
- # Get your key from: https://console.cloud.google.com/apis/credentials
14
- GOOGLE_API_KEY=your_google_api_key_here
@@ -1,158 +0,0 @@
1
- # Quick Start Guide
2
-
3
- Get started with audio generation in under 5 minutes!
4
-
5
- ## 1. Set Up API Keys
6
-
7
- Copy the example environment file:
8
- ```bash
9
- cp .env.example .env
10
- ```
11
-
12
- Edit `.env` and add at least one API key:
13
- ```bash
14
- # Choose one or more providers:
15
- OPENAI_API_KEY=sk-... # Easiest to get started
16
- ELEVENLABS_API_KEY=... # Best voice quality
17
- GOOGLE_API_KEY=... # Most language options
18
- ```
19
-
20
- ## 2. Test the Installation
21
-
22
- List available voices (no API key needed for OpenAI):
23
- ```bash
24
- bun run src/index.ts voices --provider openai
25
- ```
26
-
27
- ## 3. Generate Your First Audio
28
-
29
- ### Option A: OpenAI TTS (Recommended for beginners)
30
- ```bash
31
- bun run src/index.ts generate \
32
- --provider openai \
33
- --text "Hello, this is my first audio generation!" \
34
- --voice nova \
35
- --output ./test.mp3
36
- ```
37
-
38
- ### Option B: ElevenLabs (Best quality)
39
- ```bash
40
- bun run src/index.ts generate \
41
- --provider elevenlabs \
42
- --text "Hello, this is my first audio generation!" \
43
- --voice rachel \
44
- --output ./test.mp3
45
- ```
46
-
47
- ### Option C: Google TTS (Most languages)
48
- ```bash
49
- bun run src/index.ts generate \
50
- --provider google \
51
- --text "Hello, this is my first audio generation!" \
52
- --language en-US \
53
- --output ./test.mp3
54
- ```
55
-
56
- ## 4. Play Your Audio
57
-
58
- On macOS:
59
- ```bash
60
- afplay test.mp3
61
- ```
62
-
63
- On Linux:
64
- ```bash
65
- mpg123 test.mp3
66
- # or
67
- ffplay test.mp3
68
- ```
69
-
70
- On Windows:
71
- ```bash
72
- start test.mp3
73
- ```
74
-
75
- ## Next Steps
76
-
77
- - Explore different voices: `bun run src/index.ts voices --provider <name>`
78
- - Try different speeds: Add `--speed 1.5` for faster speech
79
- - Use different models: Add `--model tts-1-hd` for higher quality (OpenAI)
80
- - See all options: `bun run src/index.ts help`
81
-
82
- ## Common Use Cases
83
-
84
- ### Podcast Intro
85
- ```bash
86
- bun run src/index.ts generate \
87
- --provider elevenlabs \
88
- --text "Welcome to the Tech Talk podcast, where we discuss the latest in technology and innovation" \
89
- --voice adam \
90
- --output ./podcast_intro.mp3
91
- ```
92
-
93
- ### Multilingual Content (Google)
94
- ```bash
95
- bun run src/index.ts generate \
96
- --provider google \
97
- --text "Bonjour, comment allez-vous?" \
98
- --language fr-FR \
99
- --output ./french_greeting.mp3
100
- ```
101
-
102
- ### Audiobook Narration
103
- ```bash
104
- bun run src/index.ts generate \
105
- --provider openai \
106
- --text "Chapter 1: The Beginning. It was a dark and stormy night..." \
107
- --voice fable \
108
- --model tts-1-hd \
109
- --speed 0.9 \
110
- --output ./chapter1.mp3
111
- ```
112
-
113
- ## Troubleshooting
114
-
115
- **Error: API key not found**
116
- - Make sure you've created a `.env` file
117
- - Check that your API key is correctly formatted
118
- - Verify the environment variable name matches the provider
119
-
120
- **Error: Voice not found**
121
- - List available voices first: `bun run src/index.ts voices --provider <name>`
122
- - Use the exact voice ID from the list
123
-
124
- **Poor audio quality**
125
- - Use `--model tts-1-hd` with OpenAI for higher quality
126
- - Try `eleven_multilingual_v2` model with ElevenLabs
127
- - Adjust `--speed` for more natural speech
128
-
129
- ## Getting API Keys
130
-
131
- ### OpenAI (Easiest, $0.015/1K chars)
132
- 1. Visit https://platform.openai.com/api-keys
133
- 2. Sign up or log in
134
- 3. Click "Create new secret key"
135
- 4. Copy and paste into `.env`
136
-
137
- ### ElevenLabs (Best quality, free tier available)
138
- 1. Visit https://elevenlabs.io/
139
- 2. Sign up for a free account (10K chars/month)
140
- 3. Go to Profile > API Keys
141
- 4. Copy and paste into `.env`
142
-
143
- ### Google Cloud (Most languages, complex setup)
144
- 1. Visit https://console.cloud.google.com/
145
- 2. Create a project
146
- 3. Enable Text-to-Speech API
147
- 4. Create credentials (API key)
148
- 5. Copy and paste into `.env`
149
-
150
- ## Tips for Best Results
151
-
152
- 1. **Keep sentences natural**: Punctuation affects pacing and intonation
153
- 2. **Use appropriate voices**: Match voice to content (professional, casual, storytelling)
154
- 3. **Adjust speed**: 0.9-1.0 for audiobooks, 1.0-1.2 for casual content
155
- 4. **Test different providers**: Each has unique strengths
156
- 5. **Mind your costs**: Monitor usage, especially with paid tiers
157
-
158
- Enjoy generating audio!
@@ -1,256 +0,0 @@
1
- # Audio Generation Skill
2
-
3
- A comprehensive Claude Code skill for generating high-quality audio using AI-powered text-to-speech APIs.
4
-
5
- ## Features
6
-
7
- - Multiple TTS providers: ElevenLabs, OpenAI TTS, and Google Text-to-Speech
8
- - Simple, elegant CLI interface
9
- - Voice selection and listing
10
- - Multiple languages support
11
- - Customizable speech speed
12
- - Clean TypeScript implementation with full type safety
13
- - Native fetch API (no external HTTP libraries needed)
14
-
15
- ## Supported Providers
16
-
17
- ### ElevenLabs
18
- - Natural voice synthesis with voice cloning capabilities
19
- - Models: `eleven_multilingual_v2`, `eleven_flash_v2_5`, `eleven_v3`
20
- - Multiple languages and voice options
21
- - Professional-quality audio output
22
-
23
- ### OpenAI TTS
24
- - High-quality text-to-speech
25
- - Models: `tts-1` (fast), `tts-1-hd` (high quality)
26
- - Voices: alloy, echo, fable, onyx, nova, shimmer
27
- - Speed control (0.25x to 4.0x)
28
-
29
- ### Google Text-to-Speech
30
- - Cloud-based TTS service
31
- - Wide range of voices and languages
32
- - Natural-sounding speech synthesis
33
- - Configurable pitch and speaking rate
34
-
35
- ## Installation
36
-
37
- 1. Install Bun (if not already installed):
38
- ```bash
39
- curl -fsSL https://bun.sh/install | bash
40
- ```
41
-
42
- 2. Clone and navigate to the skill directory:
43
- ```bash
44
- git clone https://github.com/hasnaxyz/audio.git
45
- cd audio
46
- ```
47
-
48
- 3. Install dependencies:
49
- ```bash
50
- bun install
51
- ```
52
-
53
- 4. Set up environment variables:
54
- ```bash
55
- cp .env.example .env
56
- # Edit .env and add your API keys
57
- ```
58
-
59
- ## Configuration
60
-
61
- Create a `.env` file with your API keys:
62
-
63
- ```bash
64
- ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
65
- OPENAI_API_KEY=your_openai_api_key_here
66
- GOOGLE_API_KEY=your_google_api_key_here
67
- ```
68
-
69
- ### Getting API Keys
70
-
71
- - **ElevenLabs**: https://elevenlabs.io/
72
- - **OpenAI**: https://platform.openai.com/api-keys
73
- - **Google Cloud**: https://console.cloud.google.com/apis/credentials
74
-
75
- ## Usage
76
-
77
- ### Generate Audio
78
-
79
- #### ElevenLabs
80
- ```bash
81
- bun run src/index.ts generate \
82
- --provider elevenlabs \
83
- --text "Hello world, this is a test of ElevenLabs text to speech" \
84
- --voice rachel \
85
- --model eleven_multilingual_v2 \
86
- --output ./output.mp3
87
- ```
88
-
89
- #### OpenAI TTS
90
- ```bash
91
- bun run src/index.ts generate \
92
- --provider openai \
93
- --text "Hello world, this is a test of OpenAI text to speech" \
94
- --voice nova \
95
- --model tts-1-hd \
96
- --speed 1.0 \
97
- --output ./output.mp3
98
- ```
99
-
100
- #### Google Text-to-Speech
101
- ```bash
102
- bun run src/index.ts generate \
103
- --provider google \
104
- --text "Hello world, this is a test of Google text to speech" \
105
- --language en-US \
106
- --speed 1.0 \
107
- --output ./output.mp3
108
- ```
109
-
110
- ### List Available Voices
111
-
112
- ```bash
113
- # ElevenLabs voices
114
- bun run src/index.ts voices --provider elevenlabs
115
-
116
- # OpenAI voices
117
- bun run src/index.ts voices --provider openai
118
-
119
- # Google voices
120
- bun run src/index.ts voices --provider google
121
- ```
122
-
123
- ### Show Help
124
-
125
- ```bash
126
- bun run src/index.ts help
127
- ```
128
-
129
- ## CLI Options
130
-
131
- ### Generate Command
132
-
133
- | Option | Description | Required | Default |
134
- |--------|-------------|----------|---------|
135
- | `--provider` | Provider to use (elevenlabs, openai, google) | Yes | - |
136
- | `--text` | Text to convert to speech | Yes | - |
137
- | `--output` | Output file path (e.g., ./output.mp3) | Yes | - |
138
- | `--voice` | Voice to use (provider-specific) | No | Provider default |
139
- | `--model` | Model to use (provider-specific) | No | Provider default |
140
- | `--language` | Language code (Google TTS, e.g., en-US) | No | en-US |
141
- | `--speed` | Speaking speed (0.25-4.0) | No | 1.0 |
142
-
143
- ### Voices Command
144
-
145
- | Option | Description | Required |
146
- |--------|-------------|----------|
147
- | `--provider` | Provider to list voices from | Yes |
148
-
149
- ## Examples
150
-
151
- ### Quick Test with Different Providers
152
-
153
- ```bash
154
- # ElevenLabs - Natural voice
155
- bun run src/index.ts generate \
156
- --provider elevenlabs \
157
- --text "The quick brown fox jumps over the lazy dog" \
158
- --voice rachel \
159
- --output ./elevenlabs_test.mp3
160
-
161
- # OpenAI - High quality
162
- bun run src/index.ts generate \
163
- --provider openai \
164
- --text "The quick brown fox jumps over the lazy dog" \
165
- --voice nova \
166
- --model tts-1-hd \
167
- --output ./openai_test.mp3
168
-
169
- # Google - Multilingual
170
- bun run src/index.ts generate \
171
- --provider google \
172
- --text "The quick brown fox jumps over the lazy dog" \
173
- --language en-US \
174
- --output ./google_test.mp3
175
- ```
176
-
177
- ### Generate with Custom Speed
178
-
179
- ```bash
180
- # Slower speech
181
- bun run src/index.ts generate \
182
- --provider openai \
183
- --text "This is spoken slowly" \
184
- --voice onyx \
185
- --speed 0.75 \
186
- --output ./slow.mp3
187
-
188
- # Faster speech
189
- bun run src/index.ts generate \
190
- --provider openai \
191
- --text "This is spoken quickly" \
192
- --voice nova \
193
- --speed 1.5 \
194
- --output ./fast.mp3
195
- ```
196
-
197
- ## Project Structure
198
-
199
- ```
200
- audio/
201
- ├── SKILL.md # Skill metadata and description
202
- ├── README.md # This file
203
- ├── package.json # Bun project configuration
204
- ├── tsconfig.json # TypeScript configuration
205
- ├── .env.example # Example environment variables
206
- ├── src/
207
- │ ├── index.ts # CLI entry point
208
- │ ├── types.ts # TypeScript type definitions
209
- │ └── providers/
210
- │ ├── elevenlabs.ts # ElevenLabs provider
211
- │ ├── openai.ts # OpenAI TTS provider
212
- │ └── google.ts # Google TTS provider
213
- ```
214
-
215
- ## Development
216
-
217
- ### Run in Development Mode
218
-
219
- ```bash
220
- bun run dev
221
- ```
222
-
223
- ### Type Checking
224
-
225
- ```bash
226
- bun run tsc --noEmit
227
- ```
228
-
229
- ## Error Handling
230
-
231
- The CLI provides clear error messages for common issues:
232
-
233
- - Missing API keys
234
- - Invalid providers
235
- - Voice not found
236
- - API errors
237
- - File write errors
238
-
239
- ## Troubleshooting
240
-
241
- ### "API key not found" error
242
- Make sure you've created a `.env` file with the appropriate API key for the provider you're using.
243
-
244
- ### "Voice not found" error
245
- Use the `voices` command to list available voices for your chosen provider.
246
-
247
- ### API errors
248
- Check that your API keys are valid and have sufficient credits/quota.
249
-
250
- ## License
251
-
252
- MIT
253
-
254
- ## Contributing
255
-
256
- Contributions are welcome! Please feel free to submit issues or pull requests.
@@ -1,206 +0,0 @@
1
- #!/usr/bin/env bun
2
-
3
- /**
4
- * Audio Generation CLI
5
- * Unified interface for ElevenLabs, OpenAI TTS, and Google Text-to-Speech
6
- */
7
- import { handleInstallCommand } from '../../_common';
8
-
9
-
10
- // Handle install/uninstall commands
11
- const SKILL_META = {
12
- name: 'audio',
13
- description: 'Audio generation skill for Claude Code using ElevenLabs, OpenAI TTS, and Google Text-to-Speech',
14
- version: '1.0.0',
15
- commands: `Use: audio --help`,
16
- requiredEnvVars: ['SKILL_API_KEY'],
17
- };
18
-
19
- if (await handleInstallCommand(SKILL_META, process.argv.slice(2))) {
20
- process.exit(0);
21
- }
22
-
23
- import { MinimaxProvider } from './providers/minimax';
24
- import { ElevenLabsProvider } from './providers/elevenlabs';
25
- import { OpenAIProvider } from './providers/openai';
26
- import { GoogleProvider } from './providers/google';
27
- import type { AudioProvider, Provider } from './types';
28
-
29
- // Parse command line arguments
30
- function parseArgs(): {
31
- command: string;
32
- provider?: Provider;
33
- text?: string;
34
- voice?: string;
35
- model?: string;
36
- output?: string;
37
- language?: string;
38
- speed?: number;
39
- } {
40
- const args = process.argv.slice(2);
41
- const parsed: any = { command: args[0] || 'help' };
42
-
43
- for (let i = 1; i < args.length; i += 2) {
44
- const key = args[i].replace(/^--/, '');
45
- const value = args[i + 1];
46
- parsed[key] = value;
47
- }
48
-
49
- // Convert speed to number if present
50
- if (parsed.speed) {
51
- parsed.speed = parseFloat(parsed.speed);
52
- }
53
-
54
- return parsed;
55
- }
56
-
57
- // Get provider instance
58
- function getProvider(providerName: Provider): AudioProvider {
59
- switch (providerName) {
60
- case 'minimax':
61
- return new MinimaxProvider();
62
- case 'elevenlabs':
63
- return new ElevenLabsProvider();
64
- case 'openai':
65
- return new OpenAIProvider();
66
- case 'google':
67
- return new GoogleProvider();
68
- default:
69
- throw new Error(
70
- `Unknown provider: ${providerName}. Use: minimax, elevenlabs, openai, or google`
71
- );
72
- }
73
- }
74
-
75
- // Display help information
76
- function showHelp(): void {
77
- console.log(`
78
- Audio Generation CLI - Generate high-quality audio using AI
79
-
80
- USAGE:
81
- bun run src/index.ts <command> [options]
82
-
83
- COMMANDS:
84
- generate Generate audio from text
85
- voices List available voices for a provider
86
- help Show this help message
87
-
88
- GENERATE OPTIONS:
89
- --provider <name> Provider to use: elevenlabs, openai, google (required)
90
- --text <text> Text to convert to speech (required)
91
- --voice <voice> Voice to use (optional, provider-specific)
92
- --model <model> Model to use (optional, provider-specific)
93
- --output <path> Output file path (required, e.g., ./output.mp3)
94
- --language <code> Language code (optional, for Google TTS, e.g., en-US)
95
- --speed <number> Speaking speed (optional, 0.25-4.0, default: 1.0)
96
-
97
- VOICES OPTIONS:
98
- --provider <name> Provider to list voices from (required)
99
-
100
- EXAMPLES:
101
- # Generate audio with ElevenLabs
102
- bun run src/index.ts generate --provider elevenlabs --text "Hello world" --voice rachel --output ./output.mp3
103
-
104
- # Generate audio with OpenAI TTS
105
- bun run src/index.ts generate --provider openai --text "Hello world" --voice nova --output ./output.mp3
106
-
107
- # Generate audio with Google TTS
108
- bun run src/index.ts generate --provider google --text "Hello world" --language en-US --output ./output.mp3
109
-
110
- # List available voices
111
- bun run src/index.ts voices --provider elevenlabs
112
- bun run src/index.ts voices --provider openai
113
- bun run src/index.ts voices --provider google
114
-
115
- ENVIRONMENT VARIABLES:
116
- ELEVENLABS_API_KEY API key for ElevenLabs
117
- OPENAI_API_KEY API key for OpenAI
118
- GOOGLE_API_KEY API key for Google Cloud TTS
119
- `);
120
- }
121
-
122
- // Main CLI handler
123
- async function main(): Promise<void> {
124
- const args = parseArgs();
125
-
126
- try {
127
- switch (args.command) {
128
- case 'generate': {
129
- if (!args.provider) {
130
- console.error('Error: --provider is required');
131
- console.error('Use: bun run src/index.ts help');
132
- process.exit(1);
133
- }
134
- if (!args.text) {
135
- console.error('Error: --text is required');
136
- console.error('Use: bun run src/index.ts help');
137
- process.exit(1);
138
- }
139
- if (!args.output) {
140
- console.error('Error: --output is required');
141
- console.error('Use: bun run src/index.ts help');
142
- process.exit(1);
143
- }
144
-
145
- const provider = getProvider(args.provider as Provider);
146
- console.log(`Generating audio with ${provider.name}...`);
147
-
148
- await provider.generate({
149
- text: args.text,
150
- voice: args.voice,
151
- model: args.model,
152
- output: args.output,
153
- language: args.language,
154
- speed: args.speed,
155
- });
156
- break;
157
- }
158
-
159
- case 'voices': {
160
- if (!args.provider) {
161
- console.error('Error: --provider is required');
162
- console.error('Use: bun run src/index.ts help');
163
- process.exit(1);
164
- }
165
-
166
- const provider = getProvider(args.provider as Provider);
167
- console.log(`Fetching voices from ${provider.name}...\n`);
168
-
169
- const voices = await provider.listVoices();
170
-
171
- if (voices.length === 0) {
172
- console.log('No voices available');
173
- break;
174
- }
175
-
176
- console.log(`Found ${voices.length} voices:\n`);
177
- voices.forEach((voice) => {
178
- console.log(` ${voice.name} (${voice.id})`);
179
- if (voice.description) {
180
- console.log(` ${voice.description}`);
181
- }
182
- if (voice.category) {
183
- console.log(` Category: ${voice.category}`);
184
- }
185
- console.log('');
186
- });
187
- break;
188
- }
189
-
190
- case 'help':
191
- showHelp();
192
- break;
193
-
194
- default:
195
- console.error(`Unknown command: ${args.command}`);
196
- console.error('Use: bun run src/index.ts help');
197
- process.exit(1);
198
- }
199
- } catch (error) {
200
- console.error('Error:', error instanceof Error ? error.message : String(error));
201
- process.exit(1);
202
- }
203
- }
204
-
205
- // Run the CLI
206
- main();