How to get started with extensions

I’ve been looking at the developer docs on the Nova website with the intension of writing a little helper in Javascript to assist me with my web dev. Seems to be lots of useful info but what I’m missing at this point is the most basic of getting started. So I write some Javascript, but where do I save the file, what file extension, how does Nova see this? I’m assuming I use menu option Project > Tasks, but that’s all disabled currently.

If there is a basic sample somewhere to get up and running I’d be grateful if someone could point me to it. Thanks.

Edit: Just to add. The extension on this occasion is just to take currently selected text, do some stuff on that using Javascript, then save the result to the clipboard. And I’d invoke it manually from the main menu.

The easiest way to get a sample template started for doing what it sounds like you want is to:

  • Choose “Create new extension” from the extensions menu
  • Choose the “Editor” template
  • Name your extension and set its required entitlements
  • Save the template to disk

Once that’s done, Nova will open the project and you can then choose “Activate” from the Extensions menu to load the project ad-hoc while it is open during development.

Your primary script will be main.js which will contain the function you set up to be invoked by your menu item. The extension.json file is the extension manifest which, among other things, defined that menu item to appear in the Editor or Extensions menu.

Hope this helps as a starting point!


Thanks very much. That helped.