https://github.com/alittlebrighter/coach
Take your scripting game to the next level
https://github.com/alittlebrighter/coach
devops scripting
Last synced: 12 days ago
JSON representation
Take your scripting game to the next level
- Host: GitHub
- URL: https://github.com/alittlebrighter/coach
- Owner: alittlebrighter
- License: mit
- Created: 2018-08-06T17:00:17.000Z (over 7 years ago)
- Default Branch: dev
- Last Pushed: 2018-12-11T05:41:19.000Z (about 7 years ago)
- Last Synced: 2025-08-15T03:04:20.171Z (6 months ago)
- Topics: devops, scripting
- Language: Go
- Homepage: https://coach.alittlebrighter.io
- Size: 10.3 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: history.go
- License: LICENSE
Awesome Lists containing this project
README
## Coach [](http://travis-ci.org/alittlebrighter/coach)
Coach helps you maximize you and your team's performance on the command line.
### Install
`go get -u github.com/alittlebrighter/coach/cmd/coach`
To use `coach` to monitor your command line usage, add the following to your `.bashrc` file:
```
function prompt {
coach history --record "$(history 1)"
}
PROMPT_COMMAND=prompt
```
There is currently no way to track command history in any other shell (I'm open to ideas on how to resolve that).
### Usage
Once you've started a new session just continue using your terminal as you normally would and `coach` will prompt you to save frequently run commands.
```
adam@devops-1:~/$ svcName=$(journalctl --since today | grep error \
| jq .service.name); systemctl restart $svcName
'users-api' restarted
...
adam@devops-1:~/$ svcName=$(journalctl --since today | grep error \
| jq .service.name); systemctl restart $svcName
'widget-svc' restarted
...
adam@devops-1:~/$ svcName=$(journalctl --since today | grep error \
| jq .service.name); systemctl restart $svcName
'webhooks' restarted
---
This command has been used 3+ times.
`coach lib [alias] [tags] [comment...]` to save and document this command.
`coach ignore` to silence this output for this command.
adam@devops-1:~/$ coach lib prod.findAndFix prod,services,restart Finds \
any services logging errors and restarts them.
```
To add more lines you can run:
```
adam@devops-1:~/$ coach lib -e prod.findAndFix
```
and `coach` will pull up your script along with its metadata inside of the editor specified by `$EDITOR`
Just save and quit to keep your changes in `coach`.
Run `coach --help` to see other available options.
### Docs
Until I get proper documentation up for now you can use the following:
- `coach` - run `coach --help`
- `coach-grpc-server` - the `.proto` files that the gRPC service implements can be found in the `protobuf` directory. There are some comments there but further documentation will be provided once I have an interface to plug in security components.
- `coach-grpc-web` - documentation waiting on security components
### Contributing
1. Fork it
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create new Pull Request