From 3f4a4286f9a56077c5f9b83eb5e9daa1f6d27b47 Mon Sep 17 00:00:00 2001 From: Luna <279187109+lunadogbot@users.noreply.github.com> Date: Wed, 29 Apr 2026 11:43:06 +0000 Subject: [PATCH 1/2] docs: document `deno install --os` / `--arch` flags (2.8) Adds a section to install.md describing the new cross-platform install flags. Notes the Node.js-compatible value set, the default-to-current behavior when only one flag is provided, and the conflict with --global. Refs denoland/deno#32785 --- runtime/reference/cli/install.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/runtime/reference/cli/install.md b/runtime/reference/cli/install.md index 517e68792..a54189003 100644 --- a/runtime/reference/cli/install.md +++ b/runtime/reference/cli/install.md @@ -46,6 +46,30 @@ If your project has a `package.json` file, the packages coming from npm will be added to `dependencies` in `package.json`. Otherwise all packages will be added to `deno.json`. +### deno install --os and --arch + +Starting in Deno 2.8, `deno install` accepts `--os` and `--arch` flags so you +can install npm packages targeting a different platform than the one you're +running on. This is most useful for pre-installing packages with native +binaries — for example, building a deployment artifact on a macOS dev machine +that will eventually run on Linux/arm64. + +The flags accept Node.js-compatible values, the same strings that +`process.platform` and `process.arch` produce. + +```sh +# Install npm packages for linux/arm64 +deno install --os linux --arch arm64 + +# Install for windows/x64 +deno install --os win32 --arch x64 + +# Override just the architecture; --os defaults to the current system +deno install --arch x64 +``` + +`--os` and `--arch` are local-install-only and conflict with `--global`. + ### deno install --entrypoint [FILES] Use this command to install all dependencies that are used in the provided files From ce1aa8e9c2992f2ead85f6498fd1ff07197bd786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 20 May 2026 16:16:14 +0200 Subject: [PATCH 2/2] docs: bump last_modified for --os/--arch addition --- runtime/reference/cli/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/reference/cli/install.md b/runtime/reference/cli/install.md index a54189003..605173ffd 100644 --- a/runtime/reference/cli/install.md +++ b/runtime/reference/cli/install.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-03-12 +last_modified: 2026-05-20 title: "deno install" oldUrl: - /runtime/manual/tools/script_installer/