Skip to content

Operating System (OS)

OS is the Motanamy Electron desktop window platform. Each OS plugin runs as its own standalone window with a custom title bar and toolbar. Plugins have full control over their UI and navigate internally with their own router — completely isolated from the SA/EA host.

How Plugins Work

OS loads each installed plugin's script.js. Your script calls methods on this to configure the window frame, toolbar, translations, and page routes:

js
plugins["my-plugin"] = function () {
    this.setFrame({
        title: "Motanamy OS | My Plugin",
        icon: { type: "icon", name: "mdi mdi-puzzle-outline" }
    });

    this.addLanguage("en", "my-plugin", { name: "My Plugin" });

    this.setToolbar([
        { icon: "pi pi-cog", to: "/setting" }
    ]);

    this.addPage({
        name: "/[my-plugin]index.vue",
        path: "",
        file: ["index.vue"]
    });

    this.addPage({
        name: "/[my-plugin]setting.vue",
        path: "/setting",
        file: ["setting.vue"]
    });
}

Key Differences from EA and SA

OSSAEA
WindowOwn Electron windowEmbedded in SA hostBrowser tab
Main viewindex.vuewidget.vuewidget.vue
NavigationRoot paths ("", "/setting")/app/... paths/app/... paths
File dialogsipcRenderer from electronEventBus openFileExplorerEventBus openFileExplorer
BackendNoneNonemain.js
Databaseapi.database() (local)api.database() (local)app.database() via HTTP
RolesNoNoYes
ToolbarsetToolbar()addToToolbar()
FramesetFrame()

Tech Stack

LayerTechnology
RuntimeElectron
UI FrameworkVue 3
Component LibraryPrimeVue v3
CSS UtilitiesPrimeFlex
IconsPrimeIcons + MDI
DatabaseLocal JSON via api module
Native DialogsipcRenderer from electron

Quick Start

  1. Install Motanamy OSwget -O - https://app.motanamy.com/MotanamyOS.sh | bash
  2. Install the CLInpm install -g motanamy-cli
  3. Create the plugin folder structure (see Development Guide)
  4. Write setting.json and script.js
  5. Run mot run to link your plugin to a running OS instance

Resources