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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@knights-of-the-editing-table/spell-book

v1.0.3

Published

Add Spell Book support to an extension. Execute actions with shortcuts or control surface.

Readme

Spell Book

Spell Book is a support app to listen for a shortcut or a control surface button press in Adobe apps, to trigger extension commands. This module provides an interface for registering commands and handling shortcuts in your Adobe extension.

Installation

npm install @knights-of-the-editing-table/spell-book

Usage

Basic Setup

import Spellbook from '@knights-of-the-editing-table/spell-book';

const commands = [
    {
        commandID: 'command.id',
        name: 'Command 1', // use localised name if needed
        group: 'Group 1', // optional
        action: () => { // run action when command is triggered
            console.log('command.id triggered!')
        }
    }
];

const spellbook = new Spellbook('Extension name', 'extension.id', commands);

Command Interface

/**
 * @typedef {Object} Command
 * @property {string} commandID - Unique identifier for the command
 * @property {string} name - Display name for the command
 * @property {string?} group - Name of group the command belongs to
 * @property {(args?: any) => void} [action] - Function to execute when command is triggered
 */

API Reference

Spellbook

Constructor

new Spellbook(
    pluginName: string,
    pluginID: string,
    commands?: Command[])

Methods

  • register(commands: Command[]): void - Add or update commands
  • start(): void - Start listening for command events
  • stop(): void - Stop listening for command events

Events

The plugin extends EventEmitter and emits events when commands are triggered:

spellbook.on('command.id', (commandID) => {
    console.log('command.id triggered!')
});

Supported Adobe Hosts

  • Premiere Pro
  • After Effects
  • Photoshop (CEP)
  • Illustrator
  • InDesign

Integration with Adobe CEP

This module is designed to work with Adobe CEP extensions and uses the native window.__adobe_cep__ interface. Make sure that Spell Book is installed (both app and Spell Book extension).

UXP support

Use UXP Spellbook plugin: https://www.npmjs.com/package/@knights-of-the-editing-table/spell-book-uxp

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.