Ada Extensions

Getting started

Turn on developer mode, create an extension from the template and see it update in the island as you save.

Requirements

  • Adanotch (the version these docs describe or newer)
  • Node.js 22.18 or later (tests run .ts files directly) and npm
  • An editor; VS Code picks up completions from adanotch/adanotch.d.ts

Turn on developer mode

In Adanotch › Settings › Developer, turn on Developer mode. The Terminal command › Install button on the same page installs the adanotch command into /usr/local/bin.

adanotch --help

Create the extension

adanotch init weather --name "Weather"
cd weather
npm install

init writes a working example extension, its tests, the type definitions and the manifest schema. It picks an ID (local.<you>.weather) for you; pass --id to choose your own.

Start the development loop

Open two terminals:

npm run watch   # rebuilds dist/index.js as src/ changes
adanotch dev    # loads the extension into Adanotch, reloads it on every save, prints its console

Change src/index.ts and save; the island updates within a few hundred milliseconds. Errors show their source line, like src/index.ts:12:5.

Install it

When you're done, choose the folder, or the .adanotchext file adanotch build makes, in Settings › Extensions › Install extension…. Adanotch copies the extension into its own library, asks you to approve its permissions, and loads it on every launch.

The folder

FileWhat it's for
manifest.jsonID, permissions, refresh rate, settings. Manifest
src/index.tsYour extension's code
test/index.test.tsTests that run in Node. Testing
dist/index.jsThe built script; this is what Adanotch runs
adanotch/API types, manifest schema, test kit and runtime
icon.pngOptional icon

Don't edit the adanotch/ folder

This folder belongs to your Adanotch version. When you update Adanotch, refresh it with adanotch init --types; your own code isn't touched.

npm scripts

ScriptWhat it does
npm run buildBuilds dist/index.js with esbuild (with a source map)
npm run watchRebuilds as you save
npm testRuns the tests on Adanotch's own runtime
npm run typecheckType-checks the source and the tests
npm run lintadanotch lint: manifest, permissions, missing network: domains
npm run packageadanotch build: a shareable .adanotchext

Next: read Lifecycle to see when your code runs.

On this page