Giter Site home page Giter Site logo

denorg / dpx Goto Github PK

View Code? Open in Web Editor NEW
54.0 8.0 3.0 34 KB

๐Ÿ“ฆ CLI to run a Deno package without installing it (like npx for Deno)

Home Page: https://denorg.github.io/dpx/

License: MIT License

TypeScript 100.00%
cli npx deno denoland denorg typescript

dpx's Introduction

๐Ÿ“ฆ DPX

dpx is like npx for Deno, easily run a Deno CLI package.

Deno CI GitHub Contributors Deno Starter Made by Denorg TypeScript semantic-release

Install DPX globally using:

deno install --allow-run --allow-net -n dpx https://deno.land/x/dpx/cli.ts

Then, the package is available to run:

dpx <packageName> <flags> <arguments>

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:

dpx online --allow-net # You are online

Similarly, if you want to check whether a website is up, you can use the up package:

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:

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:

deno run --allow-read --allow-run https://deno.land/x/dpx/cli.ts <flags> <packageName> <arguments>

๐Ÿ‘ฉโ€๐Ÿ’ป Development

Run tests:

deno test --allow-read

๐Ÿ“„ License

MIT ยฉ Denorg

A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us โ†’

dpx's People

Contributors

anandchowdhary avatar fakoua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dpx's Issues

Question / Potential Feature Request: Does it make sense to have something like that for pm2 features?

These things are still somehow abstract for me - so sorry if it is a not so valuable question / remark.

What I'm looking for is being able to write something like
pm2 start https://deno.land/x/.../app.ts --interpreter="deno" --interpreter-args="run --allow-net"

instead of cloning things onto my server and then writing something like
pm2 start app.ts --interpreter="deno" --interpreter-args="run --allow-net"

From my perspective this seems similar like dpx - and brings in the "process manager" features...

I also raised this via the following issue but this seemed to be the wrong place:
denoland/deno#7137

add dpx inside Trex

I am making a dependency manager for deno based on import_map, it also has the functionality to install tools like commands or velociraptor

is there a problem with adding dpx to the list of tools that can be installed?

this is my tool Trex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.