MCPcopy
hub / github.com/google/zx

github.com/google/zx @8.8.5 sqlite

repository ↗ · DeepWiki ↗ · release 8.8.5 ↗
203 symbols 586 edges 68 files 10 documented · 5%
README

Zx logo zx

#!/usr/bin/env zx

await $`cat package.json | grep name`

const branch = await $`git branch --show-current`
await $`dep deploy --branch=${branch}`

await Promise.all([
  $`sleep 1; echo 1`,
  $`sleep 2; echo 2`,
  $`sleep 3; echo 3`,
])

const name = 'foo bar'
await $`mkdir /tmp/${name}`

Bash is great, but when it comes to writing more complex scripts, many people prefer a more convenient programming language. JavaScript is a perfect choice, but the Node.js standard library requires additional hassle before using. No compromise, take the best of both. The zx package provides useful cross-platform wrappers around child_process, escapes arguments and gives sensible defaults.

Install

npm install zx

All setup options: zx/setup. See also zx@lite.

Usage

Compatibility

License

Apache-2.0

Disclaimer: This is not an officially supported Google product.

Extension points exported contracts — how you extend this code

Options (Interface)
(no doc)
src/core.ts
YAML (Interface)
(no doc)
src/vendor-extra.ts
Opts (Interface)
(no doc)
src/vendor-extra.ts
ParsedArgs (Interface)
(no doc)
src/vendor-extra.ts

Core symbols most depended-on inside this repo

ok
called by 90
src/core.ts
toString
called by 66
src/core.ts
within
called by 28
src/core.ts
parseDuration
called by 15
src/util.ts
parse
called by 14
src/vendor-extra.ts
tempfile
called by 14
src/goods.ts
cd
called by 12
src/log.ts
get
called by 11
src/core.ts

Shape

Function 151
Method 41
Class 7
Interface 4

Languages

TypeScript100%

Modules by API surface

src/core.ts67 symbols
src/util.ts18 symbols
src/goods.ts16 symbols
src/vendor-extra.ts15 symbols
src/cli.ts14 symbols
src/log.ts12 symbols
test/core.test.js9 symbols
test/bench/buf-join.mjs9 symbols
src/error.ts9 symbols
test/goods.test.ts7 symbols
scripts/build-js.mjs6 symbols
src/internals.ts4 symbols

Dependencies from manifests, versioned

@commitlint/cli20.1.0 · 1×
@commitlint/config-conventional20.0.0 · 1×
@size-limit/file11.2.0 · 1×
@types/fs-extra11.0.4 · 1×
@types/minimist1.2.5 · 1×
@types/node24.7.2 · 1×
@types/which3.0.4 · 1×
@webpod/ingrid1.1.1 · 1×
@webpod/ps1.0.0 · 1×
c810.1.3 · 1×
chalk5.6.2 · 1×
create-require1.1.1 · 1×

For agents

$ claude mcp add zx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact