Search Google or DuckDuckGo directly in your terminal finely grained based on what you like. Customize the sites you want results from and more.
To get S up and running, you first need to install all dependencies:
yarn install
Then, running 2 simple commands is all you need.
yarn build
yarn setup
If you get permission issues running yarn setup
try running it with sudo as sudo yarn setup
After installing S, to use it all you need to do is type s [your query]
in your terminal. For example:
s hello world nodejs
This will get results for "hello world nodejs" based on the config.json and display them in your terminal.
Although there is a controls output that tells you the movements, here is what you would need to know just in case.
j
- Move down a result
k
- Move up a result
n
- Move to the next page of results
p
- Move to the previous page of results
return
or space
- Open the link in your default browser
q
or esc
- Quit the program
This package comes with a default config.json file that will be located at /etc/s/config.json once installed. You can edit this file to better suit your needs. The config has 4 sections that are customizable.
sites
- An array of strings that your results will be based on
results
- A number for the amount of results you want
itemsPerPage
- A number for the number of items you want shown on each page
searchEngine
- Either google
or duckduckgo
An example config for Google would look like this:
{
"sites": [
"stackoverflow.com",
"stackexchange.com"
],
"results": 30,
"itemsPerPage": 5,
"searchEngine": "google"
}
See config.json for an example.