Installation

Tish can be used as a local npm package, global npm binary, native brew binary or as individual cargo crates.

Prerequisites

For rust native backends rust and cargo are required

  • Rust 1.75+ (rustup) — only when you need to:

Install as a package

Install via npm

Add the published CLI package to a Node project (requires Node 22+):

npm install @tishlang/tish

Install via bun

Add the published CLI package to a Bun project

bun add @tishlang/tish

Install via yarn

Add the published CLI package to a Bun project

yarn add @tishlang/tish

Run without installing into a project:

The tish command is available via npx tish or ./node_modules/.bin/tish.

npx @tishlang/tish run hello.tish
npx @tishlang/tish build hello.tish -o hello

Run from stdin (piped input)

Same idea as node - or piping to bun: you can execute Tish source from stdin.

  • echo '…' | tish — If stdin is not a TTY (piped or redirected), read the whole program and run it once (default VM backend).
  • echo '…' | tish - — Same; - is handled before the normal CLI parser (so it is not mistaken for a subcommand).
  • echo '…' | tish run - — Explicit stdin; empty stdin is an error.
  • tish with no args in an interactive terminal — Starts the REPL, not stdin execution.

Relative import paths from stdin are resolved from the current working directory, like a file in that folder.

echo "console.log('what')" | tish
echo "console.log('the')" | tish -
echo "console.log('tish')" | tish run -
 
npx @tishlang/tish run -
# pipe or heredoc into the same patterns with npx

Use tish run --backend interp - (or the same with npx @tishlang/tish) when you want the interpreter instead of the VM.

Scaffold a new app:

npx @tishlang/create-tish-app my-app
# or: npx create-tish-app my-app
cd my-app && npx @tishlang/tish run src/main.tish

Install via Homebrew (macOS and Linux)

Install the CLI from the project tap:

brew tap tishlang/tish https://github.com/tishlang/tish
brew install tish

Build from source (compiler/runtime)

Clone the tish repository — Rust required:

git clone https://github.com/tishlang/tish.git
cd tish
cargo build --release -p tishlang

The binary is at target/release/tish.

Verify installation

tish --help
tish -V

Improve this documentation