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

Deno · Reference · all subjects

cli commands/x

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

deno x --install-alias

The --install-alias flag installs deno x as a standalone dx binary that runs with all permissions by default. You can customize the alias name with --install-alias=<name>.

deno x -p package flag

The -p or --package flag lets you specify the package separately from the binary name, allowing you to choose which binary to run when a package exposes multiple binaries. Syntax: deno x -p <package> <binary> or deno x -p <package>@<version> <binary>. This matches the npx -p <package> <binary> convention.

deno x npm package syntax

To run an npm package with deno x, use the syntax deno x npm:<package> to run the default binary, or deno x -p <package> <binary> or deno x npm:<package>/<binary> to run a specific binary when the package ships multiple binaries.

deno x jsr package syntax

To run a JSR package with deno x, use the syntax deno x jsr:@scope/package/subpath pointing at a specific export that executes when imported.

deno x caching behavior

The deno x command downloads the package to the global cache if not already cached, resolves the package's binary entry point, and executes it. The package is not added to your project's deno.json or package.json.

deno x permissions

The executed package runs with the permissions you specify using flags such as --allow-read, --allow-net, or -A for all permissions. Example: deno x --allow-read --allow-net npm:serve . or deno x -A npm:create-vite my-app

npm package bin field for deno x

npm packages expose runnable binaries through the bin field in package.json. To make your own npm package runnable with deno x, publish it with a bin entry as you would for npx.

JSR package runnable exports for deno x

JSR packages are run by pointing deno x at an export that executes when imported. To make your own JSR package runnable with deno x, expose the entry point as a module export and guard top-level side effects with import.meta.main so the module can still be imported as a library, then document the subpath users should run.

deno x example: create-vite

Example: deno x npm:create-vite my-app

deno x example: file-server

Example: deno x jsr:@std/http/file-server

deno x example: typescript

Example: deno x -p typescript tsc runs the tsc binary from the typescript package. You can pin the package version: deno x -p typescript@5 tsc

dx alias installation and usage

After running deno x --install-alias, you can use the dx command directly. Example: dx npm:create-vite my-app

Give your agent this brain