Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joaomoreno/deemon
Run a process in the background and attach to it
https://github.com/joaomoreno/deemon
Last synced: 29 days ago
JSON representation
Run a process in the background and attach to it
- Host: GitHub
- URL: https://github.com/joaomoreno/deemon
- Owner: joaomoreno
- License: mit
- Created: 2020-04-16T08:40:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-15T08:47:29.000Z (about 2 years ago)
- Last Synced: 2024-11-07T09:42:50.609Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 28.3 KB
- Stars: 59
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - deemon
README
# deemon
[![npm version](https://badge.fury.io/js/deemon.svg)](https://badge.fury.io/js/deemon)
Utility to run a process in the background and attach to it
## Usage
```
npx deemon COMMAND [ARGS]
```## Example
[![asciicast](https://asciinema.org/a/oinexj5mqxxqhMieBbUW5WuXV.svg)](https://asciinema.org/a/oinexj5mqxxqhMieBbUW5WuXV)
```
npx deemon /bin/bash -c "while true; do date; sleep 1; done"
```Ctrl C will stop the current session and leave the process running in the background. Simply run the same command again to attach to it:
```
npx deemon /bin/bash -c "while true; do date; sleep 1; done"
```Ctrl D will stop the current session and the background process. You can also simply kill the background process with the `--kill` flag:
```
npx deemon --kill /bin/bash -c "while true; do date; sleep 1; done"
```Or you can force a restart of the background process and attach to that with the `--restart` flag:
```
npx deemon --restart /bin/bash -c "while true; do date; sleep 1; done"
```