Skip to content

[RFC] Using a package manager for plugins #6

Closed

Description

@nmn

While it's still early days for plugins in Noteplan, it might make sense to keep all the "blessed" plugins in this Github repo, but longer term, that'll start to get untenable. Specially when it comes to releases.

Using a package manager like NPM might make a lot of sense. Using registry.npm.org URLs it's fairly straightforward to search, get details and download packages that can go directly to the Plugins folder.

Here are the benefits to this approach:

  1. Third party packages can all follow a naming convention (e.g. noteplan-plugin-commandName) and publish them on NPM and they will become easily discoverable for users.
  2. NPM packages have versioning built-in and it will become easy for different plug-ins to be updated independently and for Noteplan to periodically check for updates easily by package name.
  3. Since NPM allows for an independent .npmignore file it'll become easy to ignore built files for GitHub and ignore source files for the NPM package. This way Noteplan doesn't have to download any unnecessary files.
  4. It should still be valid to use a Github URL to manually download plugins that aren't on NPM. (without all the extra feature though)

Possible downsides:

  1. Churn - NPM can be an additive feature so that the churn can be kept to a minimum.
  2. it slightly increases the barrier to entry, but it's really just an npm publish command for a plug-in author. For advanced plugins this would be a total win.

Activity

  1. added
    questionFurther information is requested
    on May 24, 2021
  2. leomeloxp commented on Jun 7, 2021

    @leomeloxp
    Contributor

    it slightly increases the barrier to entry, but it's really just an npm publish command for a plug-in author. For advanced plugins this would be a total win.

    This one can be solved by having a template repo that users can clone to start developing their plugins, kinda like how themes can be copied and edited now but a bit more complex. It should be easy enough to write a generator as well so all users would need to do is run npm init noteplan-plugin my-plugin to generate a my-plugin folder with all the relevant template files in it.

  3. nmn commented on Jun 11, 2021

    @nmn
    CollaboratorAuthor

    I've been playing around with this and I'm making gradual progress. I'm hoping to start by creating a NPM workspace called @NotePlan and putting the "first-party" plugins under that. We can take it from there. I'm gonna be busy with work for a couple of weeks though so I'll have some updates after that.

  4. jgclark commented on Jun 11, 2021

    @jgclark
    Collaborator
  5. cweagans commented on Jun 17, 2021

    @cweagans

    Do we really need npm for this? Seems like you could use the Github API directly -- tag repos with a particular topic, and then use the repo search endpoint to find repos tagged with the noteplan-plugin (or whatever) topic.

    Using npm implies (to me) some need to also solve for various versions of dependencies. I hope NotePlan plugins do not need that.

  6. dwertheimer commented on Jul 10, 2021

    @dwertheimer
    Collaborator

    Agree that having only one way to get NP plugins out to the world is limiting.

    Obsidian's way of dealing with this seems to work -- they have "safe" (blessed) plugins and "community" plugins:
    https://help.obsidian.md/Advanced+topics/Third-party+plugins
    Then to get listed in the community directory:
    https://github.com/obsidianmd/obsidian-releases

    ...or do it the VSCode way:
    https://code.visualstudio.com/api/working-with-extensions/publishing-extension

  7. jgclark commented on Jul 10, 2021

    @jgclark
    Collaborator

    I know the main VSCode way, as I maintain one of the extensions in the marketplace. That is a central repository, but anyone can get an account to add to it, without any possibility of trampling on (or using) other's extensions. There's no quality control, though you can rate and comment on extensions.

    The BitBar / XBar / SwiftBar way is to have a central GitHub repo, and plugin authors submit PRs, which a few moderators add. This is effectively the main NP way at the moment.

    Like the other VSCode way, NP already allows for other plugins to be added from any source a user decides to use. Reasonably enough there won't be a central list of these.

    So, I wonder if the main thing to do in the shorter term is to add a button to the Plugins Preferences pane to 'Add Plugin ...' which would accept .gzip archives and unpack them into the user's folder, in the same way as for official plugins. This makes it a simple-enough step for non-techies to add from any source they wish.

  8. nmn commented on Jun 28, 2022

    @nmn
    CollaboratorAuthor

    Do we really need npm for this? Seems like you could use the Github API directly

    Benefits of NPM

    • Easily have a different set of assets for installation vs development by having separate .gitignore and .npmignore files.
    • Easier to publish (Github releases are slightly more complicated to setup)
    • Easy to search
      • By requiring a noteplan-plugin tag on NPM, we can make all third-party plugins easily accessible on NPM.

    Downsides of NPM

    • Centralized repository (but so it Github)
    • A change to how Noteplan searches and installs plugins.
  9. jgclark commented on Oct 12, 2026

    @jgclark
    Collaborator

    This was never properly picked up, and the deliver-through-GitHub has been firmly established and developed for 5 years. So closing this idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions