Workspace commands (hws)latest · 0.1.2
hws download
Download a published zip, checked against the registry's SHA-256.
hws download <CODE>[@<version>|@latest] [--org <slug>]
[--channel <channel>] [--out <file>] [--json]Also available as horizech hws download.
The registry records each file's SHA-256 when it is uploaded. The download is checked against it, and a file that does not match is not written.
Without a version, or with @latest, you get the latest version in --channel, or across all channels without one. If a version exists in more than one channel, pass --channel.
Arguments
| Argument | Description | Default |
|---|---|---|
<CODE>[@version]required | The package, optionally with a version or latest. |
Options
| Option | Description | Default |
|---|---|---|
--org <slug> | The organization that owns the package. | found from the package code |
--channel <channel> | dev, beta or stable. | |
--out <file> | Where to write the zip. | <CODE>_<version>.zip |
--json | Print a machine-readable result on stdout. Progress goes to stderr. |
Examples
Latest dev build
$ hws download HWS_CORE@latest --channel devAn exact version
$ hws download [email protected] --channel stable --out notes.zipWith --json
stdout
{
"file": "/path/to/HWS_CORE_0.42.2.zip",
"org": "horizech",
"code": "HWS_CORE",
"version": "0.42.2",
"channel": "dev",
"size": 16881234,
"sha256": "…"
}API calls
What this command calls, for debugging and for anyone scripting the same thing. Registry paths are on https://api.horizech.com, OAuth2 paths on https://horizech.com. See Registry API.
| Method | Path | Notes |
|---|---|---|
GET | /api/v1/packages/:org/:code/versions/:version/download | channel |