browse 0.7.3 → 0.8.0
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 +2 -0
- package/dist/commands/cloud/fetch.js +40 -4
- package/oclif.manifest.json +239 -216
- package/package.json +2 -2
- package/skills/browse/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -87,6 +87,8 @@ browse cloud fetch <url>
|
|
|
87
87
|
browse cloud search <query>
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
`browse cloud fetch` requests markdown-formatted page content by default. Use `--format raw` for the original response body, or `--format json --schema <schema>` for structured extraction.
|
|
91
|
+
|
|
90
92
|
## Functions Commands
|
|
91
93
|
|
|
92
94
|
Browserbase [Functions](https://docs.browserbase.com/platform/runtime/overview) let you deploy browser agents or automation scripts directly onto Browserbase’s infrastructure. Start in your local environment, configure agents or write browser scripts, test them instantly, and deploy directly as cloud functions invokable as APIs.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { createBrowserbaseClient, outputJson, withBrowserbaseApi, writeOutputFile, } from "../../lib/cloud/api.js";
|
|
2
|
+
import { createBrowserbaseClient, outputJson, parseOptionalJsonObjectArg, withBrowserbaseApi, writeOutputFile, } from "../../lib/cloud/api.js";
|
|
3
3
|
import { apiCommonFlags, toApiOptions } from "../../lib/cloud/flags.js";
|
|
4
4
|
import { BrowseCommand } from "../../base.js";
|
|
5
|
+
import { fail } from "../../lib/errors.js";
|
|
6
|
+
const fetchFormats = ["raw", "markdown", "json"];
|
|
5
7
|
export default class Fetch extends BrowseCommand {
|
|
6
8
|
static description = "Retrieve webpage content using the lightweight Browserbase Fetch API.";
|
|
7
9
|
static examples = [
|
|
8
10
|
"browse cloud fetch https://www.google.com",
|
|
11
|
+
"browse cloud fetch https://example.com --format raw",
|
|
9
12
|
"browse cloud fetch https://example.com --allow-insecure-ssl --output page.html",
|
|
10
|
-
|
|
13
|
+
`browse cloud fetch https://example.com --format json --schema '{"type":"object","properties":{"title":{"type":"string"}},"required":["title"]}'`,
|
|
11
14
|
];
|
|
12
15
|
static args = {
|
|
13
16
|
url: Args.string({ required: true, description: "URL to fetch." }),
|
|
@@ -23,6 +26,16 @@ export default class Fetch extends BrowseCommand {
|
|
|
23
26
|
proxies: Flags.boolean({
|
|
24
27
|
description: "Enable Browserbase proxy support.",
|
|
25
28
|
}),
|
|
29
|
+
format: Flags.string({
|
|
30
|
+
description: "Fetched content format. Defaults to markdown for token-efficient output.",
|
|
31
|
+
helpValue: "<format>",
|
|
32
|
+
options: [...fetchFormats],
|
|
33
|
+
default: "markdown",
|
|
34
|
+
}),
|
|
35
|
+
schema: Flags.string({
|
|
36
|
+
description: "JSON Schema for structured extraction. Required when --format json.",
|
|
37
|
+
helpValue: "<schema>",
|
|
38
|
+
}),
|
|
26
39
|
output: Flags.string({
|
|
27
40
|
description: "Write the fetched content to a file.",
|
|
28
41
|
helpValue: "<output>",
|
|
@@ -30,24 +43,47 @@ export default class Fetch extends BrowseCommand {
|
|
|
30
43
|
};
|
|
31
44
|
async run() {
|
|
32
45
|
const { args, flags } = await this.parse(Fetch);
|
|
46
|
+
const format = flags.format;
|
|
47
|
+
const schema = resolveFetchSchema(format, flags.schema);
|
|
33
48
|
const client = createBrowserbaseClient(toApiOptions(flags));
|
|
34
49
|
const result = await withBrowserbaseApi("fetch", async () => await client.fetchAPI.create({
|
|
35
50
|
url: args.url,
|
|
36
51
|
allowInsecureSsl: flags["allow-insecure-ssl"],
|
|
37
52
|
allowRedirects: flags["allow-redirects"],
|
|
53
|
+
format,
|
|
38
54
|
proxies: flags.proxies,
|
|
55
|
+
schema,
|
|
39
56
|
}));
|
|
40
57
|
if (flags.output) {
|
|
41
|
-
|
|
58
|
+
const contents = stringifyFetchContent(result.content);
|
|
59
|
+
await writeOutputFile(flags.output, contents);
|
|
42
60
|
outputJson({
|
|
43
61
|
ok: true,
|
|
44
62
|
outputPath: flags.output,
|
|
45
63
|
contentType: result.contentType,
|
|
46
64
|
statusCode: result.statusCode,
|
|
47
|
-
sizeBytes: Buffer.byteLength(
|
|
65
|
+
sizeBytes: Buffer.byteLength(contents, "utf8"),
|
|
48
66
|
});
|
|
49
67
|
return;
|
|
50
68
|
}
|
|
51
69
|
outputJson(result);
|
|
52
70
|
}
|
|
53
71
|
}
|
|
72
|
+
function resolveFetchSchema(format, schemaFlag) {
|
|
73
|
+
if (format !== "json") {
|
|
74
|
+
if (schemaFlag) {
|
|
75
|
+
fail("--schema can only be used with --format json.");
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
if (!schemaFlag) {
|
|
80
|
+
fail("--schema is required when --format json.");
|
|
81
|
+
}
|
|
82
|
+
return parseOptionalJsonObjectArg(schemaFlag, "schema");
|
|
83
|
+
}
|
|
84
|
+
function stringifyFetchContent(content) {
|
|
85
|
+
if (typeof content === "string") {
|
|
86
|
+
return content;
|
|
87
|
+
}
|
|
88
|
+
return JSON.stringify(content, null, 2);
|
|
89
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -2256,8 +2256,9 @@
|
|
|
2256
2256
|
"description": "Retrieve webpage content using the lightweight Browserbase Fetch API.",
|
|
2257
2257
|
"examples": [
|
|
2258
2258
|
"browse cloud fetch https://www.google.com",
|
|
2259
|
+
"browse cloud fetch https://example.com --format raw",
|
|
2259
2260
|
"browse cloud fetch https://example.com --allow-insecure-ssl --output page.html",
|
|
2260
|
-
"browse cloud fetch https://example.com --
|
|
2261
|
+
"browse cloud fetch https://example.com --format json --schema '{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"}},\"required\":[\"title\"]}'"
|
|
2261
2262
|
],
|
|
2262
2263
|
"flags": {
|
|
2263
2264
|
"api-key": {
|
|
@@ -2294,6 +2295,28 @@
|
|
|
2294
2295
|
"allowNo": false,
|
|
2295
2296
|
"type": "boolean"
|
|
2296
2297
|
},
|
|
2298
|
+
"format": {
|
|
2299
|
+
"description": "Fetched content format. Defaults to markdown for token-efficient output.",
|
|
2300
|
+
"name": "format",
|
|
2301
|
+
"default": "markdown",
|
|
2302
|
+
"hasDynamicHelp": false,
|
|
2303
|
+
"helpValue": "<format>",
|
|
2304
|
+
"multiple": false,
|
|
2305
|
+
"options": [
|
|
2306
|
+
"raw",
|
|
2307
|
+
"markdown",
|
|
2308
|
+
"json"
|
|
2309
|
+
],
|
|
2310
|
+
"type": "option"
|
|
2311
|
+
},
|
|
2312
|
+
"schema": {
|
|
2313
|
+
"description": "JSON Schema for structured extraction. Required when --format json.",
|
|
2314
|
+
"name": "schema",
|
|
2315
|
+
"hasDynamicHelp": false,
|
|
2316
|
+
"helpValue": "<schema>",
|
|
2317
|
+
"multiple": false,
|
|
2318
|
+
"type": "option"
|
|
2319
|
+
},
|
|
2297
2320
|
"output": {
|
|
2298
2321
|
"description": "Write the fetched content to a file.",
|
|
2299
2322
|
"name": "output",
|
|
@@ -3624,6 +3647,194 @@
|
|
|
3624
3647
|
"list.js"
|
|
3625
3648
|
]
|
|
3626
3649
|
},
|
|
3650
|
+
"templates:clone": {
|
|
3651
|
+
"aliases": [],
|
|
3652
|
+
"args": {
|
|
3653
|
+
"slug": {
|
|
3654
|
+
"description": "Template slug.",
|
|
3655
|
+
"name": "slug",
|
|
3656
|
+
"required": true
|
|
3657
|
+
},
|
|
3658
|
+
"path": {
|
|
3659
|
+
"description": "Destination directory. Defaults to the template slug.",
|
|
3660
|
+
"name": "path",
|
|
3661
|
+
"required": false
|
|
3662
|
+
}
|
|
3663
|
+
},
|
|
3664
|
+
"description": "Scaffold a ready-to-run project from a Browserbase template.",
|
|
3665
|
+
"examples": [
|
|
3666
|
+
"browse templates clone google-trends-keywords",
|
|
3667
|
+
"browse templates clone amazon-product-scraping --language python ./my-scraper",
|
|
3668
|
+
"browse templates clone dynamic-form-filling ./form-bot --language typescript"
|
|
3669
|
+
],
|
|
3670
|
+
"flags": {
|
|
3671
|
+
"json": {
|
|
3672
|
+
"description": "Print clone result as JSON.",
|
|
3673
|
+
"name": "json",
|
|
3674
|
+
"allowNo": false,
|
|
3675
|
+
"type": "boolean"
|
|
3676
|
+
},
|
|
3677
|
+
"language": {
|
|
3678
|
+
"description": "Template language. Defaults to TypeScript when available, then Python.",
|
|
3679
|
+
"name": "language",
|
|
3680
|
+
"hasDynamicHelp": false,
|
|
3681
|
+
"helpValue": "<language>",
|
|
3682
|
+
"multiple": false,
|
|
3683
|
+
"options": [
|
|
3684
|
+
"typescript",
|
|
3685
|
+
"python"
|
|
3686
|
+
],
|
|
3687
|
+
"type": "option"
|
|
3688
|
+
}
|
|
3689
|
+
},
|
|
3690
|
+
"hasDynamicHelp": false,
|
|
3691
|
+
"hiddenAliases": [],
|
|
3692
|
+
"id": "templates:clone",
|
|
3693
|
+
"pluginAlias": "browse",
|
|
3694
|
+
"pluginName": "browse",
|
|
3695
|
+
"pluginType": "core",
|
|
3696
|
+
"strict": true,
|
|
3697
|
+
"isESM": true,
|
|
3698
|
+
"relativePath": [
|
|
3699
|
+
"dist",
|
|
3700
|
+
"commands",
|
|
3701
|
+
"templates",
|
|
3702
|
+
"clone.js"
|
|
3703
|
+
]
|
|
3704
|
+
},
|
|
3705
|
+
"templates:find": {
|
|
3706
|
+
"aliases": [],
|
|
3707
|
+
"args": {
|
|
3708
|
+
"query": {
|
|
3709
|
+
"description": "Template slug or search query.",
|
|
3710
|
+
"name": "query",
|
|
3711
|
+
"required": true
|
|
3712
|
+
}
|
|
3713
|
+
},
|
|
3714
|
+
"description": "Find Browserbase templates by slug, title, category, or tag.",
|
|
3715
|
+
"examples": [
|
|
3716
|
+
"browse templates find google-trends-keywords",
|
|
3717
|
+
"browse templates find amazon",
|
|
3718
|
+
"browse templates find Python --wide",
|
|
3719
|
+
"browse templates find Python --json"
|
|
3720
|
+
],
|
|
3721
|
+
"flags": {
|
|
3722
|
+
"format": {
|
|
3723
|
+
"description": "Output format. Defaults to table in a terminal and JSON when piped.",
|
|
3724
|
+
"name": "format",
|
|
3725
|
+
"hasDynamicHelp": false,
|
|
3726
|
+
"helpValue": "<format>",
|
|
3727
|
+
"multiple": false,
|
|
3728
|
+
"options": [
|
|
3729
|
+
"table",
|
|
3730
|
+
"json"
|
|
3731
|
+
],
|
|
3732
|
+
"type": "option"
|
|
3733
|
+
},
|
|
3734
|
+
"json": {
|
|
3735
|
+
"description": "Print raw JSON output.",
|
|
3736
|
+
"name": "json",
|
|
3737
|
+
"allowNo": false,
|
|
3738
|
+
"type": "boolean"
|
|
3739
|
+
},
|
|
3740
|
+
"wide": {
|
|
3741
|
+
"description": "Show full table values without truncation.",
|
|
3742
|
+
"name": "wide",
|
|
3743
|
+
"allowNo": false,
|
|
3744
|
+
"type": "boolean"
|
|
3745
|
+
}
|
|
3746
|
+
},
|
|
3747
|
+
"hasDynamicHelp": false,
|
|
3748
|
+
"hiddenAliases": [],
|
|
3749
|
+
"id": "templates:find",
|
|
3750
|
+
"pluginAlias": "browse",
|
|
3751
|
+
"pluginName": "browse",
|
|
3752
|
+
"pluginType": "core",
|
|
3753
|
+
"strict": true,
|
|
3754
|
+
"isESM": true,
|
|
3755
|
+
"relativePath": [
|
|
3756
|
+
"dist",
|
|
3757
|
+
"commands",
|
|
3758
|
+
"templates",
|
|
3759
|
+
"find.js"
|
|
3760
|
+
]
|
|
3761
|
+
},
|
|
3762
|
+
"templates:list": {
|
|
3763
|
+
"aliases": [],
|
|
3764
|
+
"args": {},
|
|
3765
|
+
"description": "List Browserbase templates.",
|
|
3766
|
+
"examples": [
|
|
3767
|
+
"browse templates list",
|
|
3768
|
+
"browse templates list --category \"Web Automation\"",
|
|
3769
|
+
"browse templates list --tag Python --source Browserbase",
|
|
3770
|
+
"browse templates list --wide",
|
|
3771
|
+
"browse templates list --json"
|
|
3772
|
+
],
|
|
3773
|
+
"flags": {
|
|
3774
|
+
"format": {
|
|
3775
|
+
"description": "Output format. Defaults to table in a terminal and JSON when piped.",
|
|
3776
|
+
"name": "format",
|
|
3777
|
+
"hasDynamicHelp": false,
|
|
3778
|
+
"helpValue": "<format>",
|
|
3779
|
+
"multiple": false,
|
|
3780
|
+
"options": [
|
|
3781
|
+
"table",
|
|
3782
|
+
"json"
|
|
3783
|
+
],
|
|
3784
|
+
"type": "option"
|
|
3785
|
+
},
|
|
3786
|
+
"json": {
|
|
3787
|
+
"description": "Print raw JSON output.",
|
|
3788
|
+
"name": "json",
|
|
3789
|
+
"allowNo": false,
|
|
3790
|
+
"type": "boolean"
|
|
3791
|
+
},
|
|
3792
|
+
"wide": {
|
|
3793
|
+
"description": "Show full table values without truncation.",
|
|
3794
|
+
"name": "wide",
|
|
3795
|
+
"allowNo": false,
|
|
3796
|
+
"type": "boolean"
|
|
3797
|
+
},
|
|
3798
|
+
"category": {
|
|
3799
|
+
"description": "Filter templates by category.",
|
|
3800
|
+
"name": "category",
|
|
3801
|
+
"hasDynamicHelp": false,
|
|
3802
|
+
"helpValue": "<category>",
|
|
3803
|
+
"multiple": false,
|
|
3804
|
+
"type": "option"
|
|
3805
|
+
},
|
|
3806
|
+
"source": {
|
|
3807
|
+
"description": "Filter templates by source.",
|
|
3808
|
+
"name": "source",
|
|
3809
|
+
"hasDynamicHelp": false,
|
|
3810
|
+
"helpValue": "<source>",
|
|
3811
|
+
"multiple": false,
|
|
3812
|
+
"type": "option"
|
|
3813
|
+
},
|
|
3814
|
+
"tag": {
|
|
3815
|
+
"description": "Filter templates by tag.",
|
|
3816
|
+
"name": "tag",
|
|
3817
|
+
"hasDynamicHelp": false,
|
|
3818
|
+
"helpValue": "<tag>",
|
|
3819
|
+
"multiple": false,
|
|
3820
|
+
"type": "option"
|
|
3821
|
+
}
|
|
3822
|
+
},
|
|
3823
|
+
"hasDynamicHelp": false,
|
|
3824
|
+
"hiddenAliases": [],
|
|
3825
|
+
"id": "templates:list",
|
|
3826
|
+
"pluginAlias": "browse",
|
|
3827
|
+
"pluginName": "browse",
|
|
3828
|
+
"pluginType": "core",
|
|
3829
|
+
"strict": true,
|
|
3830
|
+
"isESM": true,
|
|
3831
|
+
"relativePath": [
|
|
3832
|
+
"dist",
|
|
3833
|
+
"commands",
|
|
3834
|
+
"templates",
|
|
3835
|
+
"list.js"
|
|
3836
|
+
]
|
|
3837
|
+
},
|
|
3627
3838
|
"tab:close": {
|
|
3628
3839
|
"aliases": [],
|
|
3629
3840
|
"args": {
|
|
@@ -3967,194 +4178,6 @@
|
|
|
3967
4178
|
"switch.js"
|
|
3968
4179
|
]
|
|
3969
4180
|
},
|
|
3970
|
-
"templates:clone": {
|
|
3971
|
-
"aliases": [],
|
|
3972
|
-
"args": {
|
|
3973
|
-
"slug": {
|
|
3974
|
-
"description": "Template slug.",
|
|
3975
|
-
"name": "slug",
|
|
3976
|
-
"required": true
|
|
3977
|
-
},
|
|
3978
|
-
"path": {
|
|
3979
|
-
"description": "Destination directory. Defaults to the template slug.",
|
|
3980
|
-
"name": "path",
|
|
3981
|
-
"required": false
|
|
3982
|
-
}
|
|
3983
|
-
},
|
|
3984
|
-
"description": "Scaffold a ready-to-run project from a Browserbase template.",
|
|
3985
|
-
"examples": [
|
|
3986
|
-
"browse templates clone google-trends-keywords",
|
|
3987
|
-
"browse templates clone amazon-product-scraping --language python ./my-scraper",
|
|
3988
|
-
"browse templates clone dynamic-form-filling ./form-bot --language typescript"
|
|
3989
|
-
],
|
|
3990
|
-
"flags": {
|
|
3991
|
-
"json": {
|
|
3992
|
-
"description": "Print clone result as JSON.",
|
|
3993
|
-
"name": "json",
|
|
3994
|
-
"allowNo": false,
|
|
3995
|
-
"type": "boolean"
|
|
3996
|
-
},
|
|
3997
|
-
"language": {
|
|
3998
|
-
"description": "Template language. Defaults to TypeScript when available, then Python.",
|
|
3999
|
-
"name": "language",
|
|
4000
|
-
"hasDynamicHelp": false,
|
|
4001
|
-
"helpValue": "<language>",
|
|
4002
|
-
"multiple": false,
|
|
4003
|
-
"options": [
|
|
4004
|
-
"typescript",
|
|
4005
|
-
"python"
|
|
4006
|
-
],
|
|
4007
|
-
"type": "option"
|
|
4008
|
-
}
|
|
4009
|
-
},
|
|
4010
|
-
"hasDynamicHelp": false,
|
|
4011
|
-
"hiddenAliases": [],
|
|
4012
|
-
"id": "templates:clone",
|
|
4013
|
-
"pluginAlias": "browse",
|
|
4014
|
-
"pluginName": "browse",
|
|
4015
|
-
"pluginType": "core",
|
|
4016
|
-
"strict": true,
|
|
4017
|
-
"isESM": true,
|
|
4018
|
-
"relativePath": [
|
|
4019
|
-
"dist",
|
|
4020
|
-
"commands",
|
|
4021
|
-
"templates",
|
|
4022
|
-
"clone.js"
|
|
4023
|
-
]
|
|
4024
|
-
},
|
|
4025
|
-
"templates:find": {
|
|
4026
|
-
"aliases": [],
|
|
4027
|
-
"args": {
|
|
4028
|
-
"query": {
|
|
4029
|
-
"description": "Template slug or search query.",
|
|
4030
|
-
"name": "query",
|
|
4031
|
-
"required": true
|
|
4032
|
-
}
|
|
4033
|
-
},
|
|
4034
|
-
"description": "Find Browserbase templates by slug, title, category, or tag.",
|
|
4035
|
-
"examples": [
|
|
4036
|
-
"browse templates find google-trends-keywords",
|
|
4037
|
-
"browse templates find amazon",
|
|
4038
|
-
"browse templates find Python --wide",
|
|
4039
|
-
"browse templates find Python --json"
|
|
4040
|
-
],
|
|
4041
|
-
"flags": {
|
|
4042
|
-
"format": {
|
|
4043
|
-
"description": "Output format. Defaults to table in a terminal and JSON when piped.",
|
|
4044
|
-
"name": "format",
|
|
4045
|
-
"hasDynamicHelp": false,
|
|
4046
|
-
"helpValue": "<format>",
|
|
4047
|
-
"multiple": false,
|
|
4048
|
-
"options": [
|
|
4049
|
-
"table",
|
|
4050
|
-
"json"
|
|
4051
|
-
],
|
|
4052
|
-
"type": "option"
|
|
4053
|
-
},
|
|
4054
|
-
"json": {
|
|
4055
|
-
"description": "Print raw JSON output.",
|
|
4056
|
-
"name": "json",
|
|
4057
|
-
"allowNo": false,
|
|
4058
|
-
"type": "boolean"
|
|
4059
|
-
},
|
|
4060
|
-
"wide": {
|
|
4061
|
-
"description": "Show full table values without truncation.",
|
|
4062
|
-
"name": "wide",
|
|
4063
|
-
"allowNo": false,
|
|
4064
|
-
"type": "boolean"
|
|
4065
|
-
}
|
|
4066
|
-
},
|
|
4067
|
-
"hasDynamicHelp": false,
|
|
4068
|
-
"hiddenAliases": [],
|
|
4069
|
-
"id": "templates:find",
|
|
4070
|
-
"pluginAlias": "browse",
|
|
4071
|
-
"pluginName": "browse",
|
|
4072
|
-
"pluginType": "core",
|
|
4073
|
-
"strict": true,
|
|
4074
|
-
"isESM": true,
|
|
4075
|
-
"relativePath": [
|
|
4076
|
-
"dist",
|
|
4077
|
-
"commands",
|
|
4078
|
-
"templates",
|
|
4079
|
-
"find.js"
|
|
4080
|
-
]
|
|
4081
|
-
},
|
|
4082
|
-
"templates:list": {
|
|
4083
|
-
"aliases": [],
|
|
4084
|
-
"args": {},
|
|
4085
|
-
"description": "List Browserbase templates.",
|
|
4086
|
-
"examples": [
|
|
4087
|
-
"browse templates list",
|
|
4088
|
-
"browse templates list --category \"Web Automation\"",
|
|
4089
|
-
"browse templates list --tag Python --source Browserbase",
|
|
4090
|
-
"browse templates list --wide",
|
|
4091
|
-
"browse templates list --json"
|
|
4092
|
-
],
|
|
4093
|
-
"flags": {
|
|
4094
|
-
"format": {
|
|
4095
|
-
"description": "Output format. Defaults to table in a terminal and JSON when piped.",
|
|
4096
|
-
"name": "format",
|
|
4097
|
-
"hasDynamicHelp": false,
|
|
4098
|
-
"helpValue": "<format>",
|
|
4099
|
-
"multiple": false,
|
|
4100
|
-
"options": [
|
|
4101
|
-
"table",
|
|
4102
|
-
"json"
|
|
4103
|
-
],
|
|
4104
|
-
"type": "option"
|
|
4105
|
-
},
|
|
4106
|
-
"json": {
|
|
4107
|
-
"description": "Print raw JSON output.",
|
|
4108
|
-
"name": "json",
|
|
4109
|
-
"allowNo": false,
|
|
4110
|
-
"type": "boolean"
|
|
4111
|
-
},
|
|
4112
|
-
"wide": {
|
|
4113
|
-
"description": "Show full table values without truncation.",
|
|
4114
|
-
"name": "wide",
|
|
4115
|
-
"allowNo": false,
|
|
4116
|
-
"type": "boolean"
|
|
4117
|
-
},
|
|
4118
|
-
"category": {
|
|
4119
|
-
"description": "Filter templates by category.",
|
|
4120
|
-
"name": "category",
|
|
4121
|
-
"hasDynamicHelp": false,
|
|
4122
|
-
"helpValue": "<category>",
|
|
4123
|
-
"multiple": false,
|
|
4124
|
-
"type": "option"
|
|
4125
|
-
},
|
|
4126
|
-
"source": {
|
|
4127
|
-
"description": "Filter templates by source.",
|
|
4128
|
-
"name": "source",
|
|
4129
|
-
"hasDynamicHelp": false,
|
|
4130
|
-
"helpValue": "<source>",
|
|
4131
|
-
"multiple": false,
|
|
4132
|
-
"type": "option"
|
|
4133
|
-
},
|
|
4134
|
-
"tag": {
|
|
4135
|
-
"description": "Filter templates by tag.",
|
|
4136
|
-
"name": "tag",
|
|
4137
|
-
"hasDynamicHelp": false,
|
|
4138
|
-
"helpValue": "<tag>",
|
|
4139
|
-
"multiple": false,
|
|
4140
|
-
"type": "option"
|
|
4141
|
-
}
|
|
4142
|
-
},
|
|
4143
|
-
"hasDynamicHelp": false,
|
|
4144
|
-
"hiddenAliases": [],
|
|
4145
|
-
"id": "templates:list",
|
|
4146
|
-
"pluginAlias": "browse",
|
|
4147
|
-
"pluginName": "browse",
|
|
4148
|
-
"pluginType": "core",
|
|
4149
|
-
"strict": true,
|
|
4150
|
-
"isESM": true,
|
|
4151
|
-
"relativePath": [
|
|
4152
|
-
"dist",
|
|
4153
|
-
"commands",
|
|
4154
|
-
"templates",
|
|
4155
|
-
"list.js"
|
|
4156
|
-
]
|
|
4157
|
-
},
|
|
4158
4181
|
"cloud:contexts:create": {
|
|
4159
4182
|
"aliases": [],
|
|
4160
4183
|
"args": {},
|
|
@@ -5134,19 +5157,23 @@
|
|
|
5134
5157
|
"update.js"
|
|
5135
5158
|
]
|
|
5136
5159
|
},
|
|
5137
|
-
"cloud:sessions:
|
|
5160
|
+
"cloud:sessions:uploads:create": {
|
|
5138
5161
|
"aliases": [],
|
|
5139
5162
|
"args": {
|
|
5140
5163
|
"id": {
|
|
5141
5164
|
"description": "Session ID.",
|
|
5142
5165
|
"name": "id",
|
|
5143
5166
|
"required": true
|
|
5167
|
+
},
|
|
5168
|
+
"file": {
|
|
5169
|
+
"description": "Path to file to upload.",
|
|
5170
|
+
"name": "file",
|
|
5171
|
+
"required": true
|
|
5144
5172
|
}
|
|
5145
5173
|
},
|
|
5146
|
-
"description": "
|
|
5174
|
+
"description": "Upload a file to a Browserbase session.",
|
|
5147
5175
|
"examples": [
|
|
5148
|
-
"browse cloud sessions
|
|
5149
|
-
"browse cloud sessions downloads get <session-id> --output ./downloads.zip"
|
|
5176
|
+
"browse cloud sessions uploads create <session-id> ./file.pdf"
|
|
5150
5177
|
],
|
|
5151
5178
|
"flags": {
|
|
5152
5179
|
"api-key": {
|
|
@@ -5164,19 +5191,11 @@
|
|
|
5164
5191
|
"helpValue": "<baseUrl>",
|
|
5165
5192
|
"multiple": false,
|
|
5166
5193
|
"type": "option"
|
|
5167
|
-
},
|
|
5168
|
-
"output": {
|
|
5169
|
-
"description": "Path to write the ZIP file.",
|
|
5170
|
-
"name": "output",
|
|
5171
|
-
"hasDynamicHelp": false,
|
|
5172
|
-
"helpValue": "<output>",
|
|
5173
|
-
"multiple": false,
|
|
5174
|
-
"type": "option"
|
|
5175
5194
|
}
|
|
5176
5195
|
},
|
|
5177
5196
|
"hasDynamicHelp": false,
|
|
5178
5197
|
"hiddenAliases": [],
|
|
5179
|
-
"id": "cloud:sessions:
|
|
5198
|
+
"id": "cloud:sessions:uploads:create",
|
|
5180
5199
|
"pluginAlias": "browse",
|
|
5181
5200
|
"pluginName": "browse",
|
|
5182
5201
|
"pluginType": "core",
|
|
@@ -5187,27 +5206,23 @@
|
|
|
5187
5206
|
"commands",
|
|
5188
5207
|
"cloud",
|
|
5189
5208
|
"sessions",
|
|
5190
|
-
"
|
|
5191
|
-
"
|
|
5209
|
+
"uploads",
|
|
5210
|
+
"create.js"
|
|
5192
5211
|
]
|
|
5193
5212
|
},
|
|
5194
|
-
"cloud:sessions:
|
|
5213
|
+
"cloud:sessions:downloads:get": {
|
|
5195
5214
|
"aliases": [],
|
|
5196
5215
|
"args": {
|
|
5197
5216
|
"id": {
|
|
5198
5217
|
"description": "Session ID.",
|
|
5199
5218
|
"name": "id",
|
|
5200
5219
|
"required": true
|
|
5201
|
-
},
|
|
5202
|
-
"file": {
|
|
5203
|
-
"description": "Path to file to upload.",
|
|
5204
|
-
"name": "file",
|
|
5205
|
-
"required": true
|
|
5206
5220
|
}
|
|
5207
5221
|
},
|
|
5208
|
-
"description": "
|
|
5222
|
+
"description": "Download Browserbase session files as a ZIP archive.",
|
|
5209
5223
|
"examples": [
|
|
5210
|
-
"browse cloud sessions
|
|
5224
|
+
"browse cloud sessions downloads get <session-id>",
|
|
5225
|
+
"browse cloud sessions downloads get <session-id> --output ./downloads.zip"
|
|
5211
5226
|
],
|
|
5212
5227
|
"flags": {
|
|
5213
5228
|
"api-key": {
|
|
@@ -5225,11 +5240,19 @@
|
|
|
5225
5240
|
"helpValue": "<baseUrl>",
|
|
5226
5241
|
"multiple": false,
|
|
5227
5242
|
"type": "option"
|
|
5243
|
+
},
|
|
5244
|
+
"output": {
|
|
5245
|
+
"description": "Path to write the ZIP file.",
|
|
5246
|
+
"name": "output",
|
|
5247
|
+
"hasDynamicHelp": false,
|
|
5248
|
+
"helpValue": "<output>",
|
|
5249
|
+
"multiple": false,
|
|
5250
|
+
"type": "option"
|
|
5228
5251
|
}
|
|
5229
5252
|
},
|
|
5230
5253
|
"hasDynamicHelp": false,
|
|
5231
5254
|
"hiddenAliases": [],
|
|
5232
|
-
"id": "cloud:sessions:
|
|
5255
|
+
"id": "cloud:sessions:downloads:get",
|
|
5233
5256
|
"pluginAlias": "browse",
|
|
5234
5257
|
"pluginName": "browse",
|
|
5235
5258
|
"pluginType": "core",
|
|
@@ -5240,10 +5263,10 @@
|
|
|
5240
5263
|
"commands",
|
|
5241
5264
|
"cloud",
|
|
5242
5265
|
"sessions",
|
|
5243
|
-
"
|
|
5244
|
-
"
|
|
5266
|
+
"downloads",
|
|
5267
|
+
"get.js"
|
|
5245
5268
|
]
|
|
5246
5269
|
}
|
|
5247
5270
|
},
|
|
5248
|
-
"version": "0.
|
|
5271
|
+
"version": "0.8.0"
|
|
5249
5272
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browse",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Unified Browserbase CLI for browser automation and cloud APIs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"prepublishOnly": "bun run build"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@browserbasehq/sdk": "^2.
|
|
102
|
+
"@browserbasehq/sdk": "^2.12.0",
|
|
103
103
|
"@browserbasehq/stagehand": "^3.3.0",
|
|
104
104
|
"@oclif/core": "^4.11.0",
|
|
105
105
|
"archiver": "^7.0.1",
|
package/skills/browse/SKILL.md
CHANGED
|
@@ -197,7 +197,7 @@ browse cloud sessions create --context-id <context-id> --persist
|
|
|
197
197
|
|
|
198
198
|
Use `--verified` when the task needs Browserbase Verified browser mode.
|
|
199
199
|
|
|
200
|
-
Use `browse cloud fetch` when the user needs a simple HTTP fetch without browser interaction. Use `browse cloud search` when the user asks for web search results.
|
|
200
|
+
Use `browse cloud fetch` when the user needs a simple HTTP fetch without browser interaction. It returns markdown-formatted page content by default; pass `--format raw` for the original response body or `--format json --schema <schema>` for structured extraction. Use `browse cloud search` when the user asks for web search results.
|
|
201
201
|
|
|
202
202
|
## Browserbase Functions
|
|
203
203
|
|