Skip to content

Manifest

Every extension must contain a manifest file. That specifies the extension’s metadata like, the name, version, and commands.

In your extension project, the manifest file can be JavaScript, TypeScript, or JSON. And it’s on the root directory. Extension manifest file example:

manifest.ts
import { ExtensionManifest } from '@altdot/extension';
const manifest: ExtensionManifest = {
name: 'extension-starter',
title: 'Hello World',
description: 'Alt. extension template starter',
author: 'username',
categories: ['Other'],
icon: 'logo',
version: '1.0.0',
commands: [
{
type: 'action',
name: 'action-command',
title: 'Action Command',
arguments: [{ name: 'text', type: 'input:text', title: 'Text arg' }],
},
{
type: 'view',
name: 'view-command',
title: 'View Command',
},
{
type: 'script',
name: 'js-script.js',
title: 'Script Command',
},
],
};
export default manifest;

Manifest Properties

NameTypeDescription
namestringURL-friendly name of the extension
titlestringThe title of the extension. The title will be shown in the Command Bar and the store when you publish it
versionstringThe extension's version
descriptionstringShort description of the extension
iconstringName of the image file in the public/icon folder. The image must be PNG and have 512x512 dimensions. To support the dark theme, add a @dark suffix in the icon file name, e.g. icon.png into icon@dark.png.
Or use the prefix icon: to use the icons in the UiIcons component as the icon. For example, icon:Command
authorstringUsername of your Alt. app account
commandsExtensionCommand[]List of the extension commands
categoriesCategories[]List of the extension categories
config?Config[]List of the extension configuration

Command Properties

NameTypeDescription
namestringA unique name of the command. The name must correspond with the command file or folder name inside the src directory. For example, view and the file name must be view.ts or view/index.ts.
For a command with the script type. The name must include the file extension.
typeview | action | scriptThe command type. Read more about the difference in the command page
titlestringThe command title that will be shown to the user
icon?stringName of the image file in the public/icon folder. The image must be PNG and have 512x512 dimensions. To support the dark theme, add a @dark suffix in the icon file name, e.g. icon.png into icon@dark.png.
Or use the prefix icon: to use the icons in the UiIcons component as the icon. For example, icon:Command
It will use the extension icon if not defined
description?stringA short description of the command
config?Config[]List of the command configuration
arguments?Argument[]A list of the command arguments for the user needs to be filled in before running the command

Command script type Additional Properties

NameTypeDescription
hasScript?boolean

Whether the script return Command JSON output

Config Properties

NameTypeDescription
namestringA unique name of the config. This name will be used as the key when accessing the config
titlestringConfig title that will be shown to the user
typeselect | toggle | input:text | input:file | input:number | input:password | input:directoryThe config type. Value of the input:password type will be encrypted using the electron safeStorage before being stored.
placholder?stringText that will be displayed when the field has no value
description?stringShort description of the config
required?booleanWhether the user is required to input a value or not
defaultValuestring | boolean | number | undefinedDefault value of the field

Config select type Additional Properties

NameTypeDescription
options{ label: string; value: string }[]Select options

Config input:file type Additional Properties

NameTypeDescription
fileFilter{ name: string; extensions: string[] }[]Filter for which files the user can select. For example, { name: 'JavaScript', extensions: ['js', 'mjs', 'cjs'] }

Argument Properties

NameTypeDescription
namestringA unique name of the argument. This name will be used as the key when accessing the argument
titlestringArgument title that will be shown to the user
typetoggle | select | input:text | input:number | input:passwordThe argument type
description?stringShort description of the argument
placholder?stringText that will be displayed when the field has no value
required?booleanWhether the user is required to input a value or not

Argument select type Additional Properties

NameTypeDescription
options{ label: string; value: string }[]Select options

Categories

Here are some categories that you can put in the extension manifest:

  • Applications
  • Automation
  • Developer Tools
  • Productivity
  • Scripts
  • Web
  • Other