Skip to main content
Home

@gnome/bash@0.0.1
Built and signed on GitHub Actions

The bash module provides a simple way to execute bash scripts or files.

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.1)

The bash module provides a simple way to execute PowerShell Core scripts using the bash shell.

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

Basic Usage

import { bash } from "@gnome/bash";

const cmd = await bash("echo 'Hello, World!'", {
        stdout: 'piped',
        stderr: 'piped'
   });
console.log(await cmd.text());
console.log(cmd.code);

console.log(await bash("echo 'Hello, World!'").text());

console.log(await bash("test.sh").text());

// runs bash command and writes directly to console
await bash("echo 'I am alive'").run();
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/bash

Import symbol

import * as bash from "@gnome/bash";
or

Import directly with a jsr specifier

import * as bash from "jsr:@gnome/bash";

Add Package

pnpm i jsr:@gnome/bash
or (using pnpm 10.8 or older)
pnpm dlx jsr add @gnome/bash

Import symbol

import * as bash from "@gnome/bash";

Add Package

yarn add jsr:@gnome/bash
or (using Yarn 4.8 or older)
yarn dlx jsr add @gnome/bash

Import symbol

import * as bash from "@gnome/bash";

Add Package

vlt install jsr:@gnome/bash

Import symbol

import * as bash from "@gnome/bash";

Add Package

npx jsr add @gnome/bash

Import symbol

import * as bash from "@gnome/bash";

Add Package

bunx jsr add @gnome/bash

Import symbol

import * as bash from "@gnome/bash";