Skip to content
Kunkun

Extension Installation

Multiple methods are available for installing extensions in Kunkun.

Extension Store

In the app, search for store, open the store to see a list of extensions available for installation.

In the settings, under extensions tab, you can delete extensions.

For Developers

This section is for developers and advanced users.

Regular users are recommanded to use the Extension Store to install extensions.

The following methods are designed for developers and more advanced users who may want to install extensions from other sources or develop an extension.

The installation interface is under settings page, developer tab.

Remote Tarball URL

Provide an URL to the tarball .tgz file of the extension. It can be hosted on any server, such as asset in a GitHub release, or NPM package.

NPM

NPM is one of the most successful package manager in the world. It is used by millions of developers to share their code.

It makes sense to use it to share KK extensions.

However, I don’t want to use npm command to install extensions, as that will requires end users to have npm installed on their system, or KK to have an npm binary embedded. Moreover, this will download unnecessary development dependencies of the extension.

NPM’s API https://registry.npmjs.org/{package-name}/{version} provides a link to the tarball .tgz file of the package. This is what we will use to download the extension. We can set version to latest to get the latest version of the package.

Manual

Manual mode is used to develop an extension locally.

There are two directories for extensions, one of them is for developing extensions, the other is for extensions installed from store.

Extensions installed from Tarball files/urls are also installed in the development extension directory.

Under settings page, developer tab, you can set the dev extension path. Extensions placed in this directory will be loaded as development extensions.

  • Directorydev-extensions
    • Directoryext-qrcode
      • package.json
      • dist
    • Directoryext-jwt
      • package.json
      • dist

Under settings/developer page, you can also drag and drop a tarball file to install an extension.

The tarball has to be produced by npm pack command.

Remote Extension

Under settings/developer page, you can also enter a URL of a website that hosts the extension.

For example, you can use it for local development. Add a remote extension with URL: http://localhost:5173 to load your local extension through dev server with hot reload.

Theoretically you could even add any website as a remote extension (e.g. https://google.com), but it is not recommended for security and privary concerns. The website could potentially run malicious code in Kunkun.

Limited permissions are granted to remote extensions. They cannot access file system or clipboard, but it’s still possible to leak information if you are using a non-localhost remote extension.