Skip to content

Conversation

@anntnzrb
Copy link
Contributor

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

Skip shell config modification for users on NixOS/home-manager
or other systems with immutable/declarative configurations.

Also changes 'no config file found' from error to warning,
allowing the install to succeed even when config files are
not writable.
Previously unknown flags were silently ignored, which could lead to
confusion if a user typos a flag (e.g., --no-modify instead of
--no-modify-path).
@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@anntnzrb
Copy link
Contributor Author

@rekram1-node

@rekram1-node rekram1-node merged commit 10eed6e into sst:dev Dec 23, 2025
2 checks passed
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.

[FEATURE]: Add standard CLI flags to install script (--help, --version, --no-modify-path)

2 participants