Skip to main content
Backend card methods control how LynxHub runs your CLI processes, reads saved arguments from disk files, and handles uninstallation cleanups.

Execution commands

  • Method: getRunCommands(): Promise<string | string[]>
  • Responsibility: Invoked when the user clicks the card launch button. It must return a terminal command string (or array of strings) to execute in the pseudo-terminal.

Example


Arguments cache

If you prefer to cache argument configurations in a local config file rather than standard database storage, implement the argument cache methods:
  • Methods: readArgs(): Promise<ChosenArgument[]> and saveArgs(args: ChosenArgument[]): Promise<void>
  • Responsibility: Reads configuration parameters from disk files, and saves chosen settings back to the configuration files.

Example


Custom IPC listeners

  • Method: mainIpc(): void
  • Responsibility: Invoked during application IPC configuration. Use this to bind message handlers between frontend pages and backend modules.

Example


Lifecycle events

Implement lifecycle state checks to tell the host app if card files exist, if updates are available, or to clean up files on removal:
  • isInstalled(): Promise<boolean> - Check if files are located in the installation folder.
  • updateAvailable(): Promise<boolean> - Checks if a Git pull is available in the installation folder.
  • uninstall(): Promise<void> - Runs file removals, deletes dependencies, and clears cache on card deletion.

Example

Last modified on June 21, 2026