zx CLI

zx is a JavaScript scripting CLI that escapes external-command arguments and combines their results through asynchronous calls.

  • 45,844 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Extended access

Why this level

  • Scripts execute external commands under the user account and can modify accessible files.
All reasons and checks

google/zx

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/zx

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Scripts execute external commands under the user account and can modify accessible files.

This is third-party code. Review the repository files before installing.

What it does

zx is a CLI and JavaScript library for shell automation. Asynchronous command calls return results that can be stored or combined with independent operations. Its child-process wrapper escapes interpolated arguments. The CLI runs the script as a file, allowing an agent to prepare automation in a familiar language and inspect it before execution. Multiple JavaScript runtimes and both ESM and CommonJS are supported.

Who it is for. JavaScript developers writing multi-step maintenance scripts that call external commands.

Good fit when

  • A script has grown to include conditions and asynchronous operations.
  • A branch name or path containing spaces must become a command argument.
  • Independent checks can run in parallel and their results be collected.
  • The team wants maintenance automation beside its JavaScript project.

Not a fit when

  • The target cannot run a supported JavaScript runtime.
  • One command is sufficient without variables, branching or result handling.
  • The script cannot be reviewed before receiving access to work data.

Example request

Prepare a zx script that runs two independent project checks and collects their results. Show the file before executing it.

Limitations

Execution needs a supported JavaScript runtime and Bash or PowerShell; install external commands separately. Argument escaping preserves argument boundaries, but scripts still run with the user’s file access and permissions without isolation. Moving to another OS requires accounting for its available programs and shell syntax. Google hosts the repository, but zx is not an officially supported Google product.

How to disable. Remove zx from project dependencies or uninstall it with the package manager. Stop active scripts separately.

FAQ

Can I use async/await?

Yes. `await` waits for a command, while `Promise.all` combines independent operations. Run commands concurrently only when their access to shared files will not interfere.

Why escape arguments?

A branch name or a path containing spaces should reach the external program as one argument. The wrapper preserves that value’s boundaries; it does not change the command’s permissions or effects.

Does zx work on Windows?

Yes. Windows is supported. Choose Bash or PowerShell and use commands installed on that system.

Is Node.js mandatory?

No. Bun, Deno and GraalVM Node.js are also listed. Check the documented runtime version.

Can I use TypeScript?

Yes. In the [TypeScript guide](https://google.github.io/zx/typescript), select the tab for your runtime. It contains commands for preparing and running the file.

Discussion

No questions or reviews yet.

CLI tools
Russian stack

OneScript is a CLI for automation in the 1C language, running scripts outside the platform and adding packages through opm.

CLIBroad access590Repository stars

Orchestrator for Claude Code, Codex and Gemini CLI: YAML workflows that loop until your own quality gates pass

CLIBroad access334Repository stars

A plugin and CLI catalog for agents: generates command-line interfaces for GUI apps like GIMP and Blender and installs ready ones via CLI-Hub

PluginBroad access58.7KRepository stars

A CLI launcher for agents: it finds a command among skills, runs it and returns one JSON envelope with clear exit codes.

CLIBroad access57Repository stars

Skills and hooks for building n8n workflows through the n8n-mcp server: expressions, nodes, validation, AI agents, self-hosting

PluginBroad access6.6KRepository stars

WelsonJS MCP server: an agent runs JScript on Windows and drives windows, Office and COM objects.

MCP serverBroad access514Repository stars

README in short

Examples capture Git output and pass a variable to another program. [zx@lite](https://google.github.io/zx/lite) contains the library’s core functions without the CLI, embedded documentation or manual pages.

README badge

Report a problem