Packages

@clack/core

1.6.0 · 9 Nov 2026MIT48.6M / weekRepositoryHomepagenpmAtom feed

Your version

0.4.0

19 Dec 2024Where it was published

0.5.0 is the newest release of 0.4.x.

In short

3 new1 fixed

Release note

Minor Changes

  • Adds a new updateSettings() function to support new global keybindings.

    updateSettings() accepts an aliases object that maps custom keys to an action (up | down | left | right | space | enter | cancel).

    import { updateSettings } from "@clack/core";
    
    // Support custom keybindings
    updateSettings({
      aliases: {
        w: "up",
        a: "left",
        s: "down",
        d: "right",
      },
    });

Warning

In order to enforce consistent, user-friendly defaults across the ecosystem, updateSettings does not support disabling Clack's default keybindings.

  • Adds a new signal option to support programmatic prompt cancellation with an abort controller.

  • Updates default keybindings to support Vim motion shortcuts and map the escape key to cancel (ctrl+c).

    aliasaction
    kup
    lright
    jdown
    hleft
    esccancel

Patch Changes

  • Improves types for events and interaction states.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.