Create an Extension
Prerequisite
Before building your first extension, ensure you have the prerequisite.
- Node.js v20.16.0 or higher installed
- Package manager like npm, yarn, or pnpm installed
- Familiar with React or Typescript
- Familiar with Git
Create a New Extension
To create a new extension, fork or download the extension starter template and install the modules using the package manager, for example, if you’re using npm npm install
;
Open the manifest.ts
file to change the extension details like the name, description, etc.
Develop Extension
In the terminal, run the npm run dev
script. It will build the extension in development mode and automatically rebuild the file when you make changes. If you modify the view type command file, you must re-run it in the Command Bar to see the changes.
Use the npm run build
script to build the extension for production.
Import Extension
To import the extension into the Alt app, use the Import Extension Command, navigate to the extension directory, and select the manifest.json
file inside the dist
folder of the extension. You’ll see the extension commands in the Command Bar once it imported.
With that, congratulations 🎉 you just built your first extension.