Open a web search in your terminal.
Web search from the terminal. Just opens in your browser.
…Make sure that GOPATH and GOBIN env vars are set. Then run:
go install github.com/zquestz/s@latestAlternatively, you can use Homebrew:
brew install s-searchArch Linux users can install from the AUR:
yay -S sSearch for puppies on brave search.
s puppiesSearch for dragonflies on google.
s -p google dragonfliesSearch for a wifi router on amazon
s -p amazon wifi routerSearch for rhinos on wikipedia
s -p wikipedia rhinosSearch providers tagged "video" for muppets.
s -t video muppetsWe can do partial matching of provider and tag names. This searches Facebook for hamsters.
s -p fa hamstersOr toasters on amazon.
s -p am toastersThis searches "tech-news" tagged providers for ssd info.
s -t te ssdOr shopping sites for blankets.
s -t sh blanketsAutocompletion is supported for providers and tags. To set up autocompletion:
sudo bash -c "s --completion bash > /etc/bash_completion.d/s"sudo bash -c "s --completion bash > /usr/local/etc/bash_completion.d/s"Generate a _s completion script and put it somewhere in your $fpath:
sudo zsh -c "s --completion zsh > /usr/local/share/zsh/site-functions/_s"s --completion fish > ~/.config/fish/completions/s.fish(& s --completion powershell) | Out-String | Invoke-ExpressionSetup an alias in your .profile for your favorite providers.
alias sa="s -p amazon"
alias sw="s -p wikipedia"Use w3m to find cats instead of just your default browser.
s -b w3m catsSearch for conspiracy theories in incognito mode.
s -b "chromium --incognito" conspiracy theories
s -b "firefox --private-window" conspiracy theoriesUse a browser with spaces in its path. Quotes are only needed when passing extra flags.
s -b "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" kittens
s -b '"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --incognito' kittensSearch in a specific subreddit.
s -p reddit /r/cscareerquestions best startups.Need machine readable output for scripting? Just pass the -j flag to any of the list commands.
List all supported providers as JSON.
s -l -jList all available tags as JSON.
s --list-tags -jAdding the verbose flag includes the tags for each provider, and vice versa.
s -l -v -j
s --list-tags -v -jTo always output JSON for list commands, add json: true to your configuration file.
A web interface is also provided. Just pass the -s flag.
Start a server on port 8080 (default).
s -sStart a server with TLS on port 8443.
s -s -c /path/to/cert.pem -k /path/to/key.pem --port 8443Feel free to try it out at https://jumps.io/.
To setup your own default configuration just create ~/.config/s/config. The configuration file is in UCL format.
For more information about UCL visit: https://github.com/vstakhov/libucl
The following keys are supported:
NOTE: You must include a trailing newline in the configuration file or it may fail to parse correctly.
Set your default provider to duckduckgo:
provider: duckduckgoTo only search a few providers:
whitelist: [google, amazon, wikipedia]To exclude providers you don't need:
blacklist: [dumpert]To add a custom provider:
customProviders [
{
name: example
url: "https://example.com?q=%s"
tags: [example]
}
]Custom providers require a few things:
^[a-zA-Z0-9_]*$%s token for the query string.s is released under the MIT license.
No open issues yet, or sync has not completed.