[PR #5885] feat(install): add standard CLI flags (--help, --version, --no-modify-path) #11631

Closed
opened 2026-02-16 18:16:31 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5885

State: closed
Merged: Yes


Summary

Adds standard CLI flags to the install script, following conventions from popular installers like Rustup, Homebrew, and Starship.

Closes #5884

Changes

This PR contains 4 independent, cherry-pickable commits:

Commit Description
1 feat(install): add --help flag
2 feat(install): add --version flag
3 feat(install): add --no-modify-path flag
4 fix(install): warn on unknown arguments

New Flags

Flag Description
-h, --help Display usage information
-v, --version <ver> Install a specific version (alternative to VERSION env var)
--no-modify-path Don't modify shell config files (for NixOS, immutable distros, etc.)

Example Usage

curl -fsSL https://opencode.ai/install | bash -s -- --help
curl -fsSL https://opencode.ai/install | bash -s -- --version 1.0.180
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path

Additional Changes

  • Unknown arguments now produce a warning instead of being silently ignored
  • "No config file found" changed from error to warning, allowing install to succeed on systems with read-only configs
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5885 **State:** closed **Merged:** Yes --- ## Summary Adds standard CLI flags to the install script, following conventions from popular installers like Rustup, Homebrew, and Starship. Closes #5884 ## Changes This PR contains 4 independent, cherry-pickable commits: | Commit | Description | |--------|-------------| | 1 | `feat(install): add --help flag` | | 2 | `feat(install): add --version flag` | | 3 | `feat(install): add --no-modify-path flag` | | 4 | `fix(install): warn on unknown arguments` | ## New Flags | Flag | Description | |------|-------------| | `-h`, `--help` | Display usage information | | `-v`, `--version <ver>` | Install a specific version (alternative to `VERSION` env var) | | `--no-modify-path` | Don't modify shell config files (for NixOS, immutable distros, etc.) | ## Example Usage ```bash curl -fsSL https://opencode.ai/install | bash -s -- --help curl -fsSL https://opencode.ai/install | bash -s -- --version 1.0.180 curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path ``` ## Additional Changes - Unknown arguments now produce a warning instead of being silently ignored - "No config file found" changed from error to warning, allowing install to succeed on systems with read-only configs
yindo added the pull-request label 2026-02-16 18:16:31 -05:00
yindo closed this issue 2026-02-16 18:16:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11631