new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Bun · Package manager · all subjects

bunx

10 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

bunx command alias

bunx is an alias for bun x. The bunx CLI is auto-installed when you install bun.

bunx purpose and speed

Use bunx to auto-install and run packages from npm. It is Bun's equivalent of npx or yarn dlx. With Bun's fast startup times, bunx is roughly 100x faster than npx for locally installed packages.

bunx package lookup behavior

bunx checks for a locally installed package first, then falls back to auto-installing it from npm. Installed packages are stored in Bun's global cache for future use.

bunx basic usage

Run packages from npm using bunx followed by the package name. Example: bunx cowsay "Hello world!"

bunx passing arguments and flags

To pass additional command-line flags and arguments through to the executable, place them after the executable name. Example: bunx my-cli --foo bar

bunx --bun flag for shebang override

By default, Bun respects shebangs. If an executable is marked with #!/usr/bin/env node, Bun spins up a node process to execute the file. To run the executable with Bun's runtime instead, pass the --bun flag. The --bun flag must occur before the executable name. Flags that appear after the name are passed through to the executable.

bunx --bun flag ordering

The --bun flag must occur before the executable name. bunx --bun my-cli is correct. bunx my-cli --bun is incorrect because the flag after the name is passed through to the executable instead.

bunx --package flag

The --package <pkg> or -p <pkg> flag runs a binary from a specific package. This is useful when the binary name differs from the package name. Examples: bunx -p renovate renovate-config-validator or bunx --package @angular/cli ng

bunx shebang for bun runtime

To force a script to always run with Bun, give it a bun shebang: #!/usr/bin/env bun

bunx with bun shebang example

A file with #!/usr/bin/env bun as its shebang will execute with Bun's runtime when run via bunx.

Give your agent this brain