Go around uses the stackoverflow API to get the answers for the given query and display them in terminal.
Download the latest binary corresponding to your platform from releases page
./goaround search "<your query>"
./goaround search "Python upper case a string"
export STACKOVERFLOW_APP_KEY="<your app key>"
export STACKOVERFLOW_PAGE_SIZE=50
./goaround search "<your query>"
export STACKOVERFLOW_APP_KEY="<your app key>"
export STACKOVERFLOW_PAGE_SIZE=50
./goaround search "Python upper case a string"
To get more accurate results you can pass the tags as comma separated values, results containing at least one of the tags will be shown
./goaround search "<your query>" -t "<comma seperated values>"
./goaround search "Python upper case a string" -t "python,python3"
goaround
can be used to capture the Stderr
of other porgrams and query the stackoverflow API with the erorr generated and display the results.
./goaround command "<your command>"
./goaround command "go run main.go"
./goaround command "python main.py"
Few things to note while using goaround
as wrapper:
- Stdout of the command will be displayed in the terminal in real time
- Only the error pushed to
Stderr
will be used to query the stackoverflow API
- In questions screen use the Mouse Scroll or Arrow Keys to go up and down
- Use the Enter key to open the answer
- Use the Backspace key to go back from answers to the questions screen
- Use the
Ctrl + c
key to exit the application - Hot keys with special function in each screen will be displayed on the bottom of the screen
Following environment can be used to configure the tool.
Name | Required | Default | Description |
---|---|---|---|
STACKOVERFLOW_APP_KEY | No | - | There is a limit on the number of calls that can be made to the stackoverflow api, by default 300 requests can be made per day, by providing API key this can be increased to 10000 requests per day. App can be registered here to get the App key |
STACKOVERFLOW_PAGE_SIZE | No | 25 | Number of questions displayed in the terminal. By default its 25 and can be set upto 100 |
Following Features are planned to be added in the future but any help is welcome!
- Make results more accurate and relevant
- Provide button to copy the code from the answers to the clipboard