Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

docs(cli): add npm as an install option

Andrej6bd1a805678a
diff --git a/apps/docs/cli/index.mdx b/apps/docs/cli/index.mdx
index 9c637d3ab..3cbe92c73 100644
--- a/apps/docs/cli/index.mdx
+++ b/apps/docs/cli/index.mdx
@@ -14,7 +14,7 @@ kaneo login
kaneo
```
-On Windows, install it in PowerShell with `irm https://kaneo.app/cli/install.ps1 | iex`. [Install](/cli/install) covers versions, mirrors and supported systems, and [Sign in](/cli/sign-in) covers self-hosted servers and API keys.
+On Windows, install it in PowerShell with `irm https://kaneo.app/cli/install.ps1 | iex`. With Node.js 20 or newer, `npm install -g @kaneo/cli` works too. [Install](/cli/install) covers versions, mirrors and supported systems, and [Sign in](/cli/sign-in) covers self-hosted servers and API keys.
## Everyday commands
diff --git a/apps/docs/cli/install.mdx b/apps/docs/cli/install.mdx
index 20127c489..7510163df 100644
--- a/apps/docs/cli/install.mdx
+++ b/apps/docs/cli/install.mdx
@@ -29,6 +29,16 @@ Then [sign in](/cli/sign-in) and run `kaneo` on its own to see your account, you
Both scripts are plain text. Read them before running them: [install.sh](https://github.com/usekaneo/kaneo/blob/main/apps/site/public/cli/install.sh) and [install.ps1](https://github.com/usekaneo/kaneo/blob/main/apps/site/public/cli/install.ps1), or print one with `curl -fsSL https://kaneo.app/cli/install.sh | less`.
</Tip>
+## Install with npm
+
+With Node.js 20 or newer, you can install the same CLI from npm instead:
+
+```bash
+npm install -g @kaneo/cli
+```
+
+Update it with `npm install -g @kaneo/cli@latest` and remove it with `npm uninstall -g @kaneo/cli`. Both install methods share your logins and settings. Keep one of them per machine: with both installed, whichever comes first on your `PATH` runs, and the install script warns about the other copy.
+
## Install options
Set these environment variables to change what the script does:
diff --git a/packages/cli/README.md b/packages/cli/README.md
index a211b4925..3679fb8a0 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -24,6 +24,12 @@ Windows (PowerShell):
irm https://kaneo.app/cli/install.ps1 | iex
```
+With Node.js 20 or newer:
+
+```bash
+npm install -g @kaneo/cli
+```
+
The script picks the build for your system from the `cli-v<version>` GitHub release, verifies it against the release's `SHA256SUMS`, and installs it to `~/.local/bin/kaneo` (Windows: `%LOCALAPPDATA%\Programs\kaneo\kaneo.exe`, added to your user `PATH`). Both scripts are plain text, so you can read [install.sh](https://github.com/usekaneo/kaneo/blob/main/apps/site/public/cli/install.sh) and [install.ps1](https://github.com/usekaneo/kaneo/blob/main/apps/site/public/cli/install.ps1) before running them.
| Variable | What it does |
@@ -42,7 +48,7 @@ curl -fsSL https://kaneo.app/cli/install.sh | KANEO_DOWNLOAD_URL=https://mirror.
$env:KANEO_VERSION = "0.1.0"; irm https://kaneo.app/cli/install.ps1 | iex
```
-To update, run the install command again. To uninstall, delete the binary, and `~/.config/kaneo` too if you want to remove your logins.
+To update, run the install command again, or `npm install -g @kaneo/cli@latest` for an npm install. To uninstall, delete the binary, and `~/.config/kaneo` too if you want to remove your logins.
Prefer the script to downloading a binary from the release page with a browser: the macOS builds are signed ad hoc but not notarized, so Gatekeeper can block browser downloads. On Alpine and other musl distributions, install the C++ runtime first with `apk add libstdc++`. See the [install guide](https://kaneo.app/docs/cli/install) for mirrors, offline installs and supported systems.
@@ -169,4 +175,4 @@ The CLI is written with [Effect](https://effect.website) 4 (`effect/cli`, `effec
Bump `version` in `package.json` and merge to `main`. The `Release CLI` workflow (`.github/workflows/publish-cli.yml`) tests and bundles the CLI, compiles standalone binaries with Bun for macOS, Linux (glibc and musl) and Windows, and creates the `cli-v<version>` GitHub release with the binaries and a `SHA256SUMS` file. It skips versions that already have a release, and you can also run it by hand from the Actions tab.
-Publishing to npm stays off until the `CLI_NPM_PUBLISH` repository variable is set to `true`. With it on, the same workflow publishes `@kaneo/cli` to npm with provenance, skipping versions that are already published.
+While the `CLI_NPM_PUBLISH` repository variable is `true`, the same workflow also publishes `@kaneo/cli` to npm with provenance through trusted publishing, skipping versions that are already published.
diff --git a/skills/kaneo-cli/SKILL.md b/skills/kaneo-cli/SKILL.md
index 5fca96ae6..3632924f7 100644
--- a/skills/kaneo-cli/SKILL.md
+++ b/skills/kaneo-cli/SKILL.md
@@ -11,7 +11,7 @@ description: Work with Kaneo tasks, projects, comments and time tracking through
Run `kaneo context`. It prints the server, user, workspace and project in use, and where each value came from.
-- `kaneo: command not found`: ask the user to install it in their own terminal, where they can read the script first: `curl -fsSL https://kaneo.app/cli/install.sh | sh` (Windows: `irm https://kaneo.app/cli/install.ps1 | iex`). The binary lands in `~/.local/bin/kaneo` (Windows: `%LOCALAPPDATA%\Programs\kaneo\kaneo.exe`). Your shell may not have that folder on its `PATH` yet, so call it by that full path until it does.
+- `kaneo: command not found`: ask the user to install it in their own terminal, where they can read the script first: `curl -fsSL https://kaneo.app/cli/install.sh | sh` (Windows: `irm https://kaneo.app/cli/install.ps1 | iex`), or `npm install -g @kaneo/cli` with Node.js 20 or newer. The script's binary lands in `~/.local/bin/kaneo` (Windows: `%LOCALAPPDATA%\Programs\kaneo\kaneo.exe`). Your shell may not have that folder on its `PATH` yet, so call it by that full path until it does.
- No user: `kaneo login` is a browser approval only a person can finish. Ask the user to run it in their own terminal. Headless and CI runs use an API key in `KANEO_API_KEY` instead (created in Kaneo under Settings, Account, API Keys).
- No workspace: list them with `kaneo workspace list --jq '.[] | "\(.id) \(.name)"'` and pass `-w <id>`, or ask the user to pick a default with `kaneo workspace use`.
- Server or compatibility errors: `kaneo doctor` explains what is wrong.