Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zephraph/deno.run
A tiny Deno development sandbox for quickly building small CLI utilities
https://github.com/zephraph/deno.run
cli deno tooling utility
Last synced: 8 days ago
JSON representation
A tiny Deno development sandbox for quickly building small CLI utilities
- Host: GitHub
- URL: https://github.com/zephraph/deno.run
- Owner: zephraph
- License: mit
- Created: 2022-10-19T01:27:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-05T15:14:05.000Z (10 months ago)
- Last Synced: 2024-10-14T04:09:12.316Z (23 days ago)
- Topics: cli, deno, tooling, utility
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno.run
A tiny [Deno](https://deno.land/) development sandbox for quickly building small CLI utilities.
## Instructions
- Clone the repo
- [Install Deno](https://deno.land/#installation)
- Add the `.run` directory to your path
- Run `dr`
- Make cool things!## Included scripts
## `dr`
Adds bash script runners for every `.ts` file in the root of the repo to `.run` for quick execution.
You can add permissions for individual scripts by adding a comment with `//` at the beginning of the file
and including the exact flags you'd like to pass to deno like `--allow-read`## `js`
Handle piped text with JavaScript!
### Reverse the text of every piped line
```bash
ls | js ".split('').reverse().join('')"
```### Reformat input
```bash
ls | js "x => `- \${x}`"
```### Filter by extension
```bash
ls | js ".endsWith('.ts')"
``````bash
ls | js "x => !x.endsWith('.ts')"
```## chat-gpt
Takes a piped string and shuttles it off to OpenAI's chat completion API with a prompt to return results as markdown. Results
are printed to stdout.```bash
"Say hello!" | chat-gpt
``````
Hello! How may I assist you today?
```