Skip to main content
Home

Built and signed on GitHub Actions

The sudo-cli module provides a simple way to execute sudo commands.

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
a year ago (0.0.0)

@gnome/sudo-cli

logo Work less. Do more.

Overview

The sudo-cli module provides a simple way to execute sudo commands.

The module relies upon the @gnome/exec module and has the same basic usage as the Command and ShellCommand class.

Basic Usage

import { sudo } from "@gnome/sudo-cli";
 
const result = sudo("--version");
console.log(result.code);
console.log(result.text());

MIT License

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@gnome/sudo-cli

Import symbol

import * as sudo_cli from "@gnome/sudo-cli";
or

Import directly with a jsr specifier

import * as sudo_cli from "jsr:@gnome/sudo-cli";

Add Package

pnpm i jsr:@gnome/sudo-cli
or (using pnpm 10.8 or older)
pnpm dlx jsr add @gnome/sudo-cli

Import symbol

import * as sudo_cli from "@gnome/sudo-cli";

Add Package

yarn add jsr:@gnome/sudo-cli
or (using Yarn 4.8 or older)
yarn dlx jsr add @gnome/sudo-cli

Import symbol

import * as sudo_cli from "@gnome/sudo-cli";

Add Package

vlt install jsr:@gnome/sudo-cli

Import symbol

import * as sudo_cli from "@gnome/sudo-cli";

Add Package

npx jsr add @gnome/sudo-cli

Import symbol

import * as sudo_cli from "@gnome/sudo-cli";

Add Package

bunx jsr add @gnome/sudo-cli

Import symbol

import * as sudo_cli from "@gnome/sudo-cli";