Skip to content
Changelog

packages.install

Installs a package from a file or a catalog; one that asks for permissions opens Lightair's install screen for the person instead.

JSON-RPC 2.0project.write

A package that asks for nothing installs at once. One that asks for permissions, optional permissions or full access is never granted over the API: Lightair's install screen opens, and the answer says so with pending: true.

Catalogs are added only by the person, in the Plugins panel. A withdrawn version is refused.

Parameters

  • filestringA .airpkg, .lwidget or package folder on this computer.
  • idstringA package's id in a catalog, instead of file.
  • versionstringWhich version. Default: the newest.
  • catalogstringAn added catalog's name or address. Default: the one that offers it.

Result

  • idstringThe package's id.
  • versionstringIts version, when installed.
  • alreadybooleanWhether it was already installed.
  • pendingbooleantrue when the install screen opened for the person.
  • messagestringWith pending.

Errors

Invalid params (-32602) without file or id, or for a file that isn't a package. Not found (-32004) for a package no added catalog offers. A state error (-32005) for a withdrawn version, or when Lightair's window isn't open. Fails (-32000) when the install fails.

From an AI agent

The MCP server's plugins (action: install) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "packages.install",
"params": {
"id": "app.example.countdown"
}
}

Result

{ "id": "app.example.countdown", "version": "1.2.0", "already": false }

packages.search · packages.remove