Skip to content

chore: deprecate CLI in favor of deployhq-cli#24

Merged
facundofarias merged 5 commits into
masterfrom
deprecate-cli
Apr 28, 2026
Merged

chore: deprecate CLI in favor of deployhq-cli#24
facundofarias merged 5 commits into
masterfrom
deprecate-cli

Conversation

@facundofarias
Copy link
Copy Markdown
Contributor

@facundofarias facundofarias commented Apr 26, 2026

Summary

  • Deprecates the CLI bundled in this gem in favor of the new deployhq-cli, which offers more features, fewer dependencies, and first-class support for AI-assisted workflows
  • Adds deprecation notices at three touchpoints: README (discovery), gemspec post_install_message (install time), and stderr warning (every CLI invocation)
  • The Ruby API library (Deploy::Resource, etc.) remains available for programmatic use

Test plan

  • Run ruby -Ilib bin/deployhq --help and verify the yellow deprecation banner appears on stderr before the help output
  • Verify gem build deployhq.gemspec succeeds and gem install ./deployhq-*.gem shows the post-install warning
  • Confirm README renders the deprecation callout correctly on GitHub

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added a deprecation notice: the bundled CLI will be removed in a future release; users should migrate to the external DeployHQ CLI. The Ruby API remains supported and documented.
  • Chores

    • Package metadata and post-install message updated to note CLI deprecation and provide a migration link.
    • CLI now emits a visible deprecation warning when invoked.
  • Refactor

    • Internal initialization logic simplified with no change to public behavior.

The CLI bundled in this gem is now deprecated. Users are directed to
https://github.com/deployhq/deployhq-cli which offers more features,
fewer dependencies, and first-class support for AI-assisted workflows.

Deprecation notices added at three touchpoints:
- README.md: prominent notice at the top
- gemspec: post_install_message on gem install
- CLI: stderr warning on every invocation

The Ruby API library remains available for programmatic use.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e93f4a4-ffdb-4d8e-8355-665d85051f4e

📥 Commits

Reviewing files that changed from the base of the PR and between 963d995 and 0e5a391.

📒 Files selected for processing (1)
  • README.md

Walkthrough

Adds deprecation notices for the bundled CLI: README updated, gemspec metadata and post-install message added, and runtime CLI now warns on invocation; a small initialization refactor in deployment progress output was made. The Ruby API library remains supported.

Changes

Cohort / File(s) Summary
Docs & Packaging
README.md, deployhq.gemspec
Marked bundled CLI as deprecated in README; updated gemspec s.summary/s.description and added s.post_install_message pointing to https://github.com/deployhq/deployhq-cli.
CLI Runtime
lib/deploy/cli.rb
Added Deploy::CLI::DEPRECATION_NOTICE (ANSI-styled multi-line string) and emit it via warn at CLI invoke.
Deployment Progress Init
lib/deploy/cli/deployment_progress_output.rb
Refactored initialization to build @step_index and @server_tags with Array#to_h from pairs instead of manual hash mutation; behavior unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • MartaKar
  • thdurante
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: deprecating the bundled CLI in favor of an external deployhq-cli repository. All code changes across README, gemspec, and lib/deploy/cli.rb focus on this deprecation objective.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deprecate-cli

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
lib/deploy/cli.rb (1)

36-38: Add an automated CLI spec for the new stderr warning.

This PR changes user-visible CLI behavior, but there’s no CLI spec coverage yet. A focused spec around .invoke + --help would lock this in and prevent regressions.

🧪 Example spec skeleton
# spec/deploy/cli_spec.rb
RSpec.describe Deploy::CLI do
  describe '.invoke' do
    it 'prints a deprecation warning to stderr' do
      expect do
        begin
          described_class.invoke(%w[--help])
        rescue SystemExit
          # expected from --help path
        end
      end.to output(/DEPRECATED/).to_stderr
    end
  end
end
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/deploy/cli.rb` around lines 36 - 38, Add a focused RSpec that invokes
Deploy::CLI.invoke with the --help argument and asserts the deprecation notice
is written to stderr: call described_class.invoke(%w[--help]) inside an expect {
... }.to output(/DEPRECATED/).to_stderr, rescuing SystemExit from the help path;
place this spec alongside other CLI specs and target Deploy::CLI.invoke so
future changes to DEPRECATION_NOTICE or invoke's stderr behavior will be caught.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@deployhq.gemspec`:
- Line 12: The s.description assignment in deployhq.gemspec is too long and
breaks RuboCop's Layout/LineLength; update the s.description value (the
s.description = '...') to split the long text into multiple shorter string
segments (e.g., string literal concatenation, %q(...) or heredoc) so the
combined description remains the same but no single line exceeds the max length;
ensure the CLI deprecation note and the URL remain in the resulting string.

In `@README.md`:
- Around line 3-8: The README currently has a deprecation notice but later
sections ("CLI client" and "Development") still present the bundled CLI as
active; update those sections to reflect the deprecation and provide a single
migration path to the new DeployHQ CLI and guidance for contributors: modify the
"CLI client" section to clearly state the bundled CLI is deprecated, add a short
migration subsection that links to the DeployHQ CLI repo and lists equivalent
commands/workflows, and update the "Development" section to describe contributor
guidance (e.g., maintainers only, where CLI bugfixes should be accepted or
archived) or point PRs and feature work toward the new CLI instead of
instructing users to build/run the deprecated CLI.

---

Nitpick comments:
In `@lib/deploy/cli.rb`:
- Around line 36-38: Add a focused RSpec that invokes Deploy::CLI.invoke with
the --help argument and asserts the deprecation notice is written to stderr:
call described_class.invoke(%w[--help]) inside an expect { ... }.to
output(/DEPRECATED/).to_stderr, rescuing SystemExit from the help path; place
this spec alongside other CLI specs and target Deploy::CLI.invoke so future
changes to DEPRECATION_NOTICE or invoke's stderr behavior will be caught.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e2df2491-a60f-4072-875f-d3ad6809e17c

📥 Commits

Reviewing files that changed from the base of the PR and between 9c16d4c and 40b233a.

📒 Files selected for processing (3)
  • README.md
  • deployhq.gemspec
  • lib/deploy/cli.rb

Comment thread deployhq.gemspec Outdated
Comment thread README.md
facundofarias and others added 2 commits April 26, 2026 10:38
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes Style/ReduceToHash offenses in deployment_progress_output.rb.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
deployhq.gemspec (1)

11-11: Consider leading with the deprecation notice in the summary.

The current format appends "(CLI deprecated)" at the end, which is functional but slightly buries the important deprecation information. Leading with it or restructuring might improve clarity, e.g., "DeployHQ API and CLI client (CLI deprecated)""API and CLI client for DeployHQ (CLI deprecated)" or "DeployHQ client library (CLI deprecated, API active)".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deployhq.gemspec` at line 11, Update the gemspec summary string assigned to
s.summary to lead with or more clearly surface the deprecation notice; locate
the s.summary assignment and replace the existing value "'API and CLI client for
the DeployHQ (CLI deprecated)'" with a rephrased summary such as "'DeployHQ
client library (CLI deprecated, API active)'" or "'API and CLI client for
DeployHQ (CLI deprecated)'" so the deprecation appears at the start or is
otherwise more prominent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@deployhq.gemspec`:
- Around line 12-14: The s.description assignment has misaligned continuation
lines; adjust the continuation so each wrapped string literal aligns with the
opening single quote of the first line in the s.description assignment (i.e.,
align the second and third quoted lines with the opening quote used for
s.description), preserving the string concatenation backslashes and spacing;
locate the s.description assignment to apply the alignment fix.

---

Nitpick comments:
In `@deployhq.gemspec`:
- Line 11: Update the gemspec summary string assigned to s.summary to lead with
or more clearly surface the deprecation notice; locate the s.summary assignment
and replace the existing value "'API and CLI client for the DeployHQ (CLI
deprecated)'" with a rephrased summary such as "'DeployHQ client library (CLI
deprecated, API active)'" or "'API and CLI client for DeployHQ (CLI
deprecated)'" so the deprecation appears at the start or is otherwise more
prominent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c416f528-20be-4410-9179-d816578ca88d

📥 Commits

Reviewing files that changed from the base of the PR and between 40b233a and 3c4b49a.

📒 Files selected for processing (1)
  • deployhq.gemspec

Comment thread deployhq.gemspec Outdated
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
deployhq.gemspec (1)

27-30: Consider aligning install-time wording with README/runtime notice.

At Line 28-Line 29, this message is clear, but it omits “will be removed in a future release,” which appears in README.md:1-8 and lib/deploy/cli.rb:25-34. Using the same phrasing across all three touchpoints would reduce ambiguity.

Suggested wording alignment
   s.post_install_message = <<~MSG
-    WARNING: The DeployHQ CLI bundled in this gem is deprecated.
-    Please migrate to the new CLI: https://github.com/deployhq/deployhq-cli
+    WARNING: The DeployHQ CLI bundled in this gem is deprecated and will be removed in a future release.
+    Please migrate to the new CLI: https://github.com/deployhq/deployhq-cli
   MSG
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@deployhq.gemspec` around lines 27 - 30, Update the s.post_install_message
text in deployhq.gemspec (the s.post_install_message block) to match the
README.md and lib/deploy/cli.rb wording by adding the phrase “will be removed in
a future release” (or the exact shared phrasing used in those files) to the
deprecation notice about the bundled CLI so all three notices are consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@deployhq.gemspec`:
- Around line 27-30: Update the s.post_install_message text in deployhq.gemspec
(the s.post_install_message block) to match the README.md and lib/deploy/cli.rb
wording by adding the phrase “will be removed in a future release” (or the exact
shared phrasing used in those files) to the deprecation notice about the bundled
CLI so all three notices are consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0c6be214-11e0-4f0a-bb66-2fcdc824bf49

📥 Commits

Reviewing files that changed from the base of the PR and between 2cd5831 and 963d995.

📒 Files selected for processing (1)
  • deployhq.gemspec

Replaces the active CLI usage examples and "experimental" development
section with deprecation pointers to deployhq-cli, as flagged by
CodeRabbit review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@facundofarias facundofarias merged commit f983bc6 into master Apr 28, 2026
12 checks passed
@facundofarias facundofarias deleted the deprecate-cli branch April 28, 2026 09:52
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