@hasna/search 0.0.5 → 0.0.7
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/LICENSE +2 -1
- package/README.md +32 -53
- package/dist/cli/index.js +3430 -2881
- package/dist/index.js +3796 -3167
- package/dist/mcp/http.d.ts +15 -0
- package/dist/mcp/http.d.ts.map +1 -0
- package/dist/mcp/index.js +12877 -11101
- package/dist/mcp/server.d.ts +5 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/server/index.js +30232 -13076
- package/dist/server/serve.d.ts.map +1 -1
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
Apache License
|
|
2
3
|
Version 2.0, January 2004
|
|
3
4
|
http://www.apache.org/licenses/
|
|
@@ -175,7 +176,7 @@
|
|
|
175
176
|
|
|
176
177
|
END OF TERMS AND CONDITIONS
|
|
177
178
|
|
|
178
|
-
Copyright
|
|
179
|
+
Copyright 2026 Hasna, Inc.
|
|
179
180
|
|
|
180
181
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
182
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,82 +1,61 @@
|
|
|
1
1
|
# @hasna/search
|
|
2
2
|
|
|
3
|
-
Unified search aggregator —
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
| Provider | API | Key Required |
|
|
8
|
-
|----------|-----|--------------|
|
|
9
|
-
| Google | SerpAPI | `SERP_API_KEY` |
|
|
10
|
-
| SerpAPI (multi-engine) | SerpAPI | `SERP_API_KEY` |
|
|
11
|
-
| Exa.ai | Exa API | `EXA_API_KEY` |
|
|
12
|
-
| Perplexity | Perplexity API | `PERPLEXITY_API_KEY` |
|
|
13
|
-
| Brave Search | Brave Search API | `BRAVE_API_KEY` |
|
|
14
|
-
| Bing | Bing Web Search v7 | `BING_API_KEY` |
|
|
15
|
-
| Twitter/X | Twitter API v2 | `X_BEARER_TOKEN` |
|
|
16
|
-
| Reddit | Reddit OAuth | `REDDIT_CLIENT_ID` + `REDDIT_CLIENT_SECRET` |
|
|
17
|
-
| YouTube | YouTube Data API v3 | `YOUTUBE_API_KEY` |
|
|
18
|
-
| Hacker News | Algolia HN API | No key needed |
|
|
19
|
-
| GitHub | GitHub REST API | `GITHUB_TOKEN` |
|
|
20
|
-
| arXiv | arXiv API | No key needed |
|
|
3
|
+
Unified search aggregator — 12 providers (Google, SerpAPI, Exa, Perplexity, Twitter, Reddit, YouTube, Brave, Bing, Hacker News, GitHub, arXiv) + YouTube transcription. CLI + MCP + REST API + Dashboard.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@hasna/search)
|
|
6
|
+
[](LICENSE)
|
|
21
7
|
|
|
22
8
|
## Install
|
|
23
9
|
|
|
24
10
|
```bash
|
|
25
|
-
|
|
11
|
+
npm install -g @hasna/search
|
|
26
12
|
```
|
|
27
13
|
|
|
28
|
-
## Usage
|
|
29
|
-
|
|
30
|
-
### CLI
|
|
14
|
+
## CLI Usage
|
|
31
15
|
|
|
32
16
|
```bash
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
search --help
|
|
18
|
+
```
|
|
35
19
|
|
|
36
|
-
|
|
37
|
-
search "query" --providers google,exa,perplexity
|
|
20
|
+
## MCP Server
|
|
38
21
|
|
|
39
|
-
|
|
40
|
-
search
|
|
22
|
+
```bash
|
|
23
|
+
search-mcp
|
|
24
|
+
```
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
search:youtube "bun runtime" --transcribe
|
|
26
|
+
31 tools available.
|
|
44
27
|
|
|
45
|
-
|
|
46
|
-
search providers list
|
|
47
|
-
search providers enable brave
|
|
28
|
+
## HTTP mode
|
|
48
29
|
|
|
49
|
-
|
|
50
|
-
search
|
|
30
|
+
```bash
|
|
31
|
+
search-mcp --http # default port 8832
|
|
32
|
+
MCP_HTTP=1 search-mcp
|
|
51
33
|
```
|
|
52
34
|
|
|
53
|
-
|
|
35
|
+
- Health: `GET http://127.0.0.1:8832/health`
|
|
36
|
+
- MCP: `http://127.0.0.1:8832/mcp`
|
|
37
|
+
- Stdio remains default. `search-serve` also mounts `/health` and `/mcp`.
|
|
54
38
|
|
|
55
|
-
|
|
56
|
-
# Install for Claude Code
|
|
57
|
-
search mcp --claude
|
|
39
|
+
## REST API
|
|
58
40
|
|
|
59
|
-
|
|
60
|
-
search-
|
|
41
|
+
```bash
|
|
42
|
+
search-serve
|
|
61
43
|
```
|
|
62
44
|
|
|
63
|
-
|
|
45
|
+
## Cloud Sync
|
|
46
|
+
|
|
47
|
+
This package supports cloud sync via `@hasna/cloud`:
|
|
64
48
|
|
|
65
49
|
```bash
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
cloud setup
|
|
51
|
+
cloud sync push --service search
|
|
52
|
+
cloud sync pull --service search
|
|
68
53
|
```
|
|
69
54
|
|
|
70
|
-
##
|
|
55
|
+
## Data Directory
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
- Result normalization and deduplication
|
|
74
|
-
- Search profiles (research, social, video, code, academic)
|
|
75
|
-
- Search history and saved searches
|
|
76
|
-
- YouTube video transcription (via microservice-transcriber)
|
|
77
|
-
- Export results as JSON, CSV, or Markdown
|
|
78
|
-
- Web dashboard with dark/light mode
|
|
57
|
+
Data is stored in `~/.hasna/search/`.
|
|
79
58
|
|
|
80
59
|
## License
|
|
81
60
|
|
|
82
|
-
Apache-2.0
|
|
61
|
+
Apache-2.0 -- see [LICENSE](LICENSE)
|