
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@julianpoemp/node-service
Advanced tools
This NodeJS library allows to easily install and control OS services on Windows, MacOS and linux using shell commands. Uses sudo-prompt if admin privileges are needed.
This NodeJS library allows to easily install and control OS background services on Windows, MacOS and Linux using shell commands. Uses sudo-prompt to request on desktop and "sudo" only on headless servers.
The goal of this repository is to simplify the creation and management of OS services using NodeJS.
This project is in an early development stage. There may be bugs or missing features. Currently this package doesn't parse existing service config files (e.g. on Linux).
npm install plistMake sure that sudo-prompt is installed:
npm install sudo-prompt
npm install @julianpoemp/node-service
On macOS targets "plist" is needed:
npm install plist
import {initializeOSService} from 'node-service';
import {join, resolve} from 'path';
async function wait(seconds: number) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, 1000 * seconds)
});
}
async function main() {
const manager = await initializeOSService({
name: 'Hello World Service Example',
level: 'system',
slug: 'hello-world',
windows: {
pathToWinswConfig: resolve(join("data", "winsw.xml"))
}
});
console.log("UNINSTALL!");
await manager.uninstall();
if (manager.status === 'not_installed') {
console.log('Install...');
const args: string[] = [
"node"
];
await manager.install(resolve(join("demo", "src", "assets", "hello-world.js")), args, {
description: "This service just prints 'Hello world' every second.",
logging: {
enabled: true
},
linux: {
Unit: {
After: "network.target",
StartLimitIntervalSync: 0
},
Service: {
Type: "simple",
Restart: "always",
RestartSec: 5
},
Install: {
WantedBy: "multi-user.target"
}
}
});
console.log('installed!');
await manager.start();
}
while (true) {
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STAsTUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
await manager.stop();
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
console.log(`STATUS: ${manager.status}`);
await manager.updateStatus();
await wait(1);
await manager.start();
}
}
main().catch((e)=>{
console.log(e?.message ?? e);
})
FAQs
This NodeJS library allows to easily install and control OS services on Windows, MacOS and linux using shell commands. Uses sudo-prompt if admin privileges are needed.
We found that @julianpoemp/node-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.