{"id":35572994,"url":"https://github.com/idleberg/yeoman-adapter-clack","last_synced_at":"2026-01-28T22:09:05.979Z","repository":{"id":332409319,"uuid":"1126615690","full_name":"idleberg/yeoman-adapter-clack","owner":"idleberg","description":"A Yeoman adapter that replaces Inquirer with Clack as the default prompt library","archived":false,"fork":false,"pushed_at":"2026-01-05T12:31:16.000Z","size":245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T19:46:29.553Z","etag":null,"topics":["clack","clack-prompt","yeoman","yeoman-adapter"],"latest_commit_sha":null,"homepage":"https://www.npmjs.org/package/yeoman-adapter-clack","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idleberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"idleberg"}},"created_at":"2026-01-02T09:07:17.000Z","updated_at":"2026-01-05T12:31:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/idleberg/yeoman-adapter-clack","commit_stats":null,"previous_names":["idleberg/yeoman-adapter-clack"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/idleberg/yeoman-adapter-clack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fyeoman-adapter-clack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fyeoman-adapter-clack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fyeoman-adapter-clack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fyeoman-adapter-clack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idleberg","download_url":"https://codeload.github.com/idleberg/yeoman-adapter-clack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idleberg%2Fyeoman-adapter-clack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28853226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clack","clack-prompt","yeoman","yeoman-adapter"],"created_at":"2026-01-04T18:20:45.016Z","updated_at":"2026-01-28T22:09:05.974Z","avatar_url":"https://github.com/idleberg.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/idleberg"],"categories":[],"sub_categories":[],"readme":"# yeoman-adapter-clack\n\n\u003e A Yeoman adapter that replaces `inquirer` with `@clack/prompts` as the default\n\u003e prompt library.\n\n[![License](https://img.shields.io/github/license/idleberg/yeoman-adapter-clack?color=blue\u0026style=for-the-badge)](https://github.com/idleberg/yeoman-adapter-clack/blob/main/LICENSE)\n[![Version: npm](https://img.shields.io/npm/v/yeoman-adapter-clack?style=for-the-badge)](https://www.npmjs.org/package/yeoman-adapter-clack)\n![GitHub branch check runs](https://img.shields.io/github/check-runs/idleberg/yeoman-adapter-clack/main?style=for-the-badge)\n\n## Installation 💿\n\n```shell\nnpm install yeoman-adapter-clack\n```\n\n## Usage 🚀\n\nTo make use of this adapter, you need to overwrite the default one.\n\n\u003e [!TIP]\n\u003e\n\u003e For easy migration, you can import `ClackCompatAdapter` instead. Unlike the\n\u003e default adapter, it's API-compatible with Inquirer.\n\n```typescript\nimport { ClackAdapter } from \"yeoman-adapter-clack\";\nimport { createEnv } from \"yeoman-environment\";\nimport Generator from \"yeoman-generator\";\n\nexport default class extends Generator {\n\tconstructor(args, options) {\n\t\tif (options.env) {\n\t\t\tconst adapter = options.env.adapter;\n\t\t\tconst isTestAdapter = adapter.constructor.name === \"TestAdapter\";\n\n\t\t\tif (!isTestAdapter \u0026\u0026 !(adapter instanceof ClackAdapter)) {\n\t\t\t\toptions.env.adapter = new ClackAdapter();\n\t\t\t}\n\t\t} else {\n\t\t\toptions.env = createEnv({ adapter: new ClackAdapter() });\n\t\t}\n\n\t\tsuper(args, options);\n\t}\n}\n```\n\n\u003e [!TIP]\n\u003e\n\u003e Alternatively, you can use replace the default generator with [@idleberg/yeoman-generator](https://www.npmjs.com/package/@idleberg/yeoman-generator). This also exposes access to the full Clack prompts API.\n\n### API ⚙️\n\n#### `ClackAdapter`\n\nUsage: `new ClackAdapter()`\n\nThe default adapter implements its own API for prompts. It's basically follows\n[Clack prompt API](https://bomb.sh/docs/clack/packages/prompts/) with additional\nproperties based on the default\n[Yeoman prompt API](https://yeoman.io/authoring/user-interactions).\n\n**Example**\n\n```typescript\nconst answers = await this.prompt([\n\t{\n\t\t// Required adapter-specific properties\n\t\ttype: \"text\",\n\t\tname: \"userName\",\n\n\t\t// Standard Clack API\n\t\tmessage: \"What is your name?\",\n\t\tplaceholder: \"John Appleseed\",\n\t\tvalidate: (value) =\u003e {\n\t\t\tif (value.length \u003c 2) return \"Name must be at least 2 characters\";\n\t\t\treturn undefined;\n\t\t},\n\n\t\t// Optional adapter-specific properties\n\t\tstore: true,\n\t\twhen: () =\u003e true,\n\t},\n]);\n```\n\nSupported types are `autocomplete`, `autocompleteMultiselect`, `confirm`,\n`multiselect`, `password`, `select` and `text`. For backwards-compatibility,\nthere is also an `expand` type matching the behavior of\n[Inquirer](https://www.npmjs.com/package/@inquirer/expand).\n\nFor further details, please check the\n[type signatures](https://github.com/idleberg/yeoman-adapter-clack/blob/main/src/clack.d.ts).\n\n#### `ClackCompatAdapter`\n\nUsage: `new ClackCompatAdapter()`\n\nThis adapter provides an Inquirer-compatible prompt API, see the official\n[Yeoman documentation](https://yeoman.io/authoring/user-interactions).\n\n## Limitations ⛑️\n\nSadly, not all features can be realized in Clack prompts. The following limitations apply:\n\n- separators are not supported in the compatibility adapter and need to be removed\n- the `expand` type does not support keyboard shortcuts\n\n## License ©️\n\nThis work is licensed under [The MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidleberg%2Fyeoman-adapter-clack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidleberg%2Fyeoman-adapter-clack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidleberg%2Fyeoman-adapter-clack/lists"}