Skip to main content
Deno 2 is finally here 🎉️
Learn more

Deno Scripts 🦕

Automated installation and execution of locally scoped scripts

Installation

deno install \
  --unstable --allow-read --allow-env --allow-run \
  -n script \
  https://deno.land/x/scripts/install.ts

Usage

Create a scripts.json file in your root directory

{
  "scripts": {
    "hello": "https://deno.land/x/scripts/examples/hello.ts",
    "version": {
      "url": "https://deno.land/x/version/index.ts",
      "permissions": [
        "allow-read",
        "allow-write",
        "allow-run"
      ],
      "args": []
    }
  }
}

Install the scripts

script install

Run a script

script run hello
script run version init 0.1.0

Local Development

deno run --unstable -A --watch install.ts install
deno run --unstable -A --watch install.ts run hello

Increment version

deno run -A https://deno.land/x/version/index.ts patch