npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

yeoman-adapter-clack

v0.2.1

Published

A Yeoman adapter that replaces Inquirer with Clack as the default prompt library

Readme

yeoman-adapter-clack

A Yeoman adapter that replaces inquirer with @clack/prompts as the default prompt library.

License Version: npm GitHub branch check runs

Installation 💿

npm install yeoman-adapter-clack

Usage 🚀

To make use of this adapter, you need to overwrite the default one.

[!TIP]

For easy migration, you can import ClackCompatAdapter instead. Unlike the default adapter, it's API-compatible with Inquirer.

import { ClackAdapter } from "yeoman-adapter-clack";
import { createEnv } from "yeoman-environment";
import Generator from "yeoman-generator";

export default class extends Generator {
	constructor(args, options) {
		if (options.env) {
			const adapter = options.env.adapter;
			const isTestAdapter = adapter.constructor.name === "TestAdapter";

			if (!isTestAdapter && !(adapter instanceof ClackAdapter)) {
				options.env.adapter = new ClackAdapter();
			}
		} else {
			options.env = createEnv({ adapter: new ClackAdapter() });
		}

		super(args, options);
	}
}

[!TIP]

Alternatively, you can use replace the default generator with @idleberg/yeoman-generator. This also exposes access to the full Clack prompts API.

API ⚙️

ClackAdapter

Usage: new ClackAdapter()

The default adapter implements its own API for prompts. It's basically follows Clack prompt API with additional properties based on the default Yeoman prompt API.

Example

const answers = await this.prompt([
	{
		// Required adapter-specific properties
		type: "text",
		name: "userName",

		// Standard Clack API
		message: "What is your name?",
		placeholder: "John Appleseed",
		validate: (value) => {
			if (value.length < 2) return "Name must be at least 2 characters";
			return undefined;
		},

		// Optional adapter-specific properties
		store: true,
		when: () => true,
	},
]);

Supported types are autocomplete, autocompleteMultiselect, confirm, multiselect, password, select and text. For backwards-compatibility, there is also an expand type matching the behavior of Inquirer.

For further details, please check the type signatures.

ClackCompatAdapter

Usage: new ClackCompatAdapter()

This adapter provides an Inquirer-compatible prompt API, see the official Yeoman documentation.

Limitations ⛑️

Sadly, not all features can be realized in Clack prompts. The following limitations apply:

  • separators are not supported in the compatibility adapter and need to be removed
  • the expand type does not support keyboard shortcuts

License ©️

This work is licensed under The MIT License.