Skip to content

Remove --language option from rhiza init CLI#339

Open
Copilot wants to merge 3 commits intomainfrom
copilot/remove-language-option-init
Open

Remove --language option from rhiza init CLI#339
Copilot wants to merge 3 commits intomainfrom
copilot/remove-language-option-init

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

The --language CLI flag on rhiza init is removed. Language selection is now done via --template-repository (e.g. jebel-quant/rhiza-go for Go projects). The underlying init() implementation retains its language parameter.

src/rhiza/cli.py

  • Dropped language: str = typer.Option(...) from init() signature
  • Removed language=language from init_cmd() call
  • Stripped all --language references from docstring/examples
  • Simplified --template-repository help text

tests/test_commands/test_init_language.py

  • Refactored TestInitWithLanguageTestInitWithTemplateRepository; all tests now use template_repository= instead of language=
  • Dropped test_init_unknown_language (no meaningful equivalent via template repository)
  • Added @patch("...._check_template_repository_reachable") where explicit template_repository is now passed

REPOSITORY_ANALYSIS.md

  • Updated two observations that referenced rhiza init --language go to reflect the template-repository approach

Before:

rhiza init --language go
rhiza init --language python --git-host github

After:

rhiza init --template-repository jebel-quant/rhiza-go --git-host github
rhiza init  # defaults to jebel-quant/rhiza (Python)
Original prompt

Remove the --language option/parameter from the rhiza init CLI interface in Jebel-Quant/rhiza-cli.

Requirements:

  • Update src/rhiza/cli.py:
    • Remove the --language Typer option from the init command signature.
    • Remove all help/docstring text and examples that reference --language for init.
    • Ensure the call to init_cmd(...) no longer passes a language argument.
  • Ensure behavior remains sensible after removal:
    • init_cmd should still be called with the remaining options.
    • Default template selection should follow current defaults (Python) unless overridden by --template-repository / --template-branch.
  • Update documentation files to match the new CLI:
    • CLI.md and README.md should not mention --language for init.
  • Update tests:
    • Remove or refactor tests that assert CLI support for --language.
    • Refactor language-specific tests (tests/test_commands/test_init_language.py) to test equivalent behavior via template repository selection (e.g., using template_repository="jebel-quant/rhiza-go" instead of language="go") or adjust expectations if the underlying command still supports language internally.
    • Ensure the full test suite passes.

Notes:

  • Underlying implementation src/rhiza/commands/init.py may still accept a language parameter; it does not need to be removed unless required by test changes. The key goal is to remove it from the CLI interface.
  • Keep backward compatibility considerations minimal; breaking the --language CLI flag is acceptable as requested.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Remove --language option from rhiza init CLI interface Remove --language option from rhiza init CLI Mar 2, 2026
Copilot finished work on behalf of tschm March 2, 2026 14:53
@tschm tschm marked this pull request as ready for review March 2, 2026 14:56
Copilot AI and others added 2 commits March 2, 2026 18:59
Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
@tschm tschm force-pushed the copilot/remove-language-option-init branch from ab8e9dd to 89394e9 Compare March 2, 2026 14:59
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