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:
| Platform | Architecture |
|---|---|
| macOS | arm64, x86_64 |
| Windows | x86_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
txiki.js can be built from source on GNU/Linux, macOS, Windows, and other Unixes.
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/tjsand 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:
- Web Platform APIs —
fetch,WebSocket,Console,setTimeout,Crypto, Web Workers, and more - Runtime Features — TCP/UDP sockets, file I/O, child processes, signal handling, DNS
- Standard Library —
tjs:sqlite,tjs:ffi,tjs:path,tjs:hashing, and more - HTTP Server — high-performance HTTP server with WebSocket support
- Standalone Executables — compile your scripts into self-contained binaries
See the API Reference for the full documentation.