Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading