@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/cliUse Posh as your default shell
Verify your installation:
shwhich poshAdd Posh to your authorized shell list (
/etc/shells).Make it your default shell:
shchsh -s $(which posh)Restart your computer for the changes to take effect.
Check your current shell:
shecho $SHELLThis should print
posh.
Usage
Command line interface
Interactive mode
sh
poshSingle command
sh
posh -c helpShell 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);