How to use the new simplified snippet format

Today I published PopClip version 2026.8.1. It’s a bugfix update with developer API changes riding along.

The new update includes support for a simplified snippet format:

// #popclip
// name: Minimal JS/TS Snippet
popclip.showText("hi friends!");

Main changes:

  • The language property is no longer needed. PopClip assumes JavaScript* when a code snippet’s config header uses // comments (and AppleScript for -- comments).
  • The module: true indicator is no longer needed. PopClip treats it as a module if the code exports something.

Example of simplified module snippet:

// #popclip
// name: Minimal Module Snippet
defineExtension({
  action: () => popclip.showText("hi friends!")
});

You’ll note also in the example above that I’ve used defineExtension() to define the module. That’s the recommended style I’m using it going forward, but you can still export just as before:

// #popclip
// name: Minimal Module Snippet (exports)
export const action = () => popclip.showText("hi friends!");

Additionally, I’ve now published a comprehensive TypeScript types definition file. It’s available as the npm package at @popclip/types and also on the web at https://www.popclip.app/dev/popclip.d.ts

I’ve also completely rewritten the public extension developer documentation, putting snippets and JavaScript front and center (with a snippet installation example on the first page): PopClip Extensions Developer Documentation

Shell script and AppleScript actions are still supported but are presented as classic formats, with JavaScript promoted as the main extension format going forward. (And now shell scripts and AppleScripts can be called from within JavaScript!)


The website is now also agent-friendly, with an llms.txt as well as Markdown versions of all the documentation (just add .md suffix on the URL).

I hope you find the changes and the new documentation useful. Please see the developer changelog for a full list of what’s new in PopClip 2026.8.1

I’d love to hear if you’re finding any of these things useful or if you have any questions about the changes.

*: Technically, these snippets are interpreted as TypeScript. But you can treat it as JavaScript. It doesn’t make much difference! I’ll generally say JavaScript in the documentation and in casual usage.

1 Like