Skip to main content

Getting Started

txikia (Basque): small, tiny.

txiki.js is a small and powerful JavaScript runtime. It targets state-of-the-art ECMAScript and aims to be WinterTC compliant.

It's built on the shoulders of giants: it uses QuickJS-ng as its JavaScript engine and libuv as the platform layer.

Installation

Homebrew (macOS and Linux)

brew install saghul/tap/txikijs

WinGet (Windows)

winget install Saghul.TxikiJS

Scoop (Windows)

scoop install txikijs

Prebuilt binaries

Prebuilt binaries are available for macOS and Windows from the GitHub Releases page:

PlatformArchitecture
macOSarm64, x86_64
Windowsx86_64

Download the zip for your platform, extract it, and add the tjs binary to your PATH.

mise (per-project)

Pin a txiki.js version per project and run it without a system-wide install:

mise use "github:saghul/txiki.js[exe=tjs]"

See Using with mise for details.

Build from source

On Linux (and other Unixes), you'll need to build from source.

Quick start

Once tjs is on your PATH, try evaluating an expression:

tjs eval "console.log('hello world')"

Run a script with tjs run:

echo "console.log('hello from a file')" > hello.js
tjs run hello.js

Or start the interactive REPL by running tjs with no arguments:

tjs

Explore all the subcommands and options:

tjs --help

See the CLI Reference for the full list of subcommands, options, and environment variables.

If you built from source instead of installing a package, invoke the binary as ./build/tjs and try the bundled scripts, e.g. ./build/tjs run examples/hello_world.js.

Supported platforms

  • GNU/Linux
  • macOS
  • Windows
  • Other Unixes (please test!)

What's included

txiki.js comes with a rich set of features out of the box:

See the API Reference for the full documentation.