@youdotcom-oss/api 0.2.1 → 0.2.2

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 CHANGED
@@ -19,11 +19,11 @@ Fast, lightweight API client and CLI tools for web search, AI answers, and conte
19
19
 
20
20
  ```bash
21
21
  # Use with bunx (no install needed) - Schema-driven JSON input
22
- bunx @youdotcom-oss/api search --json '{"query":"AI developments"}' --client Openclaw
22
+ bunx @youdotcom-oss/api search --json '{"query":"AI developments"}' --client ClaudeCode
23
23
 
24
24
  # Or install globally to use 'ydc' command
25
25
  bun i -g @youdotcom-oss/api
26
- ydc search --json '{"query":"AI developments"}' --client Openclaw
26
+ ydc search --json '{"query":"AI developments"}' --client ClaudeCode
27
27
 
28
28
  # Get comprehensive research with citations
29
29
  bunx @youdotcom-oss/api deep-search --json '{
@@ -137,14 +137,14 @@ ydc search --json '{"query":"..."}' [options]
137
137
 
138
138
  Examples:
139
139
  # Basic search
140
- ydc search --json '{"query":"machine learning"}' --client Openclaw
140
+ ydc search --json '{"query":"machine learning"}' --client ClaudeCode
141
141
 
142
142
  # Search with livecrawl (KEY FEATURE)
143
143
  ydc search --json '{
144
144
  "query":"documentation",
145
145
  "livecrawl":"web",
146
146
  "livecrawl_formats":"markdown"
147
- }' --client Openclaw
147
+ }' --client ClaudeCode
148
148
 
149
149
  # Advanced filters
150
150
  ydc search --json '{
@@ -153,10 +153,10 @@ Examples:
153
153
  "fileType":"pdf",
154
154
  "freshness":"month",
155
155
  "count":10
156
- }' --client Openclaw
156
+ }' --client ClaudeCode
157
157
 
158
158
  # Parse with jq
159
- api search --json '{"query":"AI"}' --client Openclaw | \
159
+ api search --json '{"query":"AI"}' --client ClaudeCode | \
160
160
  jq -r '.results.web[] | .title'
161
161
 
162
162
  # Extract livecrawl content
@@ -164,7 +164,7 @@ Examples:
164
164
  "query":"docs",
165
165
  "livecrawl":"web",
166
166
  "livecrawl_formats":"markdown"
167
- }' --client Openclaw | \
167
+ }' --client ClaudeCode | \
168
168
  jq -r '.results.web[0].contents.markdown'
169
169
  ```
170
170
 
@@ -190,18 +190,18 @@ ydc deep-search --json '{"query":"..."}' [options]
190
190
 
191
191
  Examples:
192
192
  # Comprehensive research with medium effort
193
- api deep-search --json '{"query":"What is quantum computing?"}' --client Openclaw
193
+ api deep-search --json '{"query":"What is quantum computing?"}' --client ClaudeCode
194
194
 
195
195
  # High-effort deep research (up to 5 minutes)
196
196
  api deep-search --json '{
197
197
  "query":"Latest breakthroughs in AI agents",
198
198
  "search_effort":"high"
199
- }' --client Openclaw
199
+ }' --client ClaudeCode
200
200
 
201
201
  # Parse answer and sources
202
202
  api deep-search --json '{
203
203
  "query":"AI trends 2026"
204
- }' --client Openclaw | \
204
+ }' --client ClaudeCode | \
205
205
  jq -r '.answer, "\nSources:", (.results[]? | "- \(.title): \(.url)")'
206
206
  ```
207
207
 
@@ -219,25 +219,25 @@ Examples:
219
219
  api contents --json '{
220
220
  "urls":["https://example.com"],
221
221
  "formats":["markdown"]
222
- }' --client Openclaw
222
+ }' --client ClaudeCode
223
223
 
224
224
  # Multiple formats
225
225
  api contents --json '{
226
226
  "urls":["https://example.com"],
227
227
  "formats":["markdown","html","metadata"]
228
- }' --client Openclaw
228
+ }' --client ClaudeCode
229
229
 
230
230
  # Multiple URLs
231
231
  api contents --json '{
232
232
  "urls":["https://a.com","https://b.com"],
233
233
  "formats":["markdown"]
234
- }' --client Openclaw
234
+ }' --client ClaudeCode
235
235
 
236
236
  # Save to file
237
237
  api contents --json '{
238
238
  "urls":["https://example.com"],
239
239
  "formats":["markdown"]
240
- }' --client Openclaw | \
240
+ }' --client ClaudeCode | \
241
241
  jq -r '.[0].markdown' > output.md
242
242
 
243
243
  # With timeout
@@ -245,7 +245,7 @@ Examples:
245
245
  "urls":["https://example.com"],
246
246
  "formats":["markdown","metadata"],
247
247
  "crawl_timeout":30
248
- }' --client Openclaw
248
+ }' --client ClaudeCode
249
249
  ```
250
250
 
251
251
  **Available contents parameters** (use `--schema` to see full schema):
@@ -363,7 +363,7 @@ console.log(response[0].metadata); // Structured metadata
363
363
  set -e
364
364
 
365
365
  # Capture result, check exit code
366
- if ! result=$(api search --json '{"query":"AI developments"}' --client Openclaw); then
366
+ if ! result=$(api search --json '{"query":"AI developments"}' --client ClaudeCode); then
367
367
  echo "Search failed with code $?"
368
368
  exit 1
369
369
  fi
@@ -377,7 +377,7 @@ echo "$result" | jq .
377
377
  ```bash
378
378
  #!/usr/bin/env bash
379
379
  for i in {1..3}; do
380
- if api search --json '{"query":"AI"}' --client Openclaw; then
380
+ if api search --json '{"query":"AI"}' --client ClaudeCode; then
381
381
  exit 0
382
382
  fi
383
383
  [ $i -lt 3 ] && sleep 5
@@ -390,9 +390,9 @@ exit 1
390
390
 
391
391
  ```bash
392
392
  #!/usr/bin/env bash
393
- ydc search --json '{"query":"AI"}' --client Openclaw &
394
- ydc search --json '{"query":"ML"}' --client Openclaw &
395
- ydc search --json '{"query":"LLM"}' --client Openclaw &
393
+ ydc search --json '{"query":"AI"}' --client ClaudeCode &
394
+ ydc search --json '{"query":"ML"}' --client ClaudeCode &
395
+ ydc search --json '{"query":"LLM"}' --client ClaudeCode &
396
396
  wait
397
397
  ```
398
398
 
@@ -408,18 +408,18 @@ search=$(api search --json '{
408
408
  "count":5,
409
409
  "livecrawl":"web",
410
410
  "livecrawl_formats":"markdown"
411
- }' --client Openclaw)
411
+ }' --client ClaudeCode)
412
412
 
413
413
  # Get comprehensive research with citations
414
414
  answer=$(api deep-search --json '{
415
415
  "query":"Summarize AI developments in 2026",
416
416
  "search_effort":"high"
417
- }' --client Openclaw)
417
+ }' --client ClaudeCode)
418
418
 
419
419
  # Extract top result URL and fetch content
420
420
  url=$(echo "$search" | jq -r '.results.web[0].url')
421
421
  ydc contents --json "{\"urls\":[\"$url\"],\"formats\":[\"markdown\"]}" \
422
- --client Openclaw | jq -r '.[0].markdown' > output.md
422
+ --client ClaudeCode | jq -r '.[0].markdown' > output.md
423
423
  ```
424
424
 
425
425
  ### Schema-Driven Agent
@@ -441,7 +441,7 @@ query=$(jq -n '{
441
441
  }')
442
442
 
443
443
  # Execute search
444
- ydc search --json "$query" --client Openclaw
444
+ ydc search --json "$query" --client ClaudeCode
445
445
  ```
446
446
 
447
447
  ## Agent Skills Integration
@@ -462,10 +462,10 @@ The [youdotcom-cli skill](https://github.com/youdotcom-oss/agent-skills/tree/mai
462
462
  ### Compatible Agents
463
463
 
464
464
  Works with any bash-capable agent supporting Agent Skills:
465
- - **OpenClaw** - Open source bash agent
466
465
  - **Claude Code** - Anthropic's coding tool
467
- - **Codex** - OpenAI's CLI agent
468
466
  - **Cursor** - AI-powered code editor
467
+ - **Droid** - Factory.ai agent
468
+ - **Codex** - OpenAI's CLI agent
469
469
  - **Roo Code** - VS Code extension
470
470
  - And more...
471
471
 
package/bin/cli.js CHANGED
@@ -15,7 +15,7 @@ import { parseArgs as parseArgs2 } from "node:util";
15
15
  // package.json
16
16
  var package_default = {
17
17
  name: "@youdotcom-oss/api",
18
- version: "0.2.1",
18
+ version: "0.2.2",
19
19
  description: "You.com API client with bundled CLI for agents supporting Agent Skills",
20
20
  license: "MIT",
21
21
  engines: {
@@ -5225,7 +5225,7 @@ Output Format:
5225
5225
  Invalid args: Error message on stderr (exit 2)
5226
5226
 
5227
5227
  Examples:
5228
- ydc search --json '{"query":"AI developments"}' --client Openclaw
5228
+ ydc search --json '{"query":"AI developments"}' --client ClaudeCode
5229
5229
  ydc deep-search --json '{"query":"What are the latest breakthroughs in AI?","search_effort":"high"}' --client MyAgent
5230
5230
  ydc contents --json '{"urls":["https://example.com"],"formats":["markdown"]}'
5231
5231
  ydc search --schema # Get JSON schema for search --json input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youdotcom-oss/api",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "You.com API client with bundled CLI for agents supporting Agent Skills",
5
5
  "license": "MIT",
6
6
  "engines": {
package/src/cli.ts CHANGED
@@ -62,7 +62,7 @@ Output Format:
62
62
  Invalid args: Error message on stderr (exit 2)
63
63
 
64
64
  Examples:
65
- ydc search --json '{"query":"AI developments"}' --client Openclaw
65
+ ydc search --json '{"query":"AI developments"}' --client ClaudeCode
66
66
  ydc deep-search --json '{"query":"What are the latest breakthroughs in AI?","search_effort":"high"}' --client MyAgent
67
67
  ydc contents --json '{"urls":["https://example.com"],"formats":["markdown"]}'
68
68
  ydc search --schema # Get JSON schema for search --json input