https://github.com/jlchntoz/essh
Yet another shell attempts to be written on and with JavaScript.
https://github.com/jlchntoz/essh
javascript nodejs shell typescript
Last synced: 5 months ago
JSON representation
Yet another shell attempts to be written on and with JavaScript.
- Host: GitHub
- URL: https://github.com/jlchntoz/essh
- Owner: JLChnToZ
- License: mit
- Created: 2019-12-14T09:54:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-15T05:52:32.000Z (over 4 years ago)
- Last Synced: 2025-06-07T07:02:18.046Z (about 1 year ago)
- Topics: javascript, nodejs, shell, typescript
- Language: TypeScript
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESSH (Temporary Name)
An attempt on writting a shell based on Node.js REPL.
This is just a prototype, but you may try out.
## Usage
Everything inside this shell is written in JavaScript.
You may extend/use it just like you are using javascript.
But there has some extensions built-in this shell:
Navigating through files and getting its contents:
```javascript
// Print out the contents Something.txt at the parent directory.
console.log(_['..']['Something.txt'][$data].toString('utf8'))
```
Writing contents into file:
```javascript
_.newfile[$data] = 'The text that overrites this file.'
```
Executing an executable:
```javascript
// Launch cmd on Windows. (Does not work on *nix)
_C.Windows.System32['cmd.exe']('/c', 'help') // This will return everything output (as buffers), you may use a variable to store it.
```
Moving a file:
```javascript
// Move a file inside Subdir to user's home driectory.
_home.NewFile = _.SubDir.OldFile
```
Delete a file:
```javascript
// Delete Rubbish.tmp at *nix root directory. (_root does not work on windows)
delete _root['Rubbish.tmp']
```
Change current working directory:
```javascript
// Change current working directory to root.
_ = _root;
```
WIP
## License
MIT