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,304 @@
|
|
|
1
|
+
# Install FlashData CLI v1.1.0
|
|
2
|
+
|
|
3
|
+
[FlashData](https://flashdata.dev) · [API docs](https://flashdata.dev/docs) · [简体中文](installation.zh-CN.md) · [Release downloads](https://github.com/flashdatadev/flashdata-cli/releases/tag/v1.1.0)
|
|
4
|
+
|
|
5
|
+
Install the matching standalone executable. Standalone/OS packages need no Go, Node.js, Python or Docker; the Python installer route requires Python 3.10+. Downloading and offline version/help checks need no API key.
|
|
6
|
+
|
|
7
|
+
## Python installers (local candidate)
|
|
8
|
+
|
|
9
|
+
**Not published to PyPI yet.** Build `dist/wheels` using the [packaging guide](python-packaging.md). These wheels require Python 3.10+, no Go installation, and use the verified existing CLI binary. See the [package README](../packaging/pypi/README.md) for supported platforms, installer isolation and maintenance.
|
|
10
|
+
|
|
11
|
+
Run from the CLI checkout after building `dist/wheels`. Choose one method. Use an isolated Python environment for pip/uv pip; use `uv tool` for an independent CLI environment. The command remains `flashdata`.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m venv .venv-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Activate it with `source .venv-cli/bin/activate` on Bash, or `.venv-cli\Scripts\Activate.ps1` on PowerShell. Then choose pip or uv pip:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python -m pip install --no-index --find-links dist/wheels flashdata-cli==1.0.0
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv pip install --no-index --find-links dist/wheels flashdata-cli==1.0.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Alternatively, outside the virtual environment:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv tool install --no-index --find-links dist/wheels flashdata-cli==1.0.0
|
|
31
|
+
flashdata --version
|
|
32
|
+
flashdata --help
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If uv reports that its executable directory is not on PATH, run `uv tool update-shell` and restart the shell. A previous Homebrew/APT/RPM/manual installation can shadow this command; check `command -v flashdata` on Bash or `Get-Command flashdata` on PowerShell. Avoid using multiple managers for the same PATH entry.
|
|
36
|
+
|
|
37
|
+
After a future PyPI publication, the registry commands will be `pip install flashdata-cli`, `uv pip install flashdata-cli`, or `uv tool install flashdata-cli`. **They are not currently an official registry installation method.** The local `--no-index --find-links` instructions above are usable now.
|
|
38
|
+
|
|
39
|
+
For an updated local wheel set, retain `--no-index --find-links dist/wheels` and use pip/uv pip `--upgrade` or uv tool `--reinstall`. Update the exact version constraint intentionally; `==1.0.0` stays pinned. Uninstall with `python -m pip uninstall flashdata-cli`, `uv pip uninstall flashdata-cli`, or `uv tool uninstall flashdata-cli`. Removal preserves profiles, credentials and run history; use `flashdata auth logout` first to remove a saved credential.
|
|
40
|
+
|
|
41
|
+
## APT (Ubuntu and Debian)
|
|
42
|
+
|
|
43
|
+
Use the [official signed APT repository](https://github.com/flashdatadev/apt) on Ubuntu 22.04/24.04 or Debian 12/13, with amd64 or arm64. Package **1.1.0-1** contains the same CLI **1.1.0** executable as the release archives; `-1` is the Debian packaging revision. No Go, Python or Node.js runtime is required.
|
|
44
|
+
|
|
45
|
+
Run this one-time Bash setup with sudo access. It checks the public key fingerprint, uses a repository-scoped `Signed-By` keyring and permits only the `flashdata` package from this source:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
(
|
|
49
|
+
set -eu
|
|
50
|
+
arch="$(dpkg --print-architecture)"
|
|
51
|
+
case "$arch" in amd64|arm64) ;; *) echo "Unsupported architecture: $arch" >&2; exit 1 ;; esac
|
|
52
|
+
sudo apt-get update
|
|
53
|
+
sudo apt-get install -y ca-certificates curl gnupg
|
|
54
|
+
work_dir="$(mktemp -d)"
|
|
55
|
+
trap 'rm -rf -- "$work_dir"' EXIT
|
|
56
|
+
curl --fail --location https://flashdatadev.github.io/apt/flashdata.asc --output "$work_dir/flashdata.asc"
|
|
57
|
+
expected=19F337AC01C5F5B646A5583A04C7934A11D38FFA
|
|
58
|
+
actual="$(gpg --batch --show-keys --with-colons "$work_dir/flashdata.asc" 2>/dev/null | awk -F: '$1 == "fpr" { print $10; exit }')"
|
|
59
|
+
test "$actual" = "$expected"
|
|
60
|
+
sudo install -d -m 0755 /etc/apt/keyrings
|
|
61
|
+
sudo install -m 0644 "$work_dir/flashdata.asc" /etc/apt/keyrings/flashdata.asc
|
|
62
|
+
sudo tee /etc/apt/sources.list.d/flashdata.sources >/dev/null <<EOF
|
|
63
|
+
Types: deb
|
|
64
|
+
URIs: https://flashdatadev.github.io/apt/
|
|
65
|
+
Suites: stable
|
|
66
|
+
Components: main
|
|
67
|
+
Architectures: $arch
|
|
68
|
+
Signed-By: /etc/apt/keyrings/flashdata.asc $expected
|
|
69
|
+
EOF
|
|
70
|
+
sudo tee /etc/apt/preferences.d/flashdata >/dev/null <<'EOF'
|
|
71
|
+
Package: flashdata
|
|
72
|
+
Pin: release o=FlashData
|
|
73
|
+
Pin-Priority: 500
|
|
74
|
+
|
|
75
|
+
Package: *
|
|
76
|
+
Pin: release o=FlashData
|
|
77
|
+
Pin-Priority: -1
|
|
78
|
+
EOF
|
|
79
|
+
sudo apt-get update
|
|
80
|
+
sudo apt-get install -y flashdata
|
|
81
|
+
flashdata --version
|
|
82
|
+
flashdata --help
|
|
83
|
+
)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The dedicated certificate fingerprint is `19F337AC01C5F5B646A5583A04C7934A11D38FFA` (`FlashData APT Signing <support@flashdata.dev>`). Verify it against the [public key record](https://github.com/flashdatadev/apt/tree/main/keys). Do not disable signature/expiration checking or add the key to APT's global trusted keyring.
|
|
87
|
+
|
|
88
|
+
Upgrade after a newer CLI or packaging revision is published:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
sudo apt-get update
|
|
92
|
+
sudo apt-get install --only-upgrade flashdata
|
|
93
|
+
flashdata --version
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Inspect the package version and included examples/docs:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
dpkg-query -W -f='${Version}\n' flashdata
|
|
100
|
+
apt-cache policy flashdata
|
|
101
|
+
ls /usr/share/doc/flashdata/examples
|
|
102
|
+
ls /usr/share/doc/flashdata/docs
|
|
103
|
+
man flashdata
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
To uninstall:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
sudo apt-get remove flashdata
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Removal or purge does not revoke keys or remove per-user profiles/run history. To remove a saved credential, run `flashdata auth logout` for that profile first. To also remove the repository configuration:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
sudo rm -f /etc/apt/sources.list.d/flashdata.sources /etc/apt/preferences.d/flashdata /etc/apt/keyrings/flashdata.asc
|
|
116
|
+
sudo apt-get update
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
When switching from Homebrew or a manual archive, check `command -v flashdata`; an old executable earlier in PATH may hide `/usr/bin/flashdata`. Uninstall/move that old executable or adjust PATH, then restart the shell or run `hash -r`. Preserve your CLI state directory. [APT maintenance and validation](https://github.com/flashdatadev/apt/blob/main/docs/maintaining.md) explains signature freshness and upgrade testing.
|
|
120
|
+
|
|
121
|
+
## RPM (Fedora and RHEL)
|
|
122
|
+
|
|
123
|
+
Use the [official signed RPM repository](https://github.com/flashdatadev/rpm) for Fedora 43/44 and RHEL 8/9/10 userspace on x86_64/aarch64. Package **1.1.0-1** contains the exact official CLI **1.1.0** executable, docs, examples, man page and licenses, with no Go, Python or Node.js runtime dependency. Native tests cover Fedora and Red Hat UBI containers on both architectures; full RHEL hosts, subscription repositories and FIPS mode are not separately certified.
|
|
124
|
+
|
|
125
|
+
Run this one-time setup in Bash with sudo access. It verifies the full certificate fingerprint, imports the verified certificate and enables both metadata and package signature checks:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
(
|
|
129
|
+
set -eu
|
|
130
|
+
case "$(rpm --eval '%{_arch}')" in
|
|
131
|
+
x86_64|aarch64) ;;
|
|
132
|
+
*) echo 'Supported RPM architectures: x86_64, aarch64' >&2; exit 1 ;;
|
|
133
|
+
esac
|
|
134
|
+
sudo dnf install -y ca-certificates gnupg2
|
|
135
|
+
if ! command -v curl >/dev/null 2>&1; then sudo dnf install -y curl; fi
|
|
136
|
+
work_dir="$(mktemp -d)"
|
|
137
|
+
trap 'rm -rf -- "$work_dir"' EXIT
|
|
138
|
+
curl -fsSL https://flashdatadev.github.io/rpm/flashdata.asc -o "$work_dir/flashdata.asc"
|
|
139
|
+
expected=23AB58683E85FE7236D369713D19EA52D181CC36
|
|
140
|
+
actual="$(gpg --batch --show-keys --with-colons "$work_dir/flashdata.asc" 2>/dev/null | awk -F: '$1 == "fpr" {print $10; exit}')"
|
|
141
|
+
test "$actual" = "$expected" || { echo 'FlashData RPM key fingerprint mismatch' >&2; exit 1; }
|
|
142
|
+
sudo install -d -m 0755 /etc/pki/rpm-gpg
|
|
143
|
+
sudo install -m 0644 "$work_dir/flashdata.asc" /etc/pki/rpm-gpg/RPM-GPG-KEY-flashdata
|
|
144
|
+
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-flashdata
|
|
145
|
+
sudo tee /etc/yum.repos.d/flashdata.repo >/dev/null <<'EOF'
|
|
146
|
+
[flashdata]
|
|
147
|
+
name=FlashData CLI stable
|
|
148
|
+
baseurl=https://flashdatadev.github.io/rpm/stable/$basearch/
|
|
149
|
+
enabled=1
|
|
150
|
+
gpgcheck=1
|
|
151
|
+
repo_gpgcheck=1
|
|
152
|
+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-flashdata
|
|
153
|
+
sslverify=1
|
|
154
|
+
includepkgs=flashdata
|
|
155
|
+
metadata_expire=6h
|
|
156
|
+
skip_if_unavailable=0
|
|
157
|
+
EOF
|
|
158
|
+
sudo dnf -y --refresh install flashdata
|
|
159
|
+
flashdata --version
|
|
160
|
+
flashdata --help
|
|
161
|
+
)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The dedicated RSA-4096 certificate fingerprint is `23AB58683E85FE7236D369713D19EA52D181CC36` (`FlashData RPM Signing <support@flashdata.dev>`), separate from APT. Compare with the [public key record](https://github.com/flashdatadev/rpm/tree/main/keys). DNF can request a second import for metadata: its per-repository metadata keyring is separate from the system-wide RPM package key database. RPM certificates are not scoped to one repository. `includepkgs=flashdata` limits packages from this source; keep `gpgcheck=1`, `repo_gpgcheck=1` and HTTPS verification enabled. `metadata_expire` controls cache freshness, not cryptographic expiry.
|
|
165
|
+
|
|
166
|
+
Upgrade when a newer CLI or RPM packaging release is available:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
sudo dnf --refresh upgrade flashdata
|
|
170
|
+
rpm -q flashdata
|
|
171
|
+
/usr/bin/flashdata --version
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Inspect package contents or uninstall:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
rpm -ql flashdata
|
|
178
|
+
ls /usr/share/doc/flashdata/examples
|
|
179
|
+
man flashdata
|
|
180
|
+
sudo dnf remove flashdata
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Removal preserves profiles, credentials and run history. Use `flashdata auth logout` for the selected profile first if you want to remove its saved credential. Remove `/etc/yum.repos.d/flashdata.repo` to stop using the source; removing its local key file does not remove the imported certificate from RPM's global key database. An administrator must check other uses before removing that database entry.
|
|
184
|
+
|
|
185
|
+
When switching from a manual or Homebrew installation, check `command -v flashdata`; an earlier PATH entry can hide `/usr/bin/flashdata`. Remove/move the previous executable or adjust PATH, then restart the shell or run `hash -r`. Keep the state directory. [RPM maintenance and validation](https://github.com/flashdatadev/rpm/blob/main/docs/maintaining.md) describes signed upgrade fixtures and key recovery.
|
|
186
|
+
|
|
187
|
+
## Homebrew (Linux and macOS)
|
|
188
|
+
|
|
189
|
+
Install [Homebrew](https://brew.sh) and follow its PATH instructions, then use the [official FlashData tap](https://github.com/flashdatadev/homebrew-tap):
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
brew install flashdatadev/tap/flashdata
|
|
193
|
+
flashdata --version
|
|
194
|
+
flashdata --help
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Homebrew selects the matching Linux amd64/arm64 or macOS Intel/Apple Silicon archive and verifies its pinned SHA-256 checksum. It installs the standalone executable with no Go, Python or Node.js dependency. Installation and the offline checks above need no API key.
|
|
198
|
+
|
|
199
|
+
Upgrade when a newer version is published:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
brew update
|
|
203
|
+
brew upgrade flashdatadev/tap/flashdata
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
The package also includes examples, English/Chinese release docs and dependency licenses:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
ls "$(brew --prefix flashdata)/share/flashdata/examples"
|
|
210
|
+
ls "$(brew --prefix flashdata)/share/doc/flashdata"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
To uninstall the package and optionally remove the tap:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
brew uninstall flashdata
|
|
217
|
+
brew untap flashdatadev/tap
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Uninstalling does not revoke API keys or delete saved profiles and run history. Use `flashdata auth logout` for a profile before uninstalling if you want to remove its saved credential. See [credential storage](security.md).
|
|
221
|
+
|
|
222
|
+
If switching from a manual installation, check `command -v flashdata`. A copy in `~/.local/bin` or another PATH directory may precede Homebrew. Move or remove that old executable, or adjust PATH; then restart the shell or run `hash -r`. Keep your existing CLI state directory so profiles and run recovery remain available.
|
|
223
|
+
|
|
224
|
+
## Manual archives (Linux and macOS)
|
|
225
|
+
|
|
226
|
+
The following Bash commands select Linux/macOS and amd64/arm64 automatically, download the official archive and SHA256SUMS over HTTPS, verify the selected archive before extraction, and install only the executable into `$HOME/.local/bin`. They require curl, tar, awk, install, and either sha256sum or shasum. Unsupported platforms and checksum errors stop installation.
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
(
|
|
230
|
+
set -eu
|
|
231
|
+
version=1.1.0
|
|
232
|
+
case "$(uname -s)" in
|
|
233
|
+
Linux) platform=linux ;;
|
|
234
|
+
Darwin) platform=darwin ;;
|
|
235
|
+
*) echo "Unsupported operating system" >&2; exit 1 ;;
|
|
236
|
+
esac
|
|
237
|
+
case "$(uname -m)" in
|
|
238
|
+
x86_64|amd64) architecture=amd64 ;;
|
|
239
|
+
arm64|aarch64) architecture=arm64 ;;
|
|
240
|
+
*) echo "Unsupported CPU architecture" >&2; exit 1 ;;
|
|
241
|
+
esac
|
|
242
|
+
archive="flashdata_${version}_${platform}_${architecture}.tar.gz"
|
|
243
|
+
release_url="https://github.com/flashdatadev/flashdata-cli/releases/download/v${version}"
|
|
244
|
+
work_dir="$(mktemp -d)"
|
|
245
|
+
curl --fail --location "$release_url/$archive" --output "$work_dir/$archive"
|
|
246
|
+
curl --fail --location "$release_url/SHA256SUMS" --output "$work_dir/SHA256SUMS"
|
|
247
|
+
expected="$(awk -v file="$archive" '$2 == file { print $1 }' "$work_dir/SHA256SUMS")"
|
|
248
|
+
test -n "$expected"
|
|
249
|
+
if command -v sha256sum >/dev/null 2>&1; then
|
|
250
|
+
actual="$(sha256sum "$work_dir/$archive" | awk '{print $1}')"
|
|
251
|
+
else
|
|
252
|
+
actual="$(shasum -a 256 "$work_dir/$archive" | awk '{print $1}')"
|
|
253
|
+
fi
|
|
254
|
+
test "$actual" = "$expected"
|
|
255
|
+
tar -xzf "$work_dir/$archive" -C "$work_dir"
|
|
256
|
+
install -d "$HOME/.local/bin"
|
|
257
|
+
install -m 755 "$work_dir/flashdata" "$HOME/.local/bin/flashdata"
|
|
258
|
+
"$HOME/.local/bin/flashdata" --version
|
|
259
|
+
"$HOME/.local/bin/flashdata" --help
|
|
260
|
+
)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
After a successful install, run `export PATH="$HOME/.local/bin:$PATH"` in your current terminal. Add `$HOME/.local/bin` to PATH in your shell startup configuration for future sessions. Downloaded docs and examples remain in a system temporary directory; current copies are also in the repository. Re-running installs this same version over the existing executable.
|
|
264
|
+
|
|
265
|
+
## Windows amd64 (PowerShell)
|
|
266
|
+
|
|
267
|
+
These commands verify the ZIP before extraction, install into `%LOCALAPPDATA%\FlashData\bin`, and update PATH for the current terminal:
|
|
268
|
+
|
|
269
|
+
```powershell
|
|
270
|
+
& {
|
|
271
|
+
$ErrorActionPreference = 'Stop'
|
|
272
|
+
$version = '1.1.0'
|
|
273
|
+
$archive = "flashdata_${version}_windows_amd64.zip"
|
|
274
|
+
$releaseUrl = "https://github.com/flashdatadev/flashdata-cli/releases/download/v$version"
|
|
275
|
+
$workDir = Join-Path ([IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString())
|
|
276
|
+
New-Item -ItemType Directory -Path $workDir | Out-Null
|
|
277
|
+
$archivePath = Join-Path $workDir $archive
|
|
278
|
+
$sumsPath = Join-Path $workDir 'SHA256SUMS'
|
|
279
|
+
Invoke-WebRequest "$releaseUrl/$archive" -OutFile $archivePath -UseBasicParsing
|
|
280
|
+
Invoke-WebRequest "$releaseUrl/SHA256SUMS" -OutFile $sumsPath -UseBasicParsing
|
|
281
|
+
$entry = @(Get-Content $sumsPath | Where-Object { $_ -match (' ' + [regex]::Escape($archive) + '$') })
|
|
282
|
+
if ($entry.Count -ne 1) { throw 'Missing or duplicate checksum entry' }
|
|
283
|
+
$expected = ($entry[0] -split '\s+')[0]
|
|
284
|
+
$actual = (Get-FileHash -Algorithm SHA256 -LiteralPath $archivePath).Hash
|
|
285
|
+
if ($actual -ne $expected) { throw 'SHA-256 checksum mismatch' }
|
|
286
|
+
Expand-Archive -LiteralPath $archivePath -DestinationPath $workDir -Force
|
|
287
|
+
$installDir = Join-Path $env:LOCALAPPDATA 'FlashData\bin'
|
|
288
|
+
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
|
|
289
|
+
Copy-Item -LiteralPath (Join-Path $workDir 'flashdata.exe') -Destination $installDir -Force
|
|
290
|
+
$env:PATH = "$installDir;$env:PATH"
|
|
291
|
+
flashdata --version
|
|
292
|
+
if ($LASTEXITCODE -ne 0) { throw 'FlashData version check failed' }
|
|
293
|
+
flashdata --help
|
|
294
|
+
if ($LASTEXITCODE -ne 0) { throw 'FlashData help check failed' }
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
For future terminals, add `%LOCALAPPDATA%\FlashData\bin` to your user PATH in Windows Environment Variables. No administrator privileges are needed for this user-directory install.
|
|
299
|
+
|
|
300
|
+
## Next steps
|
|
301
|
+
|
|
302
|
+
Run `flashdata auth login` to import an existing key from your [FlashData account](https://flashdata.dev). Terminal input is hidden. Automation can use a secret manager piped to `auth login --api-key-stdin --non-interactive`; never put a key in command arguments. See [onboarding](onboarding.md), [bulk workflows](bulk.md) and [run recovery](runs.md).
|
|
303
|
+
|
|
304
|
+
The executable's `--version` reports 1.1.0 and the exact source commit recorded in `build-report.json`. Binaries and packaged documentation come from the same source tag. APT metadata and RPM packages/metadata are signed; standalone archives use SHA-256 checksums and macOS binaries are not notarized. Native archive acceptance runs on all five platforms; real Keychain/Secret Service behavior remains an environment-specific check. See the [release notes](release-notes-1.1.0.md).
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# 安装 FlashData CLI v1.1.0
|
|
2
|
+
|
|
3
|
+
[FlashData 官网](https://flashdata.dev) · [API 文档](https://flashdata.dev/docs) · [English](installation.md) · [正式版下载](https://github.com/flashdatadev/flashdata-cli/releases/tag/v1.1.0)
|
|
4
|
+
|
|
5
|
+
安装与平台匹配的独立可执行程序。独立归档和系统包无需 Go、Node.js、Python 或 Docker;Python 安装方式需要 Python 3.10+。下载及离线版本/帮助检查无需 API 密钥。
|
|
6
|
+
|
|
7
|
+
## Python 安装器(本地候选包)
|
|
8
|
+
|
|
9
|
+
**尚未发布到 PyPI。** 请按[打包指南](python-packaging.zh-CN.md)构建 `dist/wheels`。Wheel 需要 Python 3.10+,无需安装 Go,使用已核验的现有 CLI 二进制。平台范围、安装器隔离及维护说明见[软件包 README](../packaging/pypi/README.zh-CN.md)。
|
|
10
|
+
|
|
11
|
+
先构建 `dist/wheels`,再从 CLI 仓库根目录执行。任选一种方式:pip/uv pip 使用独立 Python 环境,`uv tool` 管理独立 CLI 环境。安装后的命令仍为 `flashdata`。
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m venv .venv-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Bash 通过 `source .venv-cli/bin/activate` 激活,PowerShell 使用 `.venv-cli\Scripts\Activate.ps1`。然后任选 pip 或 uv pip:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python -m pip install --no-index --find-links dist/wheels flashdata-cli==1.0.0
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv pip install --no-index --find-links dist/wheels flashdata-cli==1.0.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
也可在虚拟环境之外使用:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv tool install --no-index --find-links dist/wheels flashdata-cli==1.0.0
|
|
31
|
+
flashdata --version
|
|
32
|
+
flashdata --help
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
若 uv 提示可执行文件目录不在 PATH,请运行 `uv tool update-shell` 并重新打开终端。旧的 Homebrew/APT/RPM/手动安装可能遮蔽新命令;Bash 用 `command -v flashdata`,PowerShell 用 `Get-Command flashdata` 检查。避免多个管理器同时管理同一个 PATH 条目。
|
|
36
|
+
|
|
37
|
+
今后发布到 PyPI 后,可使用 `pip install flashdata-cli`、`uv pip install flashdata-cli` 或 `uv tool install flashdata-cli`。**目前它们尚不是官方的在线安装方式。** 现在可以使用上方带 `--no-index --find-links` 的本地安装命令。
|
|
38
|
+
|
|
39
|
+
获得更新的本地 wheel 后,保留 `--no-index --find-links dist/wheels`,pip/uv pip 使用 `--upgrade`,uv tool 使用 `--reinstall`。明确修改固定版本约束;`==1.0.0` 会保持固定版本。分别通过 `python -m pip uninstall flashdata-cli`、`uv pip uninstall flashdata-cli` 或 `uv tool uninstall flashdata-cli` 卸载。卸载保留用户配置、凭据和执行历史;如需移除保存的凭据,请先执行 `flashdata auth logout`。
|
|
40
|
+
|
|
41
|
+
## APT(Ubuntu 和 Debian)
|
|
42
|
+
|
|
43
|
+
在 amd64 或 arm64 架构的 Ubuntu 22.04/24.04、Debian 12/13 上,可使用[官方签名 APT 软件源](https://github.com/flashdatadev/apt)。软件包 **1.1.0-1** 包含与发布归档一致的 CLI **1.1.0** 可执行文件;`-1` 是 Debian 打包修订号。无需 Go、Python 或 Node.js 运行时。
|
|
44
|
+
|
|
45
|
+
使用 sudo 权限在 Bash 中执行一次以下配置。命令会核对公钥指纹,通过专用 `Signed-By` 密钥环限制信任范围,并只允许从该软件源选择 `flashdata` 软件包:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
(
|
|
49
|
+
set -eu
|
|
50
|
+
arch="$(dpkg --print-architecture)"
|
|
51
|
+
case "$arch" in amd64|arm64) ;; *) echo "Unsupported architecture: $arch" >&2; exit 1 ;; esac
|
|
52
|
+
sudo apt-get update
|
|
53
|
+
sudo apt-get install -y ca-certificates curl gnupg
|
|
54
|
+
work_dir="$(mktemp -d)"
|
|
55
|
+
trap 'rm -rf -- "$work_dir"' EXIT
|
|
56
|
+
curl --fail --location https://flashdatadev.github.io/apt/flashdata.asc --output "$work_dir/flashdata.asc"
|
|
57
|
+
expected=19F337AC01C5F5B646A5583A04C7934A11D38FFA
|
|
58
|
+
actual="$(gpg --batch --show-keys --with-colons "$work_dir/flashdata.asc" 2>/dev/null | awk -F: '$1 == "fpr" { print $10; exit }')"
|
|
59
|
+
test "$actual" = "$expected"
|
|
60
|
+
sudo install -d -m 0755 /etc/apt/keyrings
|
|
61
|
+
sudo install -m 0644 "$work_dir/flashdata.asc" /etc/apt/keyrings/flashdata.asc
|
|
62
|
+
sudo tee /etc/apt/sources.list.d/flashdata.sources >/dev/null <<EOF
|
|
63
|
+
Types: deb
|
|
64
|
+
URIs: https://flashdatadev.github.io/apt/
|
|
65
|
+
Suites: stable
|
|
66
|
+
Components: main
|
|
67
|
+
Architectures: $arch
|
|
68
|
+
Signed-By: /etc/apt/keyrings/flashdata.asc $expected
|
|
69
|
+
EOF
|
|
70
|
+
sudo tee /etc/apt/preferences.d/flashdata >/dev/null <<'EOF'
|
|
71
|
+
Package: flashdata
|
|
72
|
+
Pin: release o=FlashData
|
|
73
|
+
Pin-Priority: 500
|
|
74
|
+
|
|
75
|
+
Package: *
|
|
76
|
+
Pin: release o=FlashData
|
|
77
|
+
Pin-Priority: -1
|
|
78
|
+
EOF
|
|
79
|
+
sudo apt-get update
|
|
80
|
+
sudo apt-get install -y flashdata
|
|
81
|
+
flashdata --version
|
|
82
|
+
flashdata --help
|
|
83
|
+
)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
专用证书指纹为 `19F337AC01C5F5B646A5583A04C7934A11D38FFA`,身份为 `FlashData APT Signing <support@flashdata.dev>`;可对照[公钥记录](https://github.com/flashdatadev/apt/tree/main/keys)核验。请勿禁用签名或有效期检查,也不要将此公钥添加到 APT 全局信任密钥环。
|
|
87
|
+
|
|
88
|
+
新的 CLI 版本或打包修订发布后,可运行以下命令升级:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
sudo apt-get update
|
|
92
|
+
sudo apt-get install --only-upgrade flashdata
|
|
93
|
+
flashdata --version
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
查看软件包版本及附带示例/文档:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
dpkg-query -W -f='${Version}\n' flashdata
|
|
100
|
+
apt-cache policy flashdata
|
|
101
|
+
ls /usr/share/doc/flashdata/examples
|
|
102
|
+
ls /usr/share/doc/flashdata/docs
|
|
103
|
+
man flashdata
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
卸载命令:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
sudo apt-get remove flashdata
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
卸载或清除软件包不会撤销密钥,也不会删除用户配置或执行历史。如需移除保存的凭据,请先为对应配置运行 `flashdata auth logout`。如需同时移除软件源配置:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
sudo rm -f /etc/apt/sources.list.d/flashdata.sources /etc/apt/preferences.d/flashdata /etc/apt/keyrings/flashdata.asc
|
|
116
|
+
sudo apt-get update
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
从 Homebrew 或手动归档安装迁移时,请检查 `command -v flashdata`:PATH 中靠前的旧版本可能遮蔽 `/usr/bin/flashdata`。卸载/移走旧可执行文件或调整 PATH,再重启终端或执行 `hash -r`;保留 CLI 状态目录。[APT 维护与验证说明](https://github.com/flashdatadev/apt/blob/main/docs/maintaining.md)介绍了签名有效期和升级测试。
|
|
120
|
+
|
|
121
|
+
## RPM(Fedora 和 RHEL)
|
|
122
|
+
|
|
123
|
+
[官方签名 RPM 软件源](https://github.com/flashdatadev/rpm)支持 x86_64/aarch64 的 Fedora 43/44 及 RHEL 8/9/10 用户空间。软件包 **1.1.0-1** 包含与官方发布文件逐字节一致的 CLI **1.1.0**,以及文档、示例、手册页和许可证,无需 Go、Python 或 Node.js 运行时。原生测试覆盖两个架构的 Fedora 与 Red Hat UBI 容器;完整 RHEL 主机、订阅软件源和 FIPS 模式尚未单独认证。
|
|
124
|
+
|
|
125
|
+
使用 sudo 权限在 Bash 中执行一次以下配置。命令核对证书完整指纹、导入已验证证书,并同时启用元数据和软件包签名检查:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
(
|
|
129
|
+
set -eu
|
|
130
|
+
case "$(rpm --eval '%{_arch}')" in
|
|
131
|
+
x86_64|aarch64) ;;
|
|
132
|
+
*) echo 'Supported RPM architectures: x86_64, aarch64' >&2; exit 1 ;;
|
|
133
|
+
esac
|
|
134
|
+
sudo dnf install -y ca-certificates gnupg2
|
|
135
|
+
if ! command -v curl >/dev/null 2>&1; then sudo dnf install -y curl; fi
|
|
136
|
+
work_dir="$(mktemp -d)"
|
|
137
|
+
trap 'rm -rf -- "$work_dir"' EXIT
|
|
138
|
+
curl -fsSL https://flashdatadev.github.io/rpm/flashdata.asc -o "$work_dir/flashdata.asc"
|
|
139
|
+
expected=23AB58683E85FE7236D369713D19EA52D181CC36
|
|
140
|
+
actual="$(gpg --batch --show-keys --with-colons "$work_dir/flashdata.asc" 2>/dev/null | awk -F: '$1 == "fpr" {print $10; exit}')"
|
|
141
|
+
test "$actual" = "$expected" || { echo 'FlashData RPM key fingerprint mismatch' >&2; exit 1; }
|
|
142
|
+
sudo install -d -m 0755 /etc/pki/rpm-gpg
|
|
143
|
+
sudo install -m 0644 "$work_dir/flashdata.asc" /etc/pki/rpm-gpg/RPM-GPG-KEY-flashdata
|
|
144
|
+
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-flashdata
|
|
145
|
+
sudo tee /etc/yum.repos.d/flashdata.repo >/dev/null <<'EOF'
|
|
146
|
+
[flashdata]
|
|
147
|
+
name=FlashData CLI stable
|
|
148
|
+
baseurl=https://flashdatadev.github.io/rpm/stable/$basearch/
|
|
149
|
+
enabled=1
|
|
150
|
+
gpgcheck=1
|
|
151
|
+
repo_gpgcheck=1
|
|
152
|
+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-flashdata
|
|
153
|
+
sslverify=1
|
|
154
|
+
includepkgs=flashdata
|
|
155
|
+
metadata_expire=6h
|
|
156
|
+
skip_if_unavailable=0
|
|
157
|
+
EOF
|
|
158
|
+
sudo dnf -y --refresh install flashdata
|
|
159
|
+
flashdata --version
|
|
160
|
+
flashdata --help
|
|
161
|
+
)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
独立的 RSA-4096 证书指纹为 `23AB58683E85FE7236D369713D19EA52D181CC36`,身份为 `FlashData RPM Signing <support@flashdata.dev>`,与 APT 证书分开管理。可对照[公开密钥记录](https://github.com/flashdatadev/rpm/tree/main/keys)核验。DNF 可能再次导入密钥用于元数据验证:每仓库独立的元数据密钥环与系统全局 RPM 软件包密钥库不同。RPM 证书不是仅对单一仓库生效;`includepkgs=flashdata` 限制本源提供的软件包。请保持 `gpgcheck=1`、`repo_gpgcheck=1` 和 HTTPS 校验;`metadata_expire` 仅控制缓存更新,不是密码学有效期。
|
|
165
|
+
|
|
166
|
+
新的 CLI 版本或 RPM 打包修订发布后,可运行:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
sudo dnf --refresh upgrade flashdata
|
|
170
|
+
rpm -q flashdata
|
|
171
|
+
/usr/bin/flashdata --version
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
查看附带文件或卸载:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
rpm -ql flashdata
|
|
178
|
+
ls /usr/share/doc/flashdata/examples
|
|
179
|
+
man flashdata
|
|
180
|
+
sudo dnf remove flashdata
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
卸载保留用户配置、凭据和执行历史。如需移除保存的凭据,请先为对应配置执行 `flashdata auth logout`。删除 `/etc/yum.repos.d/flashdata.repo` 可停用软件源;删除本地公钥文件不会移除 RPM 全局密钥库中的证书,管理员应确认其他用途后再移除该记录。
|
|
184
|
+
|
|
185
|
+
从手动安装或 Homebrew 迁移时,检查 `command -v flashdata`:PATH 中靠前的旧文件可能遮蔽 `/usr/bin/flashdata`。移走旧可执行文件或调整 PATH,再重启终端或执行 `hash -r`,并保留状态目录。[RPM 维护与验证](https://github.com/flashdatadev/rpm/blob/main/docs/maintaining.md)介绍了签名升级测试包及密钥恢复。
|
|
186
|
+
|
|
187
|
+
## Homebrew(Linux 和 macOS)
|
|
188
|
+
|
|
189
|
+
先安装 [Homebrew](https://brew.sh) 并按提示配置 PATH,然后使用 [FlashData 官方软件源](https://github.com/flashdatadev/homebrew-tap):
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
brew install flashdatadev/tap/flashdata
|
|
193
|
+
flashdata --version
|
|
194
|
+
flashdata --help
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Homebrew 自动选择 Linux amd64/arm64 或 macOS Intel/Apple Silicon 归档,并验证固定的 SHA-256 校验和。安装的是独立可执行文件,无需 Go、Python 或 Node.js;安装及以上离线检查无需 API 密钥。
|
|
198
|
+
|
|
199
|
+
有新版本发布后,可运行以下命令升级:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
brew update
|
|
203
|
+
brew upgrade flashdatadev/tap/flashdata
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
软件包还包含示例、中英文版本文档及依赖许可证:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
ls "$(brew --prefix flashdata)/share/flashdata/examples"
|
|
210
|
+
ls "$(brew --prefix flashdata)/share/doc/flashdata"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
卸载软件包并按需移除软件源:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
brew uninstall flashdata
|
|
217
|
+
brew untap flashdatadev/tap
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
卸载不撤销 API 密钥,也不删除已保存的配置和执行历史。若要移除某个配置中已保存的凭据,请在卸载前为该配置运行 `flashdata auth logout`,详见[凭据存储](security.md)。
|
|
221
|
+
|
|
222
|
+
从手动安装迁移时,请先用 `command -v flashdata` 检查当前可执行文件。`~/.local/bin` 或其他 PATH 目录中的旧版本可能排在 Homebrew 前面;移走旧可执行文件或调整 PATH,再重启终端或执行 `hash -r`。请保留现有 CLI 状态目录,以继续使用配置和执行恢复。
|
|
223
|
+
|
|
224
|
+
## 手动安装归档(Linux 和 macOS)
|
|
225
|
+
|
|
226
|
+
以下 Bash 命令自动识别 Linux/macOS 与 amd64/arm64,从官方 HTTPS 地址下载归档和 SHA256SUMS,先验证所选归档,再解压,并仅将可执行程序安装到 `$HOME/.local/bin`。需要 curl、tar、awk、install,以及 sha256sum 或 shasum。不支持的平台或校验错误会终止安装。
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
(
|
|
230
|
+
set -eu
|
|
231
|
+
version=1.1.0
|
|
232
|
+
case "$(uname -s)" in
|
|
233
|
+
Linux) platform=linux ;;
|
|
234
|
+
Darwin) platform=darwin ;;
|
|
235
|
+
*) echo "Unsupported operating system" >&2; exit 1 ;;
|
|
236
|
+
esac
|
|
237
|
+
case "$(uname -m)" in
|
|
238
|
+
x86_64|amd64) architecture=amd64 ;;
|
|
239
|
+
arm64|aarch64) architecture=arm64 ;;
|
|
240
|
+
*) echo "Unsupported CPU architecture" >&2; exit 1 ;;
|
|
241
|
+
esac
|
|
242
|
+
archive="flashdata_${version}_${platform}_${architecture}.tar.gz"
|
|
243
|
+
release_url="https://github.com/flashdatadev/flashdata-cli/releases/download/v${version}"
|
|
244
|
+
work_dir="$(mktemp -d)"
|
|
245
|
+
curl --fail --location "$release_url/$archive" --output "$work_dir/$archive"
|
|
246
|
+
curl --fail --location "$release_url/SHA256SUMS" --output "$work_dir/SHA256SUMS"
|
|
247
|
+
expected="$(awk -v file="$archive" '$2 == file { print $1 }' "$work_dir/SHA256SUMS")"
|
|
248
|
+
test -n "$expected"
|
|
249
|
+
if command -v sha256sum >/dev/null 2>&1; then
|
|
250
|
+
actual="$(sha256sum "$work_dir/$archive" | awk '{print $1}')"
|
|
251
|
+
else
|
|
252
|
+
actual="$(shasum -a 256 "$work_dir/$archive" | awk '{print $1}')"
|
|
253
|
+
fi
|
|
254
|
+
test "$actual" = "$expected"
|
|
255
|
+
tar -xzf "$work_dir/$archive" -C "$work_dir"
|
|
256
|
+
install -d "$HOME/.local/bin"
|
|
257
|
+
install -m 755 "$work_dir/flashdata" "$HOME/.local/bin/flashdata"
|
|
258
|
+
"$HOME/.local/bin/flashdata" --version
|
|
259
|
+
"$HOME/.local/bin/flashdata" --help
|
|
260
|
+
)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
安装成功后,在当前终端执行 `export PATH="$HOME/.local/bin:$PATH"`。请在 shell 启动配置中将 `$HOME/.local/bin` 加入 PATH,供后续终端使用。下载的文档与示例保留在系统 `mktemp` 生成的临时目录中;仓库也提供最新副本。重复运行会用同一版本覆盖现有可执行程序。
|
|
264
|
+
|
|
265
|
+
## Windows amd64(PowerShell)
|
|
266
|
+
|
|
267
|
+
以下命令先校验 ZIP 再解压,安装到 `%LOCALAPPDATA%\FlashData\bin`,并为当前终端更新 PATH:
|
|
268
|
+
|
|
269
|
+
```powershell
|
|
270
|
+
& {
|
|
271
|
+
$ErrorActionPreference = 'Stop'
|
|
272
|
+
$version = '1.1.0'
|
|
273
|
+
$archive = "flashdata_${version}_windows_amd64.zip"
|
|
274
|
+
$releaseUrl = "https://github.com/flashdatadev/flashdata-cli/releases/download/v$version"
|
|
275
|
+
$workDir = Join-Path ([IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString())
|
|
276
|
+
New-Item -ItemType Directory -Path $workDir | Out-Null
|
|
277
|
+
$archivePath = Join-Path $workDir $archive
|
|
278
|
+
$sumsPath = Join-Path $workDir 'SHA256SUMS'
|
|
279
|
+
Invoke-WebRequest "$releaseUrl/$archive" -OutFile $archivePath -UseBasicParsing
|
|
280
|
+
Invoke-WebRequest "$releaseUrl/SHA256SUMS" -OutFile $sumsPath -UseBasicParsing
|
|
281
|
+
$entry = @(Get-Content $sumsPath | Where-Object { $_ -match (' ' + [regex]::Escape($archive) + '$') })
|
|
282
|
+
if ($entry.Count -ne 1) { throw 'Missing or duplicate checksum entry' }
|
|
283
|
+
$expected = ($entry[0] -split '\s+')[0]
|
|
284
|
+
$actual = (Get-FileHash -Algorithm SHA256 -LiteralPath $archivePath).Hash
|
|
285
|
+
if ($actual -ne $expected) { throw 'SHA-256 checksum mismatch' }
|
|
286
|
+
Expand-Archive -LiteralPath $archivePath -DestinationPath $workDir -Force
|
|
287
|
+
$installDir = Join-Path $env:LOCALAPPDATA 'FlashData\bin'
|
|
288
|
+
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
|
|
289
|
+
Copy-Item -LiteralPath (Join-Path $workDir 'flashdata.exe') -Destination $installDir -Force
|
|
290
|
+
$env:PATH = "$installDir;$env:PATH"
|
|
291
|
+
flashdata --version
|
|
292
|
+
if ($LASTEXITCODE -ne 0) { throw 'FlashData version check failed' }
|
|
293
|
+
flashdata --help
|
|
294
|
+
if ($LASTEXITCODE -ne 0) { throw 'FlashData help check failed' }
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
如需在后续终端使用,请在 Windows“环境变量”设置中将 `%LOCALAPPDATA%\FlashData\bin` 加入用户 PATH。安装到此用户目录不需要管理员权限。
|
|
299
|
+
|
|
300
|
+
## 下一步
|
|
301
|
+
|
|
302
|
+
运行 `flashdata auth login`,导入 [FlashData 账户](https://flashdata.dev)中的已有密钥,终端输入会隐藏。自动化可将密钥管理器的输出通过管道传给 `auth login --api-key-stdin --non-interactive`;不要将密钥放入命令行参数。详见[接入](onboarding.md)、[Bulk 流程](bulk.md)及[执行恢复](runs.md)。
|
|
303
|
+
|
|
304
|
+
`--version` 显示 1.1.0 及 `build-report.json` 记录的准确源码提交。可执行文件和附带文档来自同一个源码标签。APT 元数据以及 RPM 软件包/元数据均有签名;独立归档使用 SHA-256 校验,macOS 可执行文件未经过公证。五个平台均运行原生归档验收;真实 Keychain/Secret Service 行为仍需按具体环境检查。详见[版本说明](release-notes-1.1.0.md)。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Explicit legacy migration
|
|
2
|
+
|
|
3
|
+
[FlashData](https://flashdata.dev) · [API documentation](https://flashdata.dev/docs)
|
|
4
|
+
|
|
5
|
+
The prior Node script writes a version-1 protection envelope around client state version 2 in connection.json. `auth migrate --from PRIVATE_CONNECTION_JSON --profile migrated` reads only this explicit format, using native DPAPI on Windows or the private-file legacy format on Unix. The source is unchanged. Unsupported versions, unsafe permissions and corrupt envelopes fail closed.
|
|
6
|
+
|
|
7
|
+
Migration validates/pins origins, preserves registration input/proof and pending claim/handoff phases, imports completed results and retains uncertain-operation metadata. It writes a legacy replay barrier before publishing the migrated credentials. A partial migration with a missing vault still blocks init from creating replacement access; rerun the explicit migration to continue.
|
|
8
|
+
|
|
9
|
+
A private migration marker pins an interrupted import to the original source digest before the replay barrier is written. Another source cannot replace that import or a profile with unrelated history and a missing vault. Repeating an already completed migration is a no-op that retains the current credentials, phase and history, including subsequent logout or claiming; obsolete source credentials are never restored as a retry.
|
|
10
|
+
|
|
11
|
+
The script retained original run IDs only as SHA-256 keys. The CLI cannot reconstruct those IDs or prove equivalence with a newly normalized request, so it imports readable legacy-HASH records and keeps the original hash tombstones. A later command using one of those original IDs refuses automatic submission. Cached legacy data requires current access/account verification; if ownership could not be established during migration, inspect metadata and recover through your account rather than inventing an association.
|
|
12
|
+
|
|
13
|
+
This command does not convert a corrupt vault, switch an existing OS-protection mode, reset history, obtain a trial or revoke remote access. To move to another protection mode, explicitly import an existing key into a fresh profile and keep the old profile for recovery/history; pending onboarding needs its original store until installation completes.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Onboarding and recovery
|
|
2
|
+
|
|
3
|
+
[FlashData](https://flashdata.dev) · [API documentation](https://flashdata.dev/docs)
|
|
4
|
+
|
|
5
|
+
Use `auth login` with hidden terminal input or `--api-key-stdin` for an existing account. Do not supply keys in arguments. An environment key overrides saved access for the current command and is never implicitly persisted by query/bulk operations. It does not replace stored candidate credentials during `auth finish`.
|
|
6
|
+
|
|
7
|
+
Saving recovery metadata under an environment override preserves the original profile's credentials and onboarding phase. Re-importing the same saved key verifies and reuses the profile without removing claim proofs or upload capabilities. auth status also reports registering/logged_out/environment-required local phases without attempting registration; a pending registration points back to init with its saved proof. Scope-list whitespace is normalized consistently on an explicit registration retry.
|
|
8
|
+
|
|
9
|
+
`init --name NAME` explicitly starts onboarding only for a genuinely new profile. It discovers protocol 2 and availability, generates a 256-bit proof, atomically saves the proof and exact registration request, then calls the SDK. Recovery reuses the saved request/proof without requiring flags again. Changing a pending request conflicts. A marker, corrupted/missing vault, logged-out profile or failed/expired existing key prevents a new automatic trial.
|
|
10
|
+
|
|
11
|
+
Registration returns ordinary API-key credentials. Setup proof, registration proof and handoff proof are scoped to their control operations; they are never sent as Data API keys. Client labels and plan names convey no authorization. The public trial grant/request-equivalents are distinct from current account balance, and no retry refills a grant.
|
|
12
|
+
|
|
13
|
+
`auth claim` stores the returned claim privately, constructs its URL from the pinned web origin and validated fixed claim path, and displays the confirmation code separately. No proof/key/code goes into the browser URL. The browser owns sign-in, code confirmation, scope review and funding approval; the CLI cannot impersonate a browser session. The CLI reports the URL rather than automatically opening a browser.
|
|
14
|
+
|
|
15
|
+
`auth finish --wait --timeout 10m` polls only recoverable statuses, honoring the server interval. After delivery it commits the candidate key, generation and original handoff proof in the protected vault. Its fresh child is the same absolute executable, supplied only a state directory/profile and a random verification challenge. The child does not inherit an environment API key, takes no API key in arguments, reads the vault without claiming the parent's writer lock, and verifies connection ID, generation, valid lifecycle, ready access and owned state. ACK follows only a matching challenge response. Installation is read back from the server before obsolete secrets are removed.
|
|
16
|
+
|
|
17
|
+
A failed child sends no ACK. A lost ACK response retains the candidate/proof for explicit recovery. An expired or confirmed handoff without a locally installed key needs account reconnect/recovery, never a new anonymous trial. Read `auth status`; it can still display pending onboarding state when an old temporary key has been fenced/revoked during claiming.
|
|
18
|
+
|
|
19
|
+
Imported-key ownership uses GET `/v2/api-access/identity`. A 404 permits ordinary one-off API-key use with ownership unknown, but blocks recurring mode. A known claimed connection can instead verify its current key through its authoritative connection identity endpoint; recurring requires owned, valid, ready and installed. Failures other than a missing endpoint are not guessed away. Revalidation happens before each execution and before cached result reads.
|
|
20
|
+
|
|
21
|
+
The new general identity endpoint is a local backend patch awaiting deployment; onboarding is feature-gated. This project does not configure production flags, publish or deploy anything.
|