flashdata-cli 1.1.0__py3-none-macosx_13_0_arm64.whl
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.
- flashdata_cli/__init__.py +32 -0
- flashdata_cli/__main__.py +4 -0
- flashdata_cli/bin/flashdata +0 -0
- flashdata_cli/provenance.json +9 -0
- flashdata_cli/share/CHANGELOG.md +34 -0
- flashdata_cli/share/CONTRIBUTING.md +35 -0
- flashdata_cli/share/LICENSE +21 -0
- flashdata_cli/share/README.md +251 -0
- flashdata_cli/share/README.zh-CN.md +250 -0
- flashdata_cli/share/SECURITY.md +7 -0
- flashdata_cli/share/THIRD_PARTY_NOTICES.md +18 -0
- flashdata_cli/share/docs/bulk.md +29 -0
- flashdata_cli/share/docs/commands.md +548 -0
- flashdata_cli/share/docs/installation.md +304 -0
- flashdata_cli/share/docs/installation.zh-CN.md +304 -0
- flashdata_cli/share/docs/migration.md +13 -0
- flashdata_cli/share/docs/onboarding.md +21 -0
- flashdata_cli/share/docs/release-notes-1.0.0.md +47 -0
- flashdata_cli/share/docs/release-notes-1.0.1.md +43 -0
- flashdata_cli/share/docs/release-notes-1.1.0.md +44 -0
- flashdata_cli/share/docs/release-readiness.md +28 -0
- flashdata_cli/share/docs/releases.md +42 -0
- flashdata_cli/share/docs/response-formats.md +87 -0
- flashdata_cli/share/docs/review.md +41 -0
- flashdata_cli/share/docs/runs.md +47 -0
- flashdata_cli/share/docs/sdk-parity.md +126 -0
- flashdata_cli/share/docs/security.md +29 -0
- flashdata_cli/share/docs/validation.md +69 -0
- flashdata_cli/share/examples/README.md +11 -0
- flashdata_cli/share/examples/batch.json +1 -0
- flashdata_cli/share/examples/bulk-create.json +1 -0
- flashdata_cli/share/examples/bulk-options.json +1 -0
- flashdata_cli/share/examples/bulk-update.json +1 -0
- flashdata_cli/share/examples/download-options.json +1 -0
- flashdata_cli/share/examples/ids.txt +2 -0
- flashdata_cli/share/examples/query-flat.json +1 -0
- flashdata_cli/share/examples/query.json +1 -0
- flashdata_cli/share/examples/storage.example.json +8 -0
- flashdata_cli/share/examples/youtube-metadata.json +1 -0
- flashdata_cli/share/licenses/Go_standard_library_1.27.3_LICENSE.txt +27 -0
- flashdata_cli/share/licenses/github.com_ebitengine_purego_v0.9.0_LICENSE.txt +201 -0
- flashdata_cli/share/licenses/github.com_flashdatadev_flashdata-go_v1.1.0_LICENSE.txt +21 -0
- flashdata_cli/share/licenses/github.com_godbus_dbus_v5_v5.1.0_LICENSE.txt +25 -0
- flashdata_cli/share/licenses/github.com_inconshreveable_mousetrap_v1.1.0_LICENSE.txt +201 -0
- flashdata_cli/share/licenses/github.com_santhosh-tekuri_jsonschema_v5_v5.3.1_LICENSE.txt +175 -0
- flashdata_cli/share/licenses/github.com_spf13_cobra_v1.10.2_LICENSE.txt +174 -0
- flashdata_cli/share/licenses/github.com_spf13_pflag_v1.0.9_LICENSE.txt +28 -0
- flashdata_cli/share/licenses/golang.org_x_sys_v0.36.0_LICENSE.txt +27 -0
- flashdata_cli/share/licenses/golang.org_x_term_v0.35.0_LICENSE.txt +27 -0
- flashdata_cli/share/release-files.json +48 -0
- flashdata_cli-1.1.0.dist-info/METADATA +71 -0
- flashdata_cli-1.1.0.dist-info/RECORD +55 -0
- flashdata_cli-1.1.0.dist-info/WHEEL +4 -0
- flashdata_cli-1.1.0.dist-info/entry_points.txt +2 -0
- flashdata_cli-1.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Launch the bundled FlashData executable without changing CLI behavior."""
|
|
2
|
+
import os
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
"""Pass arguments, streams, environment and exit status to the native CLI."""
|
|
10
|
+
binary = Path(__file__).resolve().parent / "bin" / ("flashdata.exe" if os.name == "nt" else "flashdata")
|
|
11
|
+
arguments = [str(binary), *sys.argv[1:]]
|
|
12
|
+
try:
|
|
13
|
+
if os.name != "nt":
|
|
14
|
+
# Keep PID, terminal and signal handling under the native executable.
|
|
15
|
+
os.execv(str(binary), arguments)
|
|
16
|
+
# Windows has no Unix process replacement. The child shares this console
|
|
17
|
+
# and inherits stdin/stdout/stderr; Ctrl+C reaches it directly.
|
|
18
|
+
child = subprocess.Popen(arguments)
|
|
19
|
+
while True:
|
|
20
|
+
try:
|
|
21
|
+
return child.wait()
|
|
22
|
+
except KeyboardInterrupt:
|
|
23
|
+
# Let the CLI finish its own interruption/recovery handling.
|
|
24
|
+
continue
|
|
25
|
+
except OSError as error:
|
|
26
|
+
# Do not echo arguments or the environment, which can contain secrets.
|
|
27
|
+
print("Cannot start bundled FlashData executable: " + (error.strerror or "operating system error"), file=sys.stderr)
|
|
28
|
+
return 127 if isinstance(error, FileNotFoundError) else 126
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
raise SystemExit(main())
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.1.0",
|
|
3
|
+
"source_commit": "604c679d60e4a0bb6e59bf9fe9006ec1c82bf787",
|
|
4
|
+
"target": "darwin/arm64",
|
|
5
|
+
"archive": "flashdata_1.1.0_darwin_arm64.tar.gz",
|
|
6
|
+
"archive_sha256": "dee0fb10a6dfdd782f310b91dd0961ca6ec09654c8bbde16a938d838435c5748",
|
|
7
|
+
"executable_sha256": "b2e7390d76c0aba756212435edd25e426f2750d323cc9722e1e02bbd7df495ee",
|
|
8
|
+
"wheel_platform": "macosx_13_0_arm64"
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[FlashData](https://flashdata.dev) · [API documentation](https://flashdata.dev/docs)
|
|
4
|
+
|
|
5
|
+
## 1.1.0 — 2026-10-23
|
|
6
|
+
|
|
7
|
+
Redact credentials escaped by the API's Markdown renderer in JSON and plain-text
|
|
8
|
+
responses, including saved results and file exports. Preserve the last saved
|
|
9
|
+
response when a format change cannot be committed, and retain safe recovery after
|
|
10
|
+
an interruption. Cover both async and batch recovery with write-failure regressions.
|
|
11
|
+
|
|
12
|
+
Add independent `--accept` and `--respond-with` flags for API responses, preserving
|
|
13
|
+
JSON defaults and the CLI's `--json` envelope. Support plain-text receipts with
|
|
14
|
+
durable job IDs, Markdown completed results, cached-format checks and safe
|
|
15
|
+
background-result reformatting. Pin Go SDK v1.1.0, update help and
|
|
16
|
+
English/Chinese documentation, and test all sources against API-generated fixtures.
|
|
17
|
+
|
|
18
|
+
## 1.0.1
|
|
19
|
+
|
|
20
|
+
Ship public `discover plans` and `discover status` commands in all five standalone binaries; neither needs an API key. Add English/Chinese workflow selectors, uploaded-caption and complete MP3/MP4 bulk recipes, explicit API coverage and an SDK/CLI comparison. Update release installation and upgrade instructions for Homebrew, APT and RPM. Native archive acceptance tests run the packaged binaries against mock APIs on every supported platform. The Go SDK stays pinned to v1.0.0; existing v1.0.0 release assets are unchanged.
|
|
21
|
+
|
|
22
|
+
## Unreleased packaging
|
|
23
|
+
|
|
24
|
+
Local `flashdata-cli` 1.0.0 PyPI wheel candidates for Linux amd64/arm64, macOS 13+ Intel/Apple Silicon and Windows amd64, with a dependency-free Python launcher, pinned executable provenance, pip/uv installation checks and English/Chinese installation/build docs. No PyPI/TestPyPI publication or change to existing release binaries/tags.
|
|
25
|
+
|
|
26
|
+
## 1.0.0
|
|
27
|
+
|
|
28
|
+
Standalone CLI on the Go SDK; protocol-2 onboarding and fresh-process installation; native DPAPI/Keychain/Secret Service or explicit protected files; profiles and atomic/locked state; query/search/YouTube, async/batch and complete bulk workflows; durable run recovery; account/source discovery; diagnostics; legacy migration; English/简体中文 docs; offline tests and local archives/checksums. Formal GitHub Release with five platform archives, current English/Chinese installation docs, release notes, build report and checksums; no backend deployment.
|
|
29
|
+
|
|
30
|
+
Local review fixes preserve saved credentials under environment overrides and same-key imports; retain recurring policy during recovery; preserve valid public schemas; avoid per-item identity reads in batches; retain batch IDs after commit errors; protect Windows outputs from creation; enforce private credential-bearing inputs; recover large journals; refresh bulk stages and remove spent capabilities; and make migration retries safe. Added direct backend-contract checks, all-source example coverage, manual bulk JSON inputs and matching English/Chinese instructions.
|
|
31
|
+
|
|
32
|
+
Final joint check: retained candidate recovery IDs across SDK/CLI wire errors; partial-export errors; lost ACK/start recovery and spent upload cleanup; generation consistency; reviewed package manifests, deterministic archives, dependency notices and reproducible package checks. Source is hosted on GitHub; no version tag, GitHub Release or backend deployment is created by the source push.
|
|
33
|
+
|
|
34
|
+
The CLI pins SDK v1.0.0 and its verified checksums without a sibling replacement. Archives embed their exact source commit, include release notes and portable build reports, and ship SHA-256 checksums. CI runs native Intel macOS tests and cross-builds Apple Silicon on Go 1.25/1.27; superseded runs cancel automatically.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
[FlashData](https://flashdata.dev) · [API documentation](https://flashdata.dev/docs)
|
|
4
|
+
|
|
5
|
+
## Build from source
|
|
6
|
+
|
|
7
|
+
With Go 1.25+ installed, clone the repository and build from its root. The Go SDK is resolved automatically from the version pinned in `go.mod`.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/flashdatadev/flashdata-cli.git
|
|
11
|
+
cd flashdata-cli
|
|
12
|
+
go build -trimpath -o dist/flashdata ./cmd/flashdata
|
|
13
|
+
./dist/flashdata --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
On Windows PowerShell, after cloning and entering the directory:
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
go build -trimpath -o dist/flashdata.exe ./cmd/flashdata
|
|
20
|
+
.\dist\flashdata.exe --help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
To build the published version instead of the latest source, add `--branch v1.0.0 --depth 1` to `git clone`. For normal installation, use the [installation guide](docs/installation.md).
|
|
24
|
+
|
|
25
|
+
## Development checks
|
|
26
|
+
|
|
27
|
+
Use Go 1.25+ and run `go mod download` to resolve the SDK revision pinned in `go.mod`; no separate SDK checkout is required. Run `go test ./...`, `go vet ./...`, `gofmt` on changed source, and race tests on a supported host. To develop both repositories together, use an explicit local `go.work` file; archive builds disable workspaces and reject SDK replacements. Do not introduce paid/live tests into the default suite. Preserve proof-before-registration, intent-before-submission, no automatic paid retries, account-bound caches, OS-lock crash safety and fresh-process verification before ACK.
|
|
28
|
+
|
|
29
|
+
All HTTP/API contract logic belongs in flashdata-go. CLI compatibility normalization, secure storage, profiles, journaling, output and host scheduling boundaries belong here. Update English/Chinese docs and runnable examples together. Publication/deployment is a separate explicit request.
|
|
30
|
+
|
|
31
|
+
With a local backend checkout available, optionally run `node scripts/check_backend_contracts.cjs /absolute/path/to/backend`. This reads the actual source schemas and invokes pure option/registration validators; it starts no server and makes no paid, registration, database or customer-cloud call. Node is used only for this development check, not by the executable or default Go tests.
|
|
32
|
+
|
|
33
|
+
After changing commands, build the local executable and run `python scripts/generate_commands.py /absolute/path/to/flashdata` to refresh the command reference. Add `--check` to verify that it matches without writing. These are optional development tools; users run only the standalone executable.
|
|
34
|
+
|
|
35
|
+
Python wheel preparation uses `packaging/pypi` and the [English packaging guide](docs/python-packaging.md) / [简体中文](docs/python-packaging.zh-CN.md). Run the packaging unit tests and native pip/uv installation checks after wrapper changes. Never introduce an installation-time binary download, shell argument forwarding or an implicit registry upload.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FlashData
|
|
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.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# FlashData CLI
|
|
2
|
+
|
|
3
|
+
[简体中文](README.zh-CN.md) · [FlashData](https://flashdata.dev) · [API docs](https://flashdata.dev/docs) · [Pricing](https://flashdata.dev/pricing)
|
|
4
|
+
|
|
5
|
+
**Google search and YouTube data, straight from your terminal.** [FlashData](https://flashdata.dev) gives you structured search results, video metadata and existing transcripts through one API. Use `flashdata` to research a topic, feed web results to an AI assistant, build a video dataset, or deliver audio to your cloud storage.
|
|
6
|
+
|
|
7
|
+
No application code is required. Commands return JSON by default, with text and Markdown options. Bulk jobs export JSONL, and saved run IDs let scripts recover accepted work after an interruption.
|
|
8
|
+
|
|
9
|
+
## Choose a workflow
|
|
10
|
+
|
|
11
|
+
| What you want to build | Start here |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| Web context and source links for an AI assistant | [Google search](#search-the-web-for-research-or-ai-context) |
|
|
14
|
+
| Industry research or news monitoring | [News search](#search-the-web-for-research-or-ai-context) |
|
|
15
|
+
| Video discovery for a topic or learning resource | [YouTube search](#find-youtube-videos-and-collect-their-data) |
|
|
16
|
+
| Video analytics and catalog enrichment | [Video metadata](#find-youtube-videos-and-collect-their-data) |
|
|
17
|
+
| Text for video summaries, search or retrieval | [Existing transcripts](#find-youtube-videos-and-collect-their-data) |
|
|
18
|
+
| A dataset from a list of video IDs | [Bulk metadata export](#build-a-video-dataset-with-one-bulk-command) |
|
|
19
|
+
| Audio or video files delivered to your own cloud bucket | [Bulk media download](#complete-bulk-workflow) |
|
|
20
|
+
| Continue an interrupted bulk job | [Recovery](#recover-interrupted-work) |
|
|
21
|
+
|
|
22
|
+
The examples collect data; your application provides summarization, indexing, scheduling
|
|
23
|
+
and AI model calls.
|
|
24
|
+
|
|
25
|
+
## Get started
|
|
26
|
+
|
|
27
|
+
On macOS or Linux with [Homebrew](https://brew.sh):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brew install flashdatadev/tap/flashdata
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
For **Ubuntu/Debian**, **Fedora/RHEL** or **Windows**, follow the [installation guide](docs/installation.md), or download a [standalone executable](https://github.com/flashdatadev/flashdata-cli/releases/tag/v1.1.0). Native installs need no Go, Python or Node.js. Linux and macOS support Intel/AMD and ARM64; Windows supports x64.
|
|
34
|
+
|
|
35
|
+
Get an API key from your [FlashData account](https://flashdata.dev). Run `auth login` and paste it at the hidden prompt, then make your first search:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
flashdata auth login
|
|
39
|
+
flashdata search "battery recycling startups" --num 5 --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The result includes structured Google search data such as page titles, links and snippets. Your key is saved for later commands using the platform credential store where available; see [credential storage](docs/security.md). Queries and jobs use your account's credits; see [pricing](https://flashdata.dev/pricing).
|
|
43
|
+
|
|
44
|
+
Looking for `pip` or `uv`? The Python installer package is **not published to PyPI yet**. Use the install methods above, or follow the [candidate-wheel guide](docs/python-packaging.md).
|
|
45
|
+
|
|
46
|
+
## JSON, plain text and Markdown
|
|
47
|
+
|
|
48
|
+
Version 1.1.0 includes `--accept` and `--respond-with`. Install a standalone
|
|
49
|
+
release binary, or use Go 1.25+:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
go install github.com/flashdatadev/flashdata-cli/cmd/flashdata@v1.1.0
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Choose plain text or Markdown for a search:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
flashdata search "vector databases" --accept text/plain
|
|
59
|
+
flashdata search "vector databases" --accept text/plain --respond-with markdown
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
JSON remains the default. `--accept` also applies to async receipts, batches and
|
|
63
|
+
job status. Markdown applies to realtime queries and completed results. Add
|
|
64
|
+
`--json` to wrap text in the CLI envelope, or `--output FILE` to save the selected
|
|
65
|
+
body. See [response formats and recovery](docs/response-formats.md).
|
|
66
|
+
|
|
67
|
+
## Search the web for research or AI context
|
|
68
|
+
|
|
69
|
+
Save search results to a file for your script or assistant:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
flashdata search "battery recycling startups" --num 5 --output search.json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Use `--gl us` and `--hl en` to set the search country and interface language. For news, images, shopping, videos or places, use `query` with the matching source. For example, save this as `news-query.json`:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{"source":"google_news","query":"battery recycling"}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Then run:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
flashdata query --input news-query.json --output news.json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
See [available sources and inputs](https://flashdata.dev/docs) or run `flashdata sources list` and `flashdata sources show google_news`.
|
|
88
|
+
|
|
89
|
+
## Find YouTube videos and collect their data
|
|
90
|
+
|
|
91
|
+
**Find videos about a topic:**
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
flashdata youtube search "Go programming tutorial" --max-results 5 --json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Get a video's title, channel, duration and engagement data:**
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
flashdata youtube metadata dQw4w9WgXcQ --output video.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Get an existing English transcript for summarization or analysis:**
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
flashdata youtube transcript dQw4w9WgXcQ --language en --output transcript.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use a video ID from the search results in place of `dQw4w9WgXcQ`. Transcript availability depends on the video's existing language tracks; this does not transcribe arbitrary audio. Use `youtube captions` to request an existing manual caption track instead.
|
|
110
|
+
|
|
111
|
+
**Read an existing uploaded caption track:**
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
flashdata youtube captions dQw4w9WgXcQ --language en --output captions.json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`--json` writes a machine-readable response to stdout; `--output FILE` saves the result. Choose a new output filename for each export: existing files are never overwritten.
|
|
118
|
+
|
|
119
|
+
## Build a video dataset with one bulk command
|
|
120
|
+
|
|
121
|
+
Create `ids.txt` with one YouTube video ID per line:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
dQw4w9WgXcQ
|
|
125
|
+
jNQXAC9IVRw
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Collect metadata for all IDs and export the per-video results:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
flashdata bulk run --source youtube_metadata --input ids.txt --run-id video-dataset-001 --timeout 1h --output videos.jsonl
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
This command creates the job, uploads your IDs, starts processing, waits and writes `videos.jsonl`. Each line records one video's outcome and data. Change `--source` to `youtube_transcript`, `youtube_captions` or `youtube_trainability` for other bulk datasets. See the [bulk guide](docs/bulk.md) for options and item statuses.
|
|
135
|
+
|
|
136
|
+
## Complete bulk workflow
|
|
137
|
+
|
|
138
|
+
### Deliver audio files to your cloud bucket
|
|
139
|
+
|
|
140
|
+
Use the same `ids.txt` to request MP3 audio for multiple videos. Media files are delivered **to your bucket**; the local JSONL file contains delivery receipts.
|
|
141
|
+
|
|
142
|
+
**1. Configure your destination.** In a private working directory outside source control, create `storage.json` and replace every placeholder with your own S3 bucket and credentials:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"storage_type": "s3",
|
|
147
|
+
"storage_url": "YOUR_BUCKET_NAME",
|
|
148
|
+
"region": "us-east-1",
|
|
149
|
+
"access_key": "YOUR_STORAGE_ACCESS_KEY",
|
|
150
|
+
"secret_key": "YOUR_STORAGE_SECRET_KEY",
|
|
151
|
+
"object_prefix": "flashdata/audio"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Create `audio-options.json` in the same directory:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{"download_type":"audio","output_format":"mp3"}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
On Linux/macOS, make both files private before running the command:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
chmod 600 storage.json audio-options.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
On Windows, restrict both files' ACLs to your user, SYSTEM and optionally Administrators; see [private-file requirements](docs/security.md). Other supported destinations include S3-compatible storage, OSS, GCS, Azure, COS, BOS and TOS; see [storage options](docs/bulk.md).
|
|
168
|
+
|
|
169
|
+
**2. Run the complete task.** Run from the directory containing those files and `ids.txt`:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
flashdata bulk run --source youtube_download --input ids.txt --storage-config storage.json --options audio-options.json --run-id audio-bulk-001 --timeout 1h --output audio-receipts.jsonl
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The command creates, uploads, starts, waits and exports. Check `audio-receipts.jsonl` for each video's delivery status and destination. A completed job can still contain failed items; those receipts are saved and the command exits with a nonzero status.
|
|
176
|
+
|
|
177
|
+
**For one video**, use the same storage configuration:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
flashdata youtube download dQw4w9WgXcQ --storage-config storage.json --format mp3 --wait --timeout 30m --output audio-delivery.json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Deliver MP4 video to your cloud bucket
|
|
184
|
+
|
|
185
|
+
Use the same `ids.txt` and private `storage.json`, and create `video-options.json`:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{"download_type":"audio_video","video_quality":"<=720","output_format":"mp4"}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
On Linux/macOS, restrict the options file first:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
chmod 600 video-options.json
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
flashdata bulk run --source youtube_download --input ids.txt --storage-config storage.json --options video-options.json --run-id video-bulk-001 --timeout 1h --output video-receipts.jsonl
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Video files go to the bucket; per-video delivery outcomes go to `video-receipts.jsonl`.
|
|
202
|
+
On Windows, apply the same private ACL requirements as for the audio options file.
|
|
203
|
+
|
|
204
|
+
### Recover interrupted work
|
|
205
|
+
|
|
206
|
+
Keep the same profile and state directory. List saved runs, then recover the accepted bulk job into a fresh output file:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
flashdata runs list
|
|
210
|
+
flashdata runs recover audio-bulk-001 --timeout 1h --output recovered-receipts.jsonl
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Recovery reads the existing job; it does not submit another download. For the metadata dataset above, substitute `video-dataset-001`; for MP4 delivery, use `video-bulk-001`. If an interruption occurred before upload/start, inspect the run and follow the [bulk recovery guide](docs/bulk.md). A timeout stops local waiting; accepted server work continues.
|
|
214
|
+
|
|
215
|
+
Use a new run ID only when you intend to create a new task. See [run history and recovery](docs/runs.md) for scripts, uncertain submissions and partial exports.
|
|
216
|
+
|
|
217
|
+
## Supported APIs
|
|
218
|
+
|
|
219
|
+
| Capability | Commands |
|
|
220
|
+
| --- | --- |
|
|
221
|
+
| Google search, images, news, shopping, videos and places | `search`; `query --input FILE` for all six sources |
|
|
222
|
+
| All nine YouTube sources | `youtube search/metadata/transcript/captions/download`; `query` for extended search, channel, suggestions, license labels and full download inputs |
|
|
223
|
+
| Realtime, background and mixed batches | `query`, `query --mode async`, `batch submit` |
|
|
224
|
+
| Standard jobs | `jobs get`, `jobs wait`, `jobs result` |
|
|
225
|
+
| All five bulk sources and lifecycle/results | `bulk run`, manual `bulk` commands, `runs recover` |
|
|
226
|
+
| Access, balance, prices, limits and usage | `auth status`, `account balance/pricing/limits/usage` |
|
|
227
|
+
| Public source catalog and health | `sources list`, `discover` |
|
|
228
|
+
| Public plan catalog and status | `discover plans`, `discover status` |
|
|
229
|
+
|
|
230
|
+
All commands above are included in the ready-to-run **v1.1.0** release. `discover plans` and `discover status` need no API key. Upgrade an existing installation with `brew update && brew upgrade flashdatadev/tap/flashdata`, `sudo apt-get update && sudo apt-get install --only-upgrade flashdata`, or `sudo dnf --refresh upgrade flashdata`; see the [installation guide](docs/installation.md) for repository setup and Windows upgrades. Your profiles and run history are preserved.
|
|
231
|
+
|
|
232
|
+
All 15 sources support background/batch execution; 14 support realtime. Downloads run in the background and require your cloud storage. Use `sources show SOURCE` for source schemas and a runnable JSON request. The single-video `youtube download` shortcut delivers audio; `query --mode async` and bulk expose the full media source options.
|
|
233
|
+
|
|
234
|
+
See the [SDK and CLI comparison](docs/sdk-parity.md) and [command reference](docs/commands.md).
|
|
235
|
+
|
|
236
|
+
## More workflows
|
|
237
|
+
|
|
238
|
+
**Check before spending credits:** `--dry-run` validates input without submitting a paid query. Balance reads are also free.
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
flashdata search "battery recycling startups" --num 5 --dry-run
|
|
242
|
+
flashdata account balance
|
|
243
|
+
flashdata --help
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
- **Scripts and AI agents:** use `--json --non-interactive`, [profiles and credentials](docs/security.md), and [stable run IDs](docs/runs.md). Store a key through `auth login --api-key-stdin` when integrating a secret manager. An explicitly set `FLASHDATA_API_KEY` overrides the saved key for that command; `.env` files are not loaded.
|
|
247
|
+
- **Background queries and mixed batches:** see the [runnable inputs](examples/README.md) and [command reference](docs/commands.md).
|
|
248
|
+
- **New agent setup and browser claiming:** see [onboarding](docs/onboarding.md). This optional flow depends on server availability; existing accounts can use `auth login` directly.
|
|
249
|
+
- **Use FlashData inside a Go application:** install the [Go SDK](https://github.com/flashdatadev/flashdata-go), which powers this CLI.
|
|
250
|
+
|
|
251
|
+
[Installation and upgrades](docs/installation.md) · [API documentation](https://flashdata.dev/docs) · [Troubleshooting](docs/security.md) · [Contributing and source builds](CONTRIBUTING.md) · [Release notes](docs/release-notes-1.1.0.md) · [MIT license](LICENSE)
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# FlashData CLI
|
|
2
|
+
|
|
3
|
+
[English](README.md) · [FlashData 官网](https://flashdata.dev) · [API 文档](https://flashdata.dev/docs) · [价格](https://flashdata.dev/pricing)
|
|
4
|
+
|
|
5
|
+
**在终端直接获取 Google 搜索结果和 YouTube 数据。** [FlashData](https://flashdata.dev) 通过统一 API 提供结构化搜索结果、视频元数据和已有字幕。使用 `flashdata` 研究主题、为 AI 助手提供网页信息、构建视频数据集,或将音频交付到自己的云存储。
|
|
6
|
+
|
|
7
|
+
无需编写应用代码。命令默认返回 JSON,当前源码还支持纯文本和 Markdown。批量任务导出 JSONL;保存的运行 ID 可以帮助脚本在中断后恢复已受理的任务。
|
|
8
|
+
|
|
9
|
+
## 按使用场景选择工作流
|
|
10
|
+
|
|
11
|
+
| 想要构建的功能 | 从这里开始 |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 为 AI 助手提供网页上下文和来源链接 | [Google 搜索](#搜索网页用于研究或-ai-上下文) |
|
|
14
|
+
| 行业研究或新闻监控 | [新闻搜索](#搜索网页用于研究或-ai-上下文) |
|
|
15
|
+
| 按主题发现视频或学习资源 | [YouTube 搜索](#查找-youtube-视频并获取数据) |
|
|
16
|
+
| 视频分析和内容目录补全 | [视频元数据](#查找-youtube-视频并获取数据) |
|
|
17
|
+
| 为视频摘要、搜索或检索获取文本 | [已有字幕文本](#查找-youtube-视频并获取数据) |
|
|
18
|
+
| 根据一组视频 ID 构建数据集 | [批量元数据导出](#一条批量命令构建视频数据集) |
|
|
19
|
+
| 将音频或视频交付到自己的云存储桶 | [批量媒体下载](#完整批量工作流) |
|
|
20
|
+
| 继续中断的批量任务 | [恢复任务](#恢复中断的任务) |
|
|
21
|
+
|
|
22
|
+
以下示例负责获取数据;摘要、检索索引、调度和 AI 模型调用由应用实现。
|
|
23
|
+
|
|
24
|
+
## 快速开始
|
|
25
|
+
|
|
26
|
+
在已安装 [Homebrew](https://brew.sh) 的 macOS 或 Linux 上运行:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
brew install flashdatadev/tap/flashdata
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Ubuntu/Debian**、**Fedora/RHEL** 和 **Windows** 用户请参阅[安装指南](docs/installation.zh-CN.md),或下载[独立可执行文件](https://github.com/flashdatadev/flashdata-cli/releases/tag/v1.1.0)。原生安装无需 Go、Python 或 Node.js。Linux 和 macOS 支持 Intel/AMD 与 ARM64,Windows 支持 x64。
|
|
33
|
+
|
|
34
|
+
从 [FlashData 账户](https://flashdata.dev) 获取 API 密钥。运行 `auth login`,在隐藏输入提示中粘贴密钥,然后执行第一次搜索:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
flashdata auth login
|
|
38
|
+
flashdata search "battery recycling startups" --num 5 --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
结果包含网页标题、链接和摘要等结构化 Google 搜索数据。密钥会保存供后续命令使用;平台凭据存储可用时会优先使用,详见[凭据存储](docs/security.md)。查询和任务会消耗账户额度,参见[价格](https://flashdata.dev/pricing)。
|
|
42
|
+
|
|
43
|
+
想使用 `pip` 或 `uv`?Python 安装包**尚未发布到 PyPI**。请使用上述安装方式,或参阅[候选 wheel 指南](docs/python-packaging.zh-CN.md)。
|
|
44
|
+
|
|
45
|
+
## JSON、纯文本和 Markdown
|
|
46
|
+
|
|
47
|
+
1.1.0 正式版包含 `--accept` 和 `--respond-with`。可安装独立可执行文件,
|
|
48
|
+
或使用 Go 1.25+ 安装:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
go install github.com/flashdatadev/flashdata-cli/cmd/flashdata@v1.1.0
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
为搜索选择纯文本或 Markdown:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
flashdata search "vector databases" --accept text/plain
|
|
58
|
+
flashdata search "vector databases" --accept text/plain --respond-with markdown
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
JSON 仍是默认格式。`--accept` 也适用于后台回执、批量提交和任务状态。Markdown
|
|
62
|
+
适用于实时查询和已完成结果。增加 `--json` 可将文本放入 CLI 的 JSON 输出外层,
|
|
63
|
+
使用 `--output FILE` 可保存所选格式的正文。参见[响应格式与恢复](docs/response-formats.md)。
|
|
64
|
+
|
|
65
|
+
## 搜索网页,用于研究或 AI 上下文
|
|
66
|
+
|
|
67
|
+
将搜索结果保存为文件,供脚本或助手读取:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
flashdata search "battery recycling startups" --num 5 --output search.json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
通过 `--gl us` 和 `--hl en` 设置搜索国家及界面语言。新闻、图片、购物、视频或地点搜索可通过 `query` 指定对应来源。例如,将以下内容保存为 `news-query.json`:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{"source":"google_news","query":"battery recycling"}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
然后运行:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
flashdata query --input news-query.json --output news.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
参阅[可用来源和输入参数](https://flashdata.dev/docs),或运行 `flashdata sources list` 和 `flashdata sources show google_news`。
|
|
86
|
+
|
|
87
|
+
## 查找 YouTube 视频并获取数据
|
|
88
|
+
|
|
89
|
+
**按主题查找视频:**
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
flashdata youtube search "Go programming tutorial" --max-results 5 --json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**获取视频标题、频道、时长和互动数据:**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
flashdata youtube metadata dQw4w9WgXcQ --output video.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**获取已有的英文字幕,用于摘要或分析:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
flashdata youtube transcript dQw4w9WgXcQ --language en --output transcript.json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
将 `dQw4w9WgXcQ` 替换为搜索结果中的视频 ID。字幕能否获取取决于该视频已有的语言轨道;此功能不会将任意音频转写为文字。如需已有的人工字幕轨道,使用 `youtube captions`。
|
|
108
|
+
|
|
109
|
+
**读取已有的人工字幕轨道:**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
flashdata youtube captions dQw4w9WgXcQ --language en --output captions.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`--json` 将机器可读响应写到标准输出;`--output FILE` 将结果保存为文件。每次导出请使用新的文件名:已有文件不会被覆盖。
|
|
116
|
+
|
|
117
|
+
## 一条批量命令构建视频数据集
|
|
118
|
+
|
|
119
|
+
创建 `ids.txt`,每行填写一个 YouTube 视频 ID:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
dQw4w9WgXcQ
|
|
123
|
+
jNQXAC9IVRw
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
获取所有 ID 的元数据并导出逐视频结果:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
flashdata bulk run --source youtube_metadata --input ids.txt --run-id video-dataset-001 --timeout 1h --output videos.jsonl
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
此命令会创建任务、上传 ID、启动处理、等待完成,并写入 `videos.jsonl`。每行记录一个视频的处理状态和数据。将 `--source` 改为 `youtube_transcript`、`youtube_captions` 或 `youtube_trainability`,即可构建其他类型的批量数据集。选项和逐项状态说明见[批量处理指南](docs/bulk.md)。
|
|
133
|
+
|
|
134
|
+
## 完整批量工作流
|
|
135
|
+
|
|
136
|
+
### 将音频文件交付到云存储桶
|
|
137
|
+
|
|
138
|
+
使用相同的 `ids.txt` 为多个视频请求 MP3 音频。媒体文件会交付**到你的存储桶**;本地 JSONL 文件保存交付回执。
|
|
139
|
+
|
|
140
|
+
**1. 配置目标存储。** 在源码管理之外的私有工作目录中创建 `storage.json`,将所有占位符替换为自己的 S3 存储桶和凭据:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"storage_type": "s3",
|
|
145
|
+
"storage_url": "YOUR_BUCKET_NAME",
|
|
146
|
+
"region": "us-east-1",
|
|
147
|
+
"access_key": "YOUR_STORAGE_ACCESS_KEY",
|
|
148
|
+
"secret_key": "YOUR_STORAGE_SECRET_KEY",
|
|
149
|
+
"object_prefix": "flashdata/audio"
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
在同一目录中创建 `audio-options.json`:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{"download_type":"audio","output_format":"mp3"}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Linux/macOS 上,在运行命令前将两个文件设为私有:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
chmod 600 storage.json audio-options.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Windows 上,将两个文件的 ACL 限制为当前用户、SYSTEM 以及可选的 Administrators,详见[私有文件要求](docs/security.md)。还支持 S3 兼容存储、OSS、GCS、Azure、COS、BOS 和 TOS,参见[存储选项](docs/bulk.md)。
|
|
166
|
+
|
|
167
|
+
**2. 执行完整任务。** 在包含上述文件及 `ids.txt` 的目录中运行:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
flashdata bulk run --source youtube_download --input ids.txt --storage-config storage.json --options audio-options.json --run-id audio-bulk-001 --timeout 1h --output audio-receipts.jsonl
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
命令会完成创建、上传、启动、等待和导出。查看 `audio-receipts.jsonl`,检查每个视频的交付状态和目标位置。即使任务已完成,也可能存在失败条目;回执会保留,命令会以非零状态退出。
|
|
174
|
+
|
|
175
|
+
**只处理一个视频**时,使用相同的存储配置:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
flashdata youtube download dQw4w9WgXcQ --storage-config storage.json --format mp3 --wait --timeout 30m --output audio-delivery.json
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 将 MP4 视频交付到云存储桶
|
|
182
|
+
|
|
183
|
+
使用相同的 `ids.txt` 和私有 `storage.json`,创建 `video-options.json`:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{"download_type":"audio_video","video_quality":"<=720","output_format":"mp4"}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Linux/macOS 上先限制文件权限:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
chmod 600 video-options.json
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
flashdata bulk run --source youtube_download --input ids.txt --storage-config storage.json --options video-options.json --run-id video-bulk-001 --timeout 1h --output video-receipts.jsonl
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
视频文件写入存储桶,逐视频交付状态写入 `video-receipts.jsonl`。
|
|
200
|
+
Windows 上应使用与音频选项文件相同的私有 ACL。
|
|
201
|
+
|
|
202
|
+
### 恢复中断的任务
|
|
203
|
+
|
|
204
|
+
保持相同的配置和状态目录。列出保存的运行记录,然后将已受理的批量任务恢复到一个新的输出文件:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
flashdata runs list
|
|
208
|
+
flashdata runs recover audio-bulk-001 --timeout 1h --output recovered-receipts.jsonl
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
恢复操作读取原有任务,不会提交另一次下载。恢复上面的元数据任务时,将运行 ID 换为 `video-dataset-001`;恢复 MP4 交付时使用 `video-bulk-001`。如果在上传或启动之前中断,请检查运行记录并遵循[批量恢复指南](docs/bulk.md)。超时只会停止本地等待,已受理的服务端任务仍会继续。
|
|
212
|
+
|
|
213
|
+
只有打算创建新任务时才使用新的运行 ID。脚本、结果不确定的提交和部分导出的说明见[运行历史与恢复](docs/runs.md)。
|
|
214
|
+
|
|
215
|
+
## 支持的 API
|
|
216
|
+
|
|
217
|
+
| 能力 | 命令 |
|
|
218
|
+
| --- | --- |
|
|
219
|
+
| Google 搜索、图片、新闻、购物、视频和地点 | `search`;全部六个来源均可使用 `query --input FILE` |
|
|
220
|
+
| 全部九个 YouTube 来源 | `youtube search/metadata/transcript/captions/download`;扩展搜索、频道、建议、许可标签和完整下载输入使用 `query` |
|
|
221
|
+
| 实时、后台和混合批次 | `query`、`query --mode async`、`batch submit` |
|
|
222
|
+
| 普通后台任务 | `jobs get`、`jobs wait`、`jobs result` |
|
|
223
|
+
| 全部五个批量来源、任务控制和结果 | `bulk run`、手动 `bulk` 命令、`runs recover` |
|
|
224
|
+
| 访问权限、余额、定价、限制和用量 | `auth status`、`account balance/pricing/limits/usage` |
|
|
225
|
+
| 公共来源目录和健康状态 | `sources list`、`discover` |
|
|
226
|
+
| 公共套餐目录和服务状态 | `discover plans`、`discover status` |
|
|
227
|
+
|
|
228
|
+
上述所有命令均包含在开箱即用的 **v1.1.0** 正式版中。`discover plans` 和 `discover status` 无需 API 密钥。已有安装可执行 `brew update && brew upgrade flashdatadev/tap/flashdata`、`sudo apt-get update && sudo apt-get install --only-upgrade flashdata` 或 `sudo dnf --refresh upgrade flashdata` 升级;软件源配置及 Windows 升级见[安装指南](docs/installation.zh-CN.md)。升级保留用户配置和执行历史。
|
|
229
|
+
|
|
230
|
+
全部 15 个来源支持后台/批次执行,其中 14 个支持实时请求。下载在后台运行,需要自己的云存储。
|
|
231
|
+
通过 `sources show SOURCE` 查看来源模式和可运行 JSON 请求。单视频 `youtube download` 快捷命令面向音频;`query --mode async` 和批量任务支持完整的媒体来源选项。
|
|
232
|
+
|
|
233
|
+
参阅[各 SDK 与 CLI 对比(英文)](docs/sdk-parity.md)和[命令参考](docs/commands.md)。
|
|
234
|
+
|
|
235
|
+
## 更多工作流
|
|
236
|
+
|
|
237
|
+
**消耗额度前先检查:** `--dry-run` 验证输入,不提交付费查询。余额查询同样免费。
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
flashdata search "battery recycling startups" --num 5 --dry-run
|
|
241
|
+
flashdata account balance
|
|
242
|
+
flashdata --help
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
- **脚本与 AI 代理:** 使用 `--json --non-interactive`、[配置和凭据管理](docs/security.md),以及[稳定的运行 ID](docs/runs.md)。集成密钥管理器时可通过 `auth login --api-key-stdin` 保存密钥。显式设置的 `FLASHDATA_API_KEY` 会在当前命令中覆盖已保存密钥;不会自动加载 `.env` 文件。
|
|
246
|
+
- **后台查询与混合批次:** 参阅[可运行输入示例](examples/README.md)及[命令参考](docs/commands.md)。
|
|
247
|
+
- **新代理接入与浏览器认领:** 参阅[接入指南](docs/onboarding.md)。此可选流程取决于服务端是否启用;已有账户可直接使用 `auth login`。
|
|
248
|
+
- **在 Go 应用中使用 FlashData:** 安装本 CLI 所使用的 [Go SDK](https://github.com/flashdatadev/flashdata-go)。
|
|
249
|
+
|
|
250
|
+
[安装与升级](docs/installation.zh-CN.md) · [API 文档](https://flashdata.dev/docs) · [故障排查](docs/security.md) · [参与贡献与源码构建](CONTRIBUTING.md) · [版本说明](docs/release-notes-1.1.0.md) · [MIT 许可](LICENSE)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
[FlashData](https://flashdata.dev) · [API documentation](https://flashdata.dev/docs)
|
|
4
|
+
|
|
5
|
+
Read the [storage and threat model](docs/security.md). Never put API keys, proofs, signed URLs or customer-storage secrets into issue reports. Use the private support channel available from your FlashData account. No security-report email address is invented here.
|
|
6
|
+
|
|
7
|
+
Default tests use dummy keys and local mock servers. Do not run undocumented live onboarding or paid calls while debugging. Preserve uncertain run records and original credential stores; deleting them is not a safe authentication repair.
|