DEV Community

Cover image for CLI for Managing Shopify App Webhooks
Taylor Beseda
Taylor Beseda

Posted on

CLI for Managing Shopify App Webhooks

shopify-webhook-commander is a CLI to create, list, and delete Shopify Admin App webhook subscriptions.

Building out a new admin app often requires setting up listeners for Shop events but building out controllers and UI to manage webhook subscriptions isn't always at the top of the to-do list.

This CLI will let developers manage subscriptions from the terminal.

shopify-webhook-commander demo

Install

🚫 This package is under active development; installer beware.

$ npm i -g shopify-webhook-commander
Enter fullscreen mode Exit fullscreen mode

Note about auth tokens

This tool uses a single token to authenticate; this is easiest with a Shopify "Private" Admin App. Set the config secret to the private app password. There is no OAuth flow to help with "Custom" Partner apps.
You could provide an accessToken acquired from a Custom app's authentication flow.
shopify-webhook-commander doesn't really help for "Public" apps that typically manage webhooks for each shop install programatically.

Roadmap

  1. tests 😬
  2. replace Apollo client with a slimmer GQL lib
  3. integrate @shopify/shopify-api types -- gotta get rid of those any types
  4. webhooks:update command
  5. autocomplete webhook topics
  6. auth loop for custom apps

some cli typescript

Top comments (0)