Using txiki.js with mise
mise (mise-en-place) is a polyglot tool-version manager. Use it to
pin a specific txiki.js version per project and put tjs on your PATH — no system-wide
install, reproducible across machines and CI.
txiki.js isn't in the mise registry yet, so you install it straight from GitHub Releases via
mise's github backend. Prebuilt binaries exist for macOS (arm64 / x86_64) and
Windows (x86_64) only. On Linux and other Unixes there is no release binary — build from
source instead.
Prerequisites
Install mise — see the mise installation docs — then verify:
mise --version
Add txiki.js to a project
From your project root:
mise use "github:saghul/txiki.js[exe=tjs]"
This installs the latest release and writes a mise.toml:
[tools]
"github:saghul/txiki.js" = { version = "latest", exe = "tjs" }
github:saghul/txiki.js— fetch the binary from the project's GitHub Releases.exe = "tjs"— the release archive ships atjsbinary; this tells mise which executable to expose.
Commit mise.toml so everyone on the project gets the same runtime.
Pin a version
Reproducible builds want an exact version instead of latest:
mise use "github:saghul/txiki.js[exe=tjs]@26.6.0"
List the available versions:
mise ls-remote "github:saghul/txiki.js"
Upgrade later with mise upgrade (respects your version spec) or by editing mise.toml.
Run tjs
Run through mise:
mise exec -- tjs run app.js
mise exec -- tjs --version
Or activate mise in your shell
so tjs is on your PATH automatically inside the project directory:
tjs run app.js
Define project tasks
mise doubles as a task runner, handy for wiring scripts to the pinned runtime:
[tools]
"github:saghul/txiki.js" = { version = "26.6.0", exe = "tjs" }
[tasks.start]
run = "tjs run src/main.js"
[tasks.test]
run = "tjs test tests/"
description = "Run the test suite"
run task in terminal:
mise run start # or: mise start
mise run test # or: mise test
mise run # interactive TUI
CI
Install the pinned tools with one command, then run as usual:
mise install
mise exec -- tjs run app.js
Or use the official mise GitHub Action, which reads
mise.toml and puts tjs on the PATH:
- uses: jdx/mise-action@v2
- run: tjs run app.js
Older versions of txiki.js (<26.5.0)
To use txiki.js 26.5.0 or earlier, use mise's you will see in the terminal:ubi backend instead:
mise use "ubi:saghul/txiki.js[exe=tjs]@26.5.0" — which force-marks the binary executable.
Note that ubi is deprecated in mise (slated for removal in 2027.1.0).See example of
mise.toml file