https://github.com/brainspec/webcmd
Run shell command through HTTP.
https://github.com/brainspec/webcmd
Last synced: 12 months ago
JSON representation
Run shell command through HTTP.
- Host: GitHub
- URL: https://github.com/brainspec/webcmd
- Owner: brainspec
- License: mit
- Created: 2012-12-12T09:59:15.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-10-16T12:20:35.000Z (over 11 years ago)
- Last Synced: 2025-06-02T09:12:31.655Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 123 KB
- Stars: 14
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Webcmd
Run shell command through HTTP.
## Installation
$ gem install webcmd
## Usage
Use `COMMAND` environment variable to specify the command to be runned and `TOKEN` to protect the HTTP endpoint, e.g.:
$ COMMAND="echo it\'s working" TOKEN="1234" webcmd
Puma 1.6.3 starting...
* Min threads: 0, max threads: 1
* Environment: production
* Listening on tcp://0.0.0.0:9292
You could run `curl` in other terminal to check whether it's working:
$ curl http://localhost:9292/\?token=1234
it's working
To list available command-line options run:
$ webcmd -h
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request