PM2 utilities for Raycast Extensions
npm i raycast-pm2
This package follows Raycast Cross-Extension Conventions.
The extension API command is disabled by default. Remember to enable it from your extension configuration before using.
import path from "node:path";
import { LaunchType, environment } from "@raycast/api";
import { runPm2Command } from "raycast-pm2";
runPm2Command(
{
command: "start",
options: {
script: path.join(environment.assetsPath, "path-to/your-script.js"),
name: "your-script",
},
},
{},
{
name: "main",
type: LaunchType.UserInitiated,
extensionName: "pm2",
ownerOrAuthorName: "litomore",
},
);
Type: "start" | "stop" | "restart" | "reload" | "delete"
Type: StartOptions | Pm2Process
Options for running the pm2.start()
,
pm2.stop()
,
pm2.restart()
,
pm2.reload()
,
and pm2.delete()
.
Type: Partial<LaunchOptions>
Optional. Options for launch the target command. It has default values for launching the PM2 extension:
name
defaults toapi
type
defaults toLaunchType.Background
extensionName
defaults topm2
ownerOrUserName
defaults tolitomore
Optional. Same as the raycast-cross-extension
's callbackOptions
.
- Raycast PM2 - Manage even run your Node.js processes through Raycast
- Raycast Cross-Extension Conventions - Defines the development approach for cross-extension in Raycast
CC0-1.0