Command Palette

Search for a command to run…

ZarynZaryn
Packages·1 min read

Any file (release downloads)

Publish program downloads, archives or datasets as versioned files with a fixed address, and download them with curl. Every step explained.

For things that aren't a package of any language (a compiled program for each operating system, a dataset, a firmware image), Zaryn keeps **versioned files** at addresses that never change. ## Upload Create a token on [Packages](/packages) (**Create a publish token**), then: ```bash curl -T mytool-1.0.0-linux.tar.gz -H "Authorization: Bearer $ZARYN_TOKEN" \ https://api.zaryn.xyz/v1/packages/generic/mytool/1.0.0/mytool-1.0.0-linux.tar.gz ``` The address has three parts after `generic/`: the name (`mytool`), the version (`1.0.0`) and the file name. A version can hold several files, for example one per operating system. Names, versions and file names may use letters, digits, `.`, `_`, `+` and `-`. The answer includes the file's SHA-256, so you can publish it next to the download. ## Download ```bash curl -LO https://api.zaryn.xyz/v1/packages/generic/mytool/1.0.0/mytool-1.0.0-linux.tar.gz ``` Once uploaded, a file never changes: the same address always gives the same bytes. To fix something, upload a new version. > Publishing a **Zig** package? Use [Zig packages](/docs/en/packages-zig) instead: Zaryn then reads its `build.zig.zon` and gives you the hash `zig fetch` expects. ## Private files (Premium) Make the name private on its page. Downloads then need the token: ```bash curl -LO -H "Authorization: Bearer $ZARYN_TOKEN" https://api.zaryn.xyz/v1/packages/generic/mytool/1.0.0/mytool-1.0.0-linux.tar.gz ``` ## When something goes wrong | You see | What it means | Fix | |---|---|---| | `409` "this version is already published" | that file name already exists in that version | upload as a new version | | `403` "this package name belongs to someone else" | another account uses that name | choose another name | | `402` | over your plan's file size (50 MB on Free) or space | upgrade, or split the file |