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): make the install scripts the way to install

Andrejc27f037b74bd
diff --git a/apps/docs/core/integrations/cli.mdx b/apps/docs/core/integrations/cli.mdx
index 20b9e9869..3d18aee0c 100644
--- a/apps/docs/core/integrations/cli.mdx
+++ b/apps/docs/core/integrations/cli.mdx
@@ -3,18 +3,113 @@ title: Kaneo CLI
description: Manage tasks and projects from your terminal with the official Kaneo command-line client.
---
-The official CLI, [`@kaneo/cli`](https://www.npmjs.com/package/@kaneo/cli), installs the `kaneo` command. It works with Kaneo Cloud and self-hosted instances, shows styled output in a terminal, and prints plain JSON for scripts and agents.
+The official Kaneo CLI is a single `kaneo` binary for macOS, Linux and Windows. It works with Kaneo Cloud and self-hosted instances, shows styled output in a terminal, and prints plain JSON for scripts and agents.
## Install
-You need Node.js 20 or newer.
+On macOS and Linux:
```bash
-npm install -g @kaneo/cli
+curl -fsSL https://kaneo.app/cli/install.sh | sh
```
+On Windows, in PowerShell:
+
+```powershell
+irm https://kaneo.app/cli/install.ps1 | iex
+```
+
+The script downloads the build for your system from the [GitHub release](https://github.com/usekaneo/kaneo/releases), checks it against the release's SHA-256 checksums, and only then replaces any existing `kaneo`. Nothing else is needed, not even Node.js.
+
+- On macOS and Linux it installs to `~/.local/bin/kaneo`. If that directory is not on your `PATH`, the script prints the command that adds it for your shell (bash, zsh, fish or another).
+- On Windows it installs to `%LOCALAPPDATA%\Programs\kaneo\kaneo.exe` and adds that directory to your user `PATH`. Open a new terminal afterwards.
+
Run `kaneo` on its own to see your account, your open tasks and the main commands.
+<Tip>
+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 options
+
+Set these environment variables to change what the script does:
+
+| Variable | What it does |
+| --- | --- |
+| `KANEO_VERSION` | Install this version, such as `0.1.0` or `cli-v0.1.0`, instead of the latest release |
+| `KANEO_INSTALL_DIR` | Install into this directory instead of the default |
+| `KANEO_DOWNLOAD_URL` | Download from a mirror instead of GitHub. Requires `KANEO_VERSION` |
+
+Pin a version, or install into another directory:
+
+```bash
+curl -fsSL https://kaneo.app/cli/install.sh | KANEO_VERSION=0.1.0 sh
+curl -fsSL https://kaneo.app/cli/install.sh | KANEO_INSTALL_DIR="$HOME/bin" sh
+```
+
+```powershell
+$env:KANEO_VERSION = "0.1.0"; irm https://kaneo.app/cli/install.ps1 | iex
+$env:KANEO_INSTALL_DIR = "C:\tools\kaneo"; irm https://kaneo.app/cli/install.ps1 | iex
+```
+
+Without `KANEO_VERSION`, the script asks the GitHub API for the newest CLI release (tags that start with `cli-v`). GitHub allows 60 of these lookups per hour from one IP address without a token, so set `KANEO_VERSION` in CI.
+
+### Mirrors and offline machines
+
+`KANEO_DOWNLOAD_URL` replaces `https://github.com/usekaneo/kaneo/releases/download`. The script then downloads `<url>/cli-v<version>/SHA256SUMS` and `<url>/cli-v<version>/<file>`, so a mirror keeps the same layout as the GitHub release. It makes no call to the GitHub API, which is why `KANEO_VERSION` is required.
+
+```bash
+curl -fsSL https://kaneo.app/cli/install.sh | KANEO_DOWNLOAD_URL=https://mirror.example.com/kaneo KANEO_VERSION=0.1.0 sh
+```
+
+For a machine without internet access, copy `install.sh` (or `install.ps1`), `SHA256SUMS` and the file for that machine from the release into a `cli-v<version>` folder, then point `KANEO_DOWNLOAD_URL` at the folder that contains it. `install.sh` accepts a `file://` URL when it downloads with curl, and `install.ps1` accepts a local or network path:
+
+```bash
+KANEO_DOWNLOAD_URL=file:///opt/kaneo-mirror KANEO_VERSION=0.1.0 sh install.sh
+```
+
+```powershell
+$env:KANEO_DOWNLOAD_URL = "\\fileserver\kaneo"; $env:KANEO_VERSION = "0.1.0"; Get-Content -Raw .\install.ps1 | iex
+```
+
+### Supported systems
+
+| System | Builds |
+| --- | --- |
+| macOS | Apple silicon and Intel. On Apple silicon the script installs the native build even when the terminal runs under Rosetta |
+| Linux | x64 and arm64, for glibc distributions and for musl distributions such as Alpine |
+| Windows | x64. Windows 11 on Arm runs the x64 build through emulation |
+
+The x64 builds are baseline builds, so they also run on older processors without AVX2. On Alpine and other musl distributions, the CLI needs the C++ runtime library. The script warns when it is missing:
+
+```bash
+apk add libstdc++
+```
+
+Prefer the install 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 a copy that a browser downloaded. Files downloaded with `curl`, as the script does, are not affected.
+
+### Update
+
+Run the install command again. It replaces `kaneo` with the latest release, or with the version in `KANEO_VERSION`, and keeps your logins and settings. Check the result with `kaneo --version`.
+
+If the script warns that another `kaneo` comes first on your `PATH`, for example an older community CLI, it shows both paths. Remove the other one, or move the install directory earlier in your `PATH`.
+
+### Uninstall
+
+Delete the binary. To also remove your stored logins and settings, delete the config directory:
+
+```bash
+rm ~/.local/bin/kaneo
+rm -rf ~/.config/kaneo
+```
+
+```powershell
+Remove-Item "$env:LOCALAPPDATA\Programs\kaneo" -Recurse
+Remove-Item "$HOME\.config\kaneo" -Recurse
+```
+
+On Windows, also remove `%LOCALAPPDATA%\Programs\kaneo` from your user `PATH` (search the Start menu for "Edit environment variables for your account"). If you set `KANEO_INSTALL_DIR`, `XDG_CONFIG_HOME` or `KANEO_CONFIG`, delete those locations instead.
+
## Sign in
```bash
diff --git a/packages/cli/README.md b/packages/cli/README.md
index 9f0067bc9..df5658533 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -1,14 +1,50 @@
# Kaneo CLI
-[`@kaneo/cli`](https://www.npmjs.com/package/@kaneo/cli) is the official command-line client for [Kaneo](https://kaneo.app), the open source project manager. It is maintained in the [usekaneo/kaneo](https://github.com/usekaneo/kaneo) monorepo and installs the `kaneo` command.
+The official command-line client for [Kaneo](https://kaneo.app), the open source project manager. It is maintained in the [usekaneo/kaneo](https://github.com/usekaneo/kaneo) monorepo and ships as a single `kaneo` binary for macOS, Linux and Windows.
```bash
-npm install -g @kaneo/cli
+curl -fsSL https://kaneo.app/cli/install.sh | sh
kaneo login
kaneo task list
```
-It works with Kaneo Cloud and with self-hosted instances, prints styled output in a terminal and plain JSON everywhere else, and needs Node.js 20 or newer.
+It works with Kaneo Cloud and with self-hosted instances, and prints styled output in a terminal and plain JSON everywhere else.
+
+## Install
+
+macOS and Linux:
+
+```bash
+curl -fsSL https://kaneo.app/cli/install.sh | sh
+```
+
+Windows (PowerShell):
+
+```powershell
+irm https://kaneo.app/cli/install.ps1 | iex
+```
+
+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 |
+| --- | --- |
+| `KANEO_VERSION` | Install this version, such as `0.1.0` or `cli-v0.1.0`, instead of the latest |
+| `KANEO_INSTALL_DIR` | Install into this directory |
+| `KANEO_DOWNLOAD_URL` | Download from a mirror that has the GitHub release layout (`<url>/cli-v<version>/<file>`) instead of GitHub. Requires `KANEO_VERSION` |
+
+```bash
+curl -fsSL https://kaneo.app/cli/install.sh | KANEO_VERSION=0.1.0 sh
+curl -fsSL https://kaneo.app/cli/install.sh | KANEO_INSTALL_DIR="$HOME/bin" sh
+curl -fsSL https://kaneo.app/cli/install.sh | KANEO_DOWNLOAD_URL=https://mirror.example.com/kaneo KANEO_VERSION=0.1.0 sh
+```
+
+```powershell
+$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.
+
+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/core/integrations/cli#install) for mirrors, offline installs and supported systems.
## Sign in