Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pulipulichen/terminal-exec
Open terminal and execute command
https://github.com/pulipulichen/terminal-exec
Last synced: 12 days ago
JSON representation
Open terminal and execute command
- Host: GitHub
- URL: https://github.com/pulipulichen/terminal-exec
- Owner: pulipulichen
- License: mit
- Created: 2019-06-01T13:31:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-29T09:22:31.000Z (over 5 years ago)
- Last Synced: 2025-01-16T09:25:52.202Z (16 days ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terminal-exec
"terminal-exec" is a Node.js module used to execute command in terminal. It is very useful when your command need interactive. For example, "sudo" need user enter password.
# Requirement
"terminal-exec" had been tested in Windows 7 (64bit) and Ubuntu 16.04 LTS (64bit) with Node.js v10.15.0.
# Install
````
npm i terminal-exec
````----
# Usage
## Windows
````js
const terminalExec = require('./index.js')
terminalExec('echo "Hello world" && pause')
````Result:
![image](https://user-images.githubusercontent.com/2345913/58757428-11d33900-853f-11e9-8267-8158c86828ea.png)
## Linux
````js
const terminalExec = require('./index.js')
terminalExec('sudo echo "Hello world" & pause')
````
Result:![anime](https://user-images.githubusercontent.com/2345913/58757490-e4d35600-853f-11e9-841d-8e8f070cf4e1.gif)
----
# Websites
- Project: https://github.com/pulipulichen/terminal-exec
- Issues: https://github.com/pulipulichen/terminal-exec/issues
- npm: https://www.npmjs.com/package/terminal-exec
- RunKit (test): https://npm.runkit.com/terminal-exec