Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexzhang1030/ss

A CLI imporves your web search experience.
https://github.com/alexzhang1030/ss

Last synced: 7 days ago
JSON representation

A CLI imporves your web search experience.

Awesome Lists containing this project

README

        

# ss

ss means "Search, Search"

Just type something, ss will open corresponding website with your input keywords in your default browser.

## Install

```bash
npm i -g @alexzzz/ss

# or pnpm
pnpm i -g @alexzzz/ss
```

## Usage

### Basic Usage

```bash
ss [...keywords]

# such like this
ss javascript array reduce # <- will open google.com with query "javascript array reduce"
```

### Specific Website

```bash
ss -u [...keywords]

# such like
ss -u github alexzhang1030 # <- will open github.com with query "alexzhang1030"
```

## Config

read `~/.ssrc` file(not test Windows, but I think it should be `C:\Users\\.ssrc`)

```yaml
# target is the default website
target: google
# you can add your own website
# {keyword} will be replaced with your input
extend:
- name: mdn
rule: https://developer.mozilla.org/zh-CN/search?q={keyword}
- name: npm
rule: https://www.npmjs.com/search?q={keyword}

# version check interval
# support: 1d(ay), 1h(our), 1m(inute), 1s(econd)
vci: 1d

# ignore it, it's for internal
lastCheck: 1000000
```

### Default Support Website

If Your custom website name is the same as default, it will override default website.

```ts
[
{
name: 'baidu',
rule: 'https://www.baidu.com/s?wd={keyword}',
},
{
name: 'google',
rule: 'https://www.google.com/search?q={keyword}',
},
{
name: 'mdn',
rule: 'https://developer.mozilla.org/zh-CN/search?q={keyword}',
},
{
name: 'npm',
rule: 'https://www.npmjs.com/search?q={keyword}',
},
{
name: 'github',
rule: 'https://github.com/search?q={keyword}',
},
]
```

## License

MIT, alexzhang1030