findweb 0.1.0-canary.a4127b5

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 chrisy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,147 @@
1
+ # findweb
2
+
3
+ Google search CLI powered by system Chrome, with programmatic ad blocking.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun install -g findweb
9
+ ```
10
+
11
+ Or run directly:
12
+
13
+ ```bash
14
+ bunx findweb "yc"
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ # Single search
21
+ findweb "Y Combinator"
22
+
23
+ # Batch search
24
+ findweb "yc" "apple" "tesla" --parallel 3
25
+
26
+ # JSON output
27
+ findweb --json "react useEffect"
28
+
29
+ # Custom region and language
30
+ findweb --gl kr --lang ko "startup"
31
+
32
+ # More results
33
+ findweb -n 10 "rust async"
34
+
35
+ # Prepare a signed-in Chrome profile (reduces rate limiting)
36
+ findweb login
37
+ ```
38
+
39
+ ## First Run Behavior
40
+
41
+ `findweb` requires an initialized Google profile before it will run the first search for a given `--userDataDir`.
42
+
43
+ - If the profile is already prepared, search runs immediately.
44
+ - If the profile has not been prepared yet, `findweb` automatically opens the login flow first.
45
+ - After you sign in and close the browser window, `findweb` writes a local prepared-profile marker so future searches can start immediately.
46
+
47
+ In practice, the first search on a fresh profile behaves like this:
48
+
49
+ ```bash
50
+ findweb "yc"
51
+ ```
52
+
53
+ 1. detect missing prepared-profile marker
54
+ 2. open headed Chrome login flow
55
+ 3. wait for you to sign in and close the browser
56
+ 4. continue the original search
57
+
58
+ ## Options
59
+
60
+ | Option | Default | Description |
61
+ | ------------------ | -------------- | ------------------------------------ |
62
+ | `--gl <country>` | `us` | Google region hint |
63
+ | `-l, --lang` | `en` | Google UI language |
64
+ | `-n, --num` | `3` | Results per query |
65
+ | `--parallel` | `4` | Batch tab concurrency |
66
+ | `--userDataDir` | auto-detected | Chrome profile directory |
67
+ | `--headed` | `false` | Show the Chrome window |
68
+ | `--json` | `false` | Print output as JSON |
69
+
70
+ ## How It Works
71
+
72
+ 1. Launches system Chrome (`/Applications/Google Chrome.app`) with a free debugging port
73
+ 2. Connects via CDP using puppeteer-core
74
+ 3. Loads the [Ghostery adblocker](https://github.com/ghostery/adblocker) engine programmatically on each page
75
+ 4. Navigates to Google, submits the query through DOM manipulation, and extracts results from the rendered page
76
+ 5. Returns results as plain text or JSON, then closes Chrome
77
+
78
+ No Chromium download. No browser extension. No user confirmation.
79
+
80
+ ## Batch Mode
81
+
82
+ Pass multiple quoted queries as positional arguments. Each query opens a separate tab in the same browser instance and profile.
83
+
84
+ ```bash
85
+ findweb "yc" "apple" "tesla"
86
+ ```
87
+
88
+ Results are returned in input order. Concurrency is controlled by `--parallel` (default: 4).
89
+
90
+ ## Login
91
+
92
+ Google rate-limits unauthenticated or fresh-profile searches. `findweb` now enforces an interactive login before the first search on a new profile.
93
+
94
+ You can trigger that ahead of time with:
95
+
96
+ ```bash
97
+ findweb login
98
+ ```
99
+
100
+ This opens a visible Chrome window with the Google sign-in page. After signing in, close the browser. The session is saved to the profile directory, and `findweb` records that the profile is ready for future searches.
101
+
102
+ ## Output
103
+
104
+ ### Plain text (default)
105
+
106
+ ```
107
+ 1. Y Combinator
108
+ https://www.ycombinator.com/
109
+ Y Combinator created a new model for funding early stage startups.
110
+
111
+ 2. Y Combinator - Wikipedia
112
+ https://en.wikipedia.org/wiki/Y_Combinator
113
+ ```
114
+
115
+ ### JSON (`--json`)
116
+
117
+ ```json
118
+ [
119
+ {
120
+ "title": "Y Combinator",
121
+ "url": "https://www.ycombinator.com/",
122
+ "snippet": "Y Combinator created a new model for funding early stage startups."
123
+ }
124
+ ]
125
+ ```
126
+
127
+ ## Requirements
128
+
129
+ - macOS
130
+ - System Chrome (`/Applications/Google Chrome.app`)
131
+ - [Bun](https://bun.sh) >= 1.3.11
132
+
133
+ ## Development
134
+
135
+ ```bash
136
+ git clone https://github.com/ysm-dev/findweb.git
137
+ cd findweb
138
+ bun install
139
+ bun run check # tsgo typecheck
140
+ bun run test # unit tests
141
+ bun run dev # run from source
142
+ bun run build # bundle to dist/
143
+ ```
144
+
145
+ ## License
146
+
147
+ MIT
package/bin/findweb ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import "../dist/index.js";