Skip to content

@prozilla-os/cli ​

About ​

@prozilla-os/cli is a NodeJS wrapper for Posh (ProzillaOS shell), a Bash-like shell emulator.

Installation ​

sh
npm install -g @prozilla-os/cli
yarn global add @prozilla-os/cli
pnpm add -g @prozilla-os/cli

Use Posh as your default shell ​

  1. Verify your installation:

    sh
    which posh
  2. Add Posh to your authorized shell list (/etc/shells).

  3. Make it your default shell:

    sh
    chsh -s $(which posh)
  4. Restart your computer for the changes to take effect.

  5. Check your current shell:

    sh
    echo $SHELL

    This should print posh.

Usage ​

Command line interface ​

Interactive mode ​

sh
posh

Single command ​

sh
posh -c help

Shell script ​

sh
#!/usr/bin/env posh

echo "Hello, world!"

Node module ​

ts
import { HeadlessShell } from "@prozilla-os/cli";

const shell = new HeadlessShell();
const exitCode = await shell.start("help");
process.exit(exitCode);

Built by Prozilla