Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denorg/dpx
📦 CLI to run a Deno package without installing it (like npx for Deno)
https://github.com/denorg/dpx
cli deno denoland denorg npx typescript
Last synced: 4 months ago
JSON representation
📦 CLI to run a Deno package without installing it (like npx for Deno)
- Host: GitHub
- URL: https://github.com/denorg/dpx
- Owner: denorg
- License: mit
- Created: 2020-05-23T09:54:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T20:51:19.000Z (over 4 years ago)
- Last Synced: 2024-09-30T18:41:31.074Z (4 months ago)
- Topics: cli, deno, denoland, denorg, npx, typescript
- Language: TypeScript
- Homepage: https://denorg.github.io/dpx/
- Size: 33.2 KB
- Stars: 57
- Watchers: 8
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - dpx
README
# 📦 DPX
`dpx` is like `npx` for Deno, easily run a Deno CLI package.
[![Deno CI](https://github.com/denorg/dpx/workflows/Deno%20CI/badge.svg)](https://github.com/denorg/dpx/actions)
[![GitHub](https://img.shields.io/github/license/denorg/dpx)](https://github.com/denorg/dpx/blob/master/LICENSE)
[![Contributors](https://img.shields.io/github/contributors/denorg/dpx)](https://github.com/denorg/dpx/graphs/contributors)
[![Deno Starter](https://img.shields.io/badge/deno-starter-brightgreen)](https://denorg.github.io/starter/)
[![Made by Denorg](https://img.shields.io/badge/made%20by-denorg-0082fb)](https://github.com/denorg)
[![TypeScript](https://img.shields.io/badge/types-TypeScript-blue)](https://github.com/denorg/dpx)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)Install DPX globally using:
```bash
deno install --allow-run --allow-net -n dpx https://deno.land/x/dpx/cli.ts
```Then, the package is available to run:
```bash
dpx
```Under the hood, the CLI finds the file to run (`cli.ts` or `mod.ts`) from the Deno registry and runs it.
## 💡 Examples
If you want to run the package `online` (which tells you whether you are online), you can run:
```bash
dpx online --allow-net # You are online
```Similarly, if you want to check whether a website is up, you can use the `up` package:
```bash
dpx up --allow-net https://google.com # https://google.com is up
```Required permissions:
1. `--allow-net`
2. `--allow-run`## ⭐ API
You can use this package by importing it:
```ts
import { dpx } from "https://deno.land/x/dpx/mod.ts";const result = dpx("packageName", ["--flags"], ["args"]);
```Alternatively, you can use it directly from the CLI by using deno run:
```bash
deno run --allow-read --allow-run https://deno.land/x/dpx/cli.ts
```## 👩💻 Development
Run tests:
```bash
deno test --allow-read
```## 📄 License
MIT © [Denorg](https://den.org.in)
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us →