diff --git a/README.md b/README.md index a2d788c..8cf9f4c 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,19 @@ The `togo` command — a Laravel-artisan-like CLI for the [togo](https://github. npm install -g @togo-framework/cli ``` +> **npm 11:** the binary is fetched by a `postinstall` script, and npm 11 gates install scripts behind +> `allowScripts`. By default it only warns (`not yet covered by allowScripts`); with `strict-allow-scripts` +> or `--ignore-scripts` the script is skipped and no binary is installed. Allow it explicitly: +> +> ```bash +> npm install -g --allow-scripts=@togo-framework/cli @togo-framework/cli +> # or once, for every future global install: +> npm config set allow-scripts=@togo-framework/cli --location=user +> ``` +> +> Or skip npm: use `go install` (below) or grab a binary from +> [GitHub releases](https://github.com/togo-framework/cli/releases). + **Linux / macOS** ```bash curl -fsSL https://raw.githubusercontent.com/togo-framework/cli/main/install.sh | sh diff --git a/npm/README.md b/npm/README.md index cd72bf0..511fa82 100644 --- a/npm/README.md +++ b/npm/README.md @@ -13,6 +13,25 @@ On install, the matching prebuilt binary for your platform (macOS / Linux / Wind x64 / arm64) is downloaded from the [GitHub release](https://github.com/togo-framework/cli/releases). If no prebuilt binary is available but Go is installed, it falls back to `go install`. +**npm 11:** install scripts are gated by `allowScripts`. By default npm only warns; with +`strict-allow-scripts` (or `--ignore-scripts`) the postinstall is skipped and no binary is installed. +Allow it explicitly: + +```bash +npm install -g --allow-scripts=@togo-framework/cli @togo-framework/cli +# or once, for every future global install: +npm config set allow-scripts=@togo-framework/cli --location=user +``` + +In a project-local install, add `"allowScripts": { "@togo-framework/cli": true }` to `package.json` +(`--allow-scripts` is rejected there). Or skip npm entirely: + +```bash +go install github.com/togo-framework/cli/cmd/togo@latest +``` + +or grab a binary from [GitHub releases](https://github.com/togo-framework/cli/releases). + Prefer a single binary with no Node? Use the install script instead: ```bash