hush

package module
v0.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 49 Imported by: 0

README

hush CI Coverage Status

A simple Bourne-like shell, compatible with Wasm. Written in Go.

Getting started

Install like any other go library:

go install github.com/btwiuse/hush/cmd/hush@latest

Alternatively, import hush in your own projects:

package main

import (
    "os"
    "github.com/btwiuse/hush"
)

func main() {
    exitCode := hush.Run()
    os.Exit(exitCode)
}

Wasm compatibility

Today, Go's Web Assembly support does not include running processes. To make this possible, Hush is built with hackpad's go fork. The fork contains patches that spawn and manage processes using Node.js's APIs, similar to the Node.js file system API used upstream.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProgramOptions = []tea.ProgramOption{}

Functions

func NewRunner added in v0.4.4

func NewRunner(term *Console) *interp.Runner

Run runs the hush shell NewRunner creates an interp.Runner with all hush builtins and middleware.

func Run

func Run() int

func RunSimple added in v0.5.7

func RunSimple() int

RunSimple runs hush with the standard parser-driven prompt instead of bubbline's readline interface.

Types

type Console added in v0.4.13

type Console struct {
	Stdin          io.Reader
	Stdout, Stderr io.Writer
}

Console carries the I/O streams for builtin commands.

Directories

Path Synopsis
cat
ln
nl
ts
wc
cmd
hu command
hush command
sh command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL