Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nxy7/denosh
https://github.com/nxy7/denosh
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/nxy7/denosh
- Owner: nxy7
- Created: 2024-07-03T14:53:05.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-03T16:41:53.000Z (6 months ago)
- Last Synced: 2024-12-03T09:54:18.110Z (about 1 month ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deno Shell
Deno Shell is a experimental TypeScript shell that's very thin layer on top of Deno.
DenoSH scripts is superset of TypeScript so any typescript code should work just fine.# Features
- [ ] first class executables
- [ ] piping function output into variables# Areas to explore
- structured output
- concurrency (execute binaries with something like `await Promise.all([$(echo one), $(echo two)])`)
- queue command while another command is running# Non goals
- performance (who cares - it's shell)
# Syntax rules
- ?
# Examples (not implemented)
### Saving output of command
```js
let x = $(echo test message);
console.log(x); // outputs `test message`
```### Parallelize execution
```js
const results = await Promise.all([$(sleep 10), $(sleep 15), $(sleep 20)]);
// Will sleep for 20sec
```### JSON support
```js
let z = $(curl http://some-json.com/json);
console.log(z.nested.field); // returned json was changed into json without user action
```### String interpoloration
```js
let z = "Some string";
echo ${z}let url = "http://some-json.com/json";
curl ${url} | echo
```### Error codes?
I'd like something like this to work
```js
fallibleCommand;
// if command fails, error will be printed out
``````js
try {
fallibleCommand;
} catch (e) {
// if command fails, user has access to error inside `e` variable
// e: {code: 123, text: "error text"}
}
```# Contributing
Contributions are welcome! Please open an issue or submit a pull request.
LicenseThis project is licensed under the MIT License.