Skip to content

feat(distribution): add curl | sh installer - #22

Merged
isaacrowntree merged 1 commit into
mainfrom
feat/install-script
Jul 27, 2026
Merged

feat(distribution): add curl | sh installer#22
isaacrowntree merged 1 commit into
mainfrom
feat/install-script

Conversation

@isaacrowntree

Copy link
Copy Markdown
Contributor

Adds a curl | sh installer for Linux and macOS — the install path that needs no package manager and no per-distro maintainer.

curl -fsSL https://raw.githubusercontent.com/triptechtravel/clickup-cli/main/scripts/install.sh | sh

Raised as future work in #21; landing it standalone since it's independent of the AUR discussion.

What it does

Detects OS/arch, downloads the matching release tarball, verifies its SHA-256 against checksums.txt, and installs to /usr/local/bin — falling back to ~/.local/bin when that isn't writable or sudo isn't available.

Consumes the existing GoReleaser artifacts, so the release pipeline is unchanged. Version resolution uses GitHub's /releases/latest/download/ path rather than the API, so there's no rate limit to hit and no JSON to parse.

Overrides: CLICKUP_VERSION, CLICKUP_INSTALL_DIR, CLICKUP_NO_SUDO, and CLICKUP_BASE_URL (used by the tests to point at a local server).

Testing

scripts/test-install.sh (make test-install) runs the installer in Docker across the axes most likely to break a shell installer. All 10 pass locally:

Case Covers
alpine busybox ash, busybox wget, no curl, no bash
debian + curl the curl branch
debian, wget only the wget branch on a non-busybox wget
archlinux linux/amd64 Arch is x86_64-only, so this doubles as amd64 coverage
non-root, no sudo asserts the ~/.local/bin fallback
CLICKUP_INSTALL_DIR / CLICKUP_VERSION overrides
checksum valid (hermetic) local server, known-good digest
checksum mismatch (hermetic) must abort and leave no binary behind
shellcheck -s sh

Two things Docker can't cover, handled in CI:

  • macOS — no darwin containers, and it's the only place shasum -a 256 (there's no sha256sum) and BSD tar run. macos-latest job.
  • Release-layout drift — the installer depends on asset names and checksums.txt existing, which can break with zero code change (e.g. editing name_template in .goreleaser.yml). The workflow runs on release: published and weekly to catch that.

Docs

New "Install script" section in installation.md plus a Supported platforms subsection documenting coverage that already existed but wasn't written down: WSL2, Docker/CI on musl images (the binaries are static, CGO_ENABLED=0), 64-bit Raspberry Pi OS, and the plaintext-token fallback on machines with no OS keyring.

No changes to the binary. No impact on Homebrew, go install, or binary-release users.

🤖 Generated with Claude Code

Adds scripts/install.sh, a POSIX-sh installer that detects OS/arch,
downloads the matching release tarball, verifies its SHA-256 against
checksums.txt, and installs to /usr/local/bin (falling back to
~/.local/bin when that isn't writable or sudo isn't available).

This covers the platforms that have no package manager story today --
containers, WSL, barebones Linux -- without needing a per-distro
maintainer. It consumes the existing GoReleaser artifacts, so the
release pipeline is unchanged.

Resolution uses GitHub's /releases/latest/download/ path rather than the
API, so there is no rate limit to hit and no JSON to parse.

Tested via scripts/test-install.sh, which runs the installer in Docker
across the axes most likely to break a shell installer:

  - busybox ash + wget (alpine), bash + curl, and wget-without-curl
  - archlinux on linux/amd64, which doubles as amd64 coverage
  - unprivileged with no sudo, asserting the ~/.local/bin fallback
  - CLICKUP_INSTALL_DIR and CLICKUP_VERSION overrides
  - a hermetic local server serving a corrupted tarball, asserting the
    installer aborts and leaves no binary behind
  - shellcheck -s sh

macOS can't be tested under Docker and is the only place the shasum
branch and BSD tar run, so CI covers it on a macos-latest runner. The
workflow also runs on release:published and weekly, which catches drift
in the release layout (renamed assets, a missing checksums.txt) that no
code change would trigger.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@isaacrowntree
isaacrowntree merged commit 580232e into main Jul 27, 2026
4 checks passed
@isaacrowntree
isaacrowntree deleted the feat/install-script branch July 27, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant