omnisearch-cli 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# omnisearch-cli
|
|
2
|
+
|
|
3
|
+
> High-performance command-line interface for multi-provider web search retrieval, powered by [`omnisearch-sdk`](https://www.npmjs.com/package/omnisearch-sdk).
|
|
4
|
+
|
|
5
|
+
Search across Google, Brave, Bing, DuckDuckGo, Tavily, Perplexity, PubMed, Arxiv, GitHub, and more directly from your terminal or shell scripts.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ⚡ Quick Start
|
|
10
|
+
|
|
11
|
+
Run directly with `npx` (no installation required):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Basic web search (auto-detects configured providers or falls back to DuckDuckGo)
|
|
15
|
+
npx omnisearch-cli "autonomous AI agents"
|
|
16
|
+
|
|
17
|
+
# Search specific engine (e.g. Brave, PubMed, GitHub)
|
|
18
|
+
npx omnisearch-cli "CRISPR gene editing" -p pubmed -n 5
|
|
19
|
+
|
|
20
|
+
# Recent news (past 24h) with JSON output for piping to jq
|
|
21
|
+
npx omnisearch-cli "latest AI models" -p brave -f day --type news --json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or install globally:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -g omnisearch-cli
|
|
28
|
+
# or
|
|
29
|
+
pnpm add -g omnisearch-cli
|
|
30
|
+
|
|
31
|
+
omnisearch "quantum computing" -n 5
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 🛠 Command-Line Options
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
Usage:
|
|
40
|
+
omnisearch "<query>" [options]
|
|
41
|
+
|
|
42
|
+
Options:
|
|
43
|
+
-p, --provider <name> Search provider to use (default: auto-detect)
|
|
44
|
+
-f, --freshness <period> Filter by recency: day, week, month, year
|
|
45
|
+
-s, --strategy <mode> Execution mode: parallel, fallback, race (default: parallel)
|
|
46
|
+
-n, --max-results <num> Maximum results to return (default: 10)
|
|
47
|
+
--type <type> Search type: web, news (default: web)
|
|
48
|
+
--dedupe Enable canonical URL deduplication
|
|
49
|
+
--json Output raw JSON (ideal for scripting and jq)
|
|
50
|
+
-h, --help Show help message
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 🌐 Supported Providers
|
|
56
|
+
|
|
57
|
+
The CLI automatically detects providers based on available environment variables:
|
|
58
|
+
|
|
59
|
+
| Provider Flag | Engine | Requires API Key? | Environment Variables |
|
|
60
|
+
| :--- | :--- | :--- | :--- |
|
|
61
|
+
| `-p duckduckgo` | DuckDuckGo | **No** (Zero-config) | None |
|
|
62
|
+
| `-p pubmed` | PubMed / NCBI | **No** (Zero-config) | None |
|
|
63
|
+
| `-p arxiv` | Arxiv Preprints | **No** (Zero-config) | None |
|
|
64
|
+
| `-p semanticscholar` | Semantic Scholar | **No** (Zero-config) | None |
|
|
65
|
+
| `-p github` | GitHub Search | **Optional** | `GITHUB_TOKEN` |
|
|
66
|
+
| `-p brave` | Brave Search | **Yes** | `BRAVE_API_KEY` |
|
|
67
|
+
| `-p google` | Google Search | **Yes** | `GOOGLE_API_KEY`, `GOOGLE_CX` |
|
|
68
|
+
| `-p bing` | Bing Web Search | **Yes** | `BING_API_KEY` |
|
|
69
|
+
| `-p you` | You.com Search | **Yes** | `YOU_API_KEY` |
|
|
70
|
+
| `-p tavily` | Tavily Search | **Yes** | `TAVILY_API_KEY` |
|
|
71
|
+
| `-p exa` | Exa Neural Search | **Yes** | `EXA_API_KEY` |
|
|
72
|
+
| `-p perplexity` | Perplexity AI | **Yes** | `PERPLEXITY_API_KEY` |
|
|
73
|
+
| `-p parallel` | Parallel Search | **Yes** | `PARALLEL_API_KEY` |
|
|
74
|
+
| `-p serpapi` | SerpAPI | **Yes** | `SERPAPI_API_KEY` |
|
|
75
|
+
| `-p searxng` | SearXNG | **Yes** | `SEARXNG_BASE_URL` |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 💡 Examples
|
|
80
|
+
|
|
81
|
+
### 1. Multi-Engine Cascading Fallback
|
|
82
|
+
Try Brave first; if rate-limited or unavailable, gracefully fall back to DuckDuckGo:
|
|
83
|
+
```bash
|
|
84
|
+
omnisearch "TypeScript 6 release date" --strategy fallback
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 2. Live Shell Scripting with `jq`
|
|
88
|
+
Fetch the top 3 URLs in JSON:
|
|
89
|
+
```bash
|
|
90
|
+
omnisearch "Rust memory safety" --json | jq '.[].url'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 3. Academic Paper Discovery
|
|
94
|
+
```bash
|
|
95
|
+
omnisearch "transformer architecture attention is all you need" -p arxiv -n 3
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 📄 License
|
|
101
|
+
|
|
102
|
+
MIT © [OmniSearch SDK Contributors](https://github.com/gbks121/omnisearch-sdk)
|