Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/clavier
Quickly run CLI commands by pressing a key
https://github.com/hughsk/clavier
Last synced: 8 days ago
JSON representation
Quickly run CLI commands by pressing a key
- Host: GitHub
- URL: https://github.com/hughsk/clavier
- Owner: hughsk
- License: other
- Created: 2013-01-18T02:14:27.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-18T02:14:41.000Z (almost 12 years ago)
- Last Synced: 2024-04-26T17:09:01.408Z (7 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# clavier #
Sick of pressing CTRL+C, UP, UP, ENTER? Spawn processes with a single key
press, and shave milliseconds off your day.## Installation ##
``` bash
$ [sudo] npm install -g clavier
```## Usage ##
```
Usage: clavier -[key] 'command'
Runs commands on specific keypresses.Example:
clavier -q "echo hello" -Q "echo world"Will run "echo hello" when you press Q,
and "echo world" when pressing SHIFT+Q.Options:
--debounce Minimum time between spawning the same process again (seconds).
--verbose Verbose logging.
--restart Kill any processes already running, per-key.
--timeout Kill any processes if they're still alive after X seconds.
--prespawn Spawn each process on startup.
```Each single-character flag you pass represents the key binding, and their value
the command to run. This command will restart your Node server on pressing `r`:``` bash
$ clavier -r 'node app.js' --restart --prespawn
```