https://github.com/cstack/explaincommand
match command-line arguments to their help text
https://github.com/cstack/explaincommand
Last synced: 20 days ago
JSON representation
match command-line arguments to their help text
- Host: GitHub
- URL: https://github.com/cstack/explaincommand
- Owner: cstack
- Created: 2022-11-14T20:53:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-15T20:44:09.000Z (over 3 years ago)
- Last Synced: 2025-03-03T08:29:19.608Z (over 1 year ago)
- Language: Ruby
- Size: 610 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Explaincommand
A tool to match command-line arguments to their help text.
Live version: https://shielded-basin-58652.herokuapp.com/
Inspired by https://github.com/idank/explainshell
## Import a man page
```
rails manpage:import\[cat\]
```
## Import a man page for a subcommand
```
rails manpage:import\[docker,build\]
```
## Run server locally
```
bundle exec rails s
```
Then visit:
http://localhost:3000/explain?cmd=ls%20-lof
Or request json results:
```
curl -H "Accept: application/json" "http://localhost:3000/explain?cmd=ls+-l"
```
## Run server in Docker
```
make build
make run
```
Then visit:
http://localhost:3000/explain?cmd=ls%20-lof
Or request json results:
```
curl -H "Accept: application/json" "http://localhost:3000/explain?cmd=ls+-l"
```
## Deploy to Heroku
```
git push heroku main
```
Visit https://shielded-basin-58652.herokuapp.com/