Skip to content

Conversation

@pitzcarraldo
Copy link
Contributor

@pitzcarraldo pitzcarraldo commented Jan 28, 2026

Summary

Add support for specifying version as a command-line argument when installing Clix CLI. This enables reliable version specification through piped execution.

Details

Problem: Environment variables don't propagate through shell pipes. When users run:

CLIX_VERSION=v1.0.0 curl -fsSL https://clix.sh/install | bash

The CLIX_VERSION variable only applies to curl, not to the piped bash process.

Solution: Accept version as a positional argument using bash -s:

curl -fsSL https://clix.sh/install | bash -s v1.0.0

This approach is inspired by Claude Code's install script.

Priority: Argument > Environment variable > Default ("latest")

Related Issues

Related to #11 (previous fix for env var export)

How to Validate

  1. Install specific version: curl -fsSL https://clix.sh/install | bash -s v1.1.0
  2. Verify output shows "Installing Clix CLI v1.1.0..."
  3. Install latest (default): curl -fsSL https://clix.sh/install | bash
  4. Verify output shows "Fetching latest version..."

Pre-Merge Checklist

Code Quality

  • Code builds without errors (bun run build)
  • Types check correctly (bun run typecheck)
  • Linter passes (bun run lint)
  • Tests pass (bun test)
  • Added/updated tests for new functionality (if applicable)

Documentation

  • Updated relevant documentation (if needed)
  • Updated CLAUDE.md if architecture changed (if needed)

Commit Standards

  • Commits follow Conventional Commits format
  • No breaking changes, OR breaking changes are documented

Platform Validation

  • macOS
  • Linux

Summary by CodeRabbit

Release Notes

  • New Features

    • Installation script now accepts version as a command-line argument, with automatic fallback to environment variable or "latest" as default.
  • Documentation

    • Updated installation instructions and help text to reflect the new version argument capability.

✏️ Tip: You can customize this high-level summary in your review settings.

Add support for passing version as argument to the install script:
  curl -fsSL https://clix.sh/install | bash -s v1.0.0

This approach works reliably with piped execution, unlike environment
variables which don't propagate through pipes. The argument takes
precedence over the CLIX_VERSION environment variable.

Inspired by Claude Code's install script pattern.
@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Adds positional argument support to the installer script for specifying CLIX_VERSION, with fallback logic that prioritizes the argument over the environment variable, defaulting to "latest". Updates corresponding help text to document this behavior.

Changes

Cohort / File(s) Summary
Installer script version configuration
scripts/install.sh
Adds positional argument parsing for CLIX_VERSION with conditional precedence (argument → environment variable → "latest" default); updates usage/help text documentation

Possibly related PRs

Suggested reviewers

  • JeongwooYoo
✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested a review from JeongwooYoo January 28, 2026 07:48
@pitzcarraldo pitzcarraldo self-assigned this Jan 28, 2026
@pitzcarraldo pitzcarraldo merged commit e82321c into main Jan 28, 2026
4 of 5 checks passed
@pitzcarraldo pitzcarraldo deleted the feat/fix-install-version branch January 28, 2026 07:49
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.

2 participants