A meta-command to create a command that fetches a file or directory from a remote repository. Zero dependencies rather than the Deno runtime.
- GitHub (via
api.github.com
)
deno install --allow-read=. --allow-write=. --allow-net=api.github.com\
https://deno.land/x/hatch/gh/hatch.ts [...]
alias hatch='deno run --allow-read=. --allow-write=. --allow-net=api.github.com\
https://deno.land/x/hatch/gh/hatch.ts [...]'
Flags for permissions are omitted and URL is shortened in the following examples for readability.
$ deno install gh/hatch.ts hasundue/incubator@main/deno
# Create `README.md` in the current directory
$ hatch README.md
# Copy `.github/workflows` directory recursively into the current directory
$ hatch .github/workflows
$ deno install gh/hatch.ts hasundue/incubator
# Equivalent to `hatch README.md` in the previous example
$ hatch deno README.md
$ deno install gh/hatch.ts hasundue
# Equivalent to `hatch README.md` in the first example
$ hatch incubator/deno README.md