7 unstable releases (3 breaking)
0.4.1 | Mar 22, 2024 |
---|---|
0.4.0 | Mar 18, 2024 |
0.3.1 | Aug 8, 2023 |
0.2.3 | Aug 30, 2022 |
0.1.0 | Aug 21, 2022 |
#567 in Command line utilities
269 downloads per month
21KB
510 lines
search-cli
This is a binary crate to search the web from CLI
Usage
search [PROVIDER] WORD
search
command with provider and word. The provider is optional. if not
specified, the first provider in the configuration file is used.
Usage:
search searchword
search google searchword # provider is google
search g searchword # provider is alias
Configuration
The following command will output the configuration file path.
search config -p
Edit the output yaml path file with your favorite editor.
The following are the default settings.
version: "v1.0"
providers:
- name: google
aliases:
- g
url: "https://google.com/search?q={{ word | urlencode }}"
- name: bing
url: "https://www.bing.com/search?q={{ word | urlencode }}"
- name: duckduckgo
aliases:
- d
url: "https://duckduckgo.com/?q={{ word | urlencode }}"
Each of these settings is described below.
version
Currently fixed at "v1.0"
.
providers
An array of provider
provider
key | description |
---|---|
name | Provider Name. This is the name of the command execution. |
aliases | An array of strings. A list of aliases for the command to execute. |
url | Search URL. {{ word }} inserts the contents of the word argument. |
browser | specify a browser name(path) |
URLs are parsed using tera
.
JSON Schema
The following command outputs JSON Schema.
search jsonschema
License
Mit or Apache-2.0
Dependencies
~10–19MB
~269K SLoC