Skip to content

A tiny Deno development sandbox for quickly building small CLI utilities

License

Notifications You must be signed in to change notification settings

zephraph/deno.run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno.run

A tiny Deno development sandbox for quickly building small CLI utilities.

Instructions

  • Clone the repo
  • Install Deno
  • 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

ls | js ".split('').reverse().join('')"

Reformat input

ls | js "x => `- \${x}`"

Filter by extension

ls | js ".endsWith('.ts')"
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.

"Say hello!" | chat-gpt
Hello! How may I assist you today?

About

A tiny Deno development sandbox for quickly building small CLI utilities

Topics

Resources

License

Stars

Watchers

Forks