zx VS deno

Compare zx vs deno and see what are their differences.

zx

A tool for writing better scripts (by google)

deno

A modern runtime for JavaScript and TypeScript. (by denoland)
Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • OPS - Build and Run Open Source Unikernels
zx deno
53 165
26,770 79,839
11.6% 1.0%
9.0 9.9
3 days ago 3 days ago
JavaScript Rust
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

zx

Posts with mentions or reviews of zx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-07.
  • Google/zx 4.3.0 release
    1 project | reddit.com/r/javascript | 16 Jan 2022
  • google/zx: write shell scripts in JavaScript
    5 projects | reddit.com/r/shell | 7 Jan 2022
  • ES2022 Preview: 10 Exciting JavaScript Language Features From 2021
    4 projects | dev.to | 30 Dec 2021
    The top-level await feature for ES modules makes it easy to use await in CLI scripts (e.g., with .mjs sources and zx), and for dynamic imports and data loading. It extends the await functionality into the module loader, which means that dependent modules will wait for async modules (with top-level await) to be loaded.
  • Node for server utilities?
    1 project | reddit.com/r/node | 20 Dec 2021
    Yeah, there's no reason not use Node for scripting work on the server. Google's zx library (https://github.com/google/zx) makes it easy to to do bash-like things using Node.js. You can get pretty fancy with promises and async/await to run things in parallel.
  • Do you ever use node without express (or an equivalent framework? ;
    2 projects | reddit.com/r/node | 28 Nov 2021
    For scripting you should have a look at: https://github.com/google/zx It's nodejs but with some nice syntax sugar for scripting.
  • Passing a dynamic value to package.json scripts
    1 project | reddit.com/r/Angular2 | 10 Nov 2021
    Umm, for any complex script configuration you can use https://github.com/google/zx other than that it depends on your environment and how are you supplying the value to the script
  • Scripting Languages of the Future
    9 projects | news.ycombinator.com | 7 Nov 2021
    This talks a bunch about the "good run" of current scripting languages, including for example JavaScript.

    But JavaScript, as an actual scripting language, has been pretty primitive but finally starting to become a real candidate for actual scripting. There's imo crufty not very great options like shelljs[1]. But adding a tagged-template string for system(), for calling things, and a little bit of standard library has made JS a much more interesting & competent scripting language. Those efforts are being done in ZX[2].

    I like the idea of the topic, exploring it. But the author feels off in a number of places.

    > What TypeScript showed is that you could join together the idea of a flexible lightweight (and optional!) type system onto an existing programming language, and do so successfully. . . .The question then is - what if you created a programming language from the start to have this kind of support?

    Personally I just don't think languages matter very much. They're very similar, by & large. They have different tooling, packaging, somewhat different looks/feels for executing code, and their standard libraries are different. But TypeScript is popular & fast at least 90% because it is JS, because it works with JS things. Arguing that we should try to recreate TypeScript apart from JS sounds like a mind blowing waste of time. Also, Deno has good integrated TypeScript support.

    On the topic of easy parallelism, JavaScript promises are imo quite easy to stitch together & use & quite available.

    One of the main issues I see with easy-parallelism is that it's too easy: there's too many cases for uncontrolled parallelism. Throwing tarn.js or other worker-pools at problems seems all too common. But one is still left stitching together each pool/stage of work. I'd like to see SEDA[3] like architectures emerge, and perhaps get added to something like ZX standard library.

    [1] https://github.com/shelljs/shelljs

    [2] https://github.com/google/zx

    [3] https://en.wikipedia.org/wiki/Staged_event-driven_architectu...

  • Underwhelmed by Bash functions? Maybe you're using them wrong. I was.
    7 projects | reddit.com/r/programming | 31 Oct 2021
  • On multisynchronicity
    2 projects | reddit.com/r/javascript | 29 Oct 2021
    A fourth twist is to take off the functional hat and instead use an obscure corner of OOP: multiple inheritance. This isn't natively supported in JS, but some libraries use the technique in the wild (e.g. zx monkeypatches Promises with a facade over the ChildProcess interface). This differs from union types because it's two things simultaneously (rather than one OR the other), and it's up to the consumer to then await it or map over the functor if it needs to, or just access properties synchronously.
  • Automation ideas with Javascript:
    2 projects | reddit.com/r/learnjavascript | 28 Oct 2021
    I haven't tried it myself, but zx looks like a really simple way to get up and running.

deno

Posts with mentions or reviews of deno. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-19.
  • An Introduction to TypeScript
    4 projects | dev.to | 19 Jan 2022
    2. Runs anywhere where JavaScript does: TypeScript code converts to JavaScript which can then be run in a browser, on Node.js or Deno, and in your apps.
  • Some ways DNS can break
    5 projects | news.ycombinator.com | 17 Jan 2022
    One recent frustration I ran into with Node's DNS is that it doesn't seem to resolve whatever.localhost to 127.0.0.1, unlike my browser.

    Not entirely sure which is doing the right thing by the spec here, but I much prefer the browser behavior, because I would really like to not have to add a hosts entry for everything I reverse proxy from Caddy for doing local HTTPS/HTTP2 development, for production parity.

    Oh, and I also found out that Node also isn't able to use the system-wide certs store (which local HTTPS in Caddy adds to) [1], so in the end even adding a hosts entry didn't work, and I had to revert to plaintext HTTP1. Deno is looking more attractive every day [2].

    Really curious to hear how other folks are doing local HTTPS/HTTP2 setups in node these days.

    [1] https://github.com/nodejs/node/issues/3159

    [2] https://github.com/denoland/deno/pull/11491

  • How to code live browser refresh in Deno
    1 project | dev.to | 15 Jan 2022
    import { serve } from "https://deno.land/std/http/server.ts"; import { dirname, fromFileUrl, join, } from "https://deno.land/std/path/mod.ts"; import { refresh } from "./mod.ts"; // Create useful file path variable for our code. const __dirname = fromFileUrl(dirname(import.meta.url)); const clientFilePath = join(__dirname, "./client.js"); const indexFilePath = join(__dirname, "./index.html"); // Construct the refresh middleware. const refreshMiddleware = refresh(); // Start a server on port `8000`. serve((req: Request) => { // Handle custom refresh middleware requests. const res = refreshMiddleware(req); if (res) { return res; } // Handle requests for the client-side refresh code. if (req.url.endsWith("client.js")) { const client = Deno.readTextFileSync(clientFilePath); return new Response(client, { headers: { "Content-Type": "application/javascript" } }); } // Handle requests for the page's HTML. const index = Deno.readTextFileSync(indexFilePath); return new Response(index, { headers: { "Content-Type": "text/html" } }); }); console.log("Listening on http://localhost:8000");
  • I don't understand the "advantage' of importing by URL in the source code.
    1 project | reddit.com/r/Deno | 14 Jan 2022
  • State of the Web: Deno
    3 projects | news.ycombinator.com | 9 Jan 2022
    Deno’s permission system is broken, you shouldn’t rely on it. Deno developers consistently ignore security issues, high priority bugs take months to fix.

    https://github.com/denoland/deno/issues/11964

    https://github.com/denoland/deno/issues/9750

    API-based access control can’t possibly work because it’s nearly impossible to predict the effect of any single permission. For example, “permission to run specific command” makes no sense without checking the integrity of the binary, controlling the environment for LD_PRELOAD-like hacks and evaluating the code of this command for possible escape hatches. If you want to isolate a program, you need to do it on the OS level.

    2 projects | dev.to | 9 Jan 2022
    Deno is a modern JavaScript runtime, competing with Node.js, that promises features like secure I/O and built-in TypeScript support. Ryan Dahl, Node.js' original creator, created Deno, building it in Rust.
  • Ask HN: Who is hiring? (January 2022)
    28 projects | news.ycombinator.com | 3 Jan 2022
    Deno Land Inc. | Head of Growth | Remote | Full-time | https://deno.com | https://deno.land

    Deno Land is a startup founded by creators of Node.js, the runtime used by millions of developers that laid the foundations for the modern web. We are continuing to innovate with our new runtime called Deno, which is already one of the most popular projects on GitHub [1].

    By repurposing web browser technology for the server software, we aim to accelarate a new generation of extreme low-latency edge applications. Our nascent commercial product [2] is cloud service for hosting software built with Deno; it is one of just a couple implementations of serverless at edge in existence. Our software is being used across the industry by companies like Slack.

    Head of Growth: https://deno.com/jobs/growth

    Apply at [email protected]

    [1] https://github.com/topics/deno

  • How good is typescript as a backend language?
    2 projects | reddit.com/r/typescript | 31 Dec 2021
    There's already such a system: Deno
  • Zsh Plugins Commit TOP
    102 projects | dev.to | 25 Dec 2021
    zeno 🥇 ⏰ 🏃‍♂️ - Fuzzy completion and utility plugin powered by Deno.
  • Announcing js-macros: Quickly prototype Rust procedural macros using JavaScript or TypeScript!
    2 projects | reddit.com/r/rust | 21 Dec 2021
    BTW, are you aware of Deno?

What are some alternatives?

When comparing zx and deno you can also consider the following projects:

ASP.NET Core - ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

typescript-language-server - TypeScript & JavaScript Language Server

shelljs - :shell: Portable Unix shell commands for Node.js

esbuild - An extremely fast JavaScript and CSS bundler and minifier

nvim-lspconfig - Quickstart configurations for the Nvim LSP client

TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

Koa - Expressive middleware for node.js using ES2017 async functions

esm.sh - A fast, global content delivery network for ES Modules.

tsdx - Zero-config CLI for TypeScript package development

xonsh - :shell: Python-powered, cross-platform, Unix-gazing shell

node - Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

swc - Rust-based platform for the Web