dax

May 2, 2026 ยท View on GitHub

JSR npm Version

dax logo

Cross-platform shell tools for Deno and Node.js inspired by zx.

Docs

import $ from "dax";

// run a command
await $`echo 5`; // outputs: 5

// capture output
const branch = await $`git rev-parse --abbrev-ref HEAD`.text();

// make a request
const data = await $.request("https://plugins.dprint.dev/info.json").json();

// prompt for input
const name = await $.prompt("What's your name?");

Differences with zx

  1. Cross-platform shell.
    • Makes more code work on Windows.
    • Allows exporting the shell's environment to the current process.
    • Uses deno_task_shell's parser.
    • Has common commands built-in for better Windows support.
  2. Minimal globals or global configuration.
    • Only a default instance of $, but it's not mandatory to use this.
  3. No custom CLI.
  4. Good for application code in addition to use as a shell script replacement.
  5. Named after my cat.