Class: HunkReviewChanges::Installer::ClaudeCode
- Defined in:
- lib/hunk_review_changes/installer/claude_code.rb
Overview
Claude Code is the one agent with a real, non-interactive plugin install CLI, so this adapter uses it: register the marketplace repo, then install the plugin from it. Skills inside the plugin are auto-discovered once it is installed.
Instance Method Summary collapse
Instance Method Details
#detected? ⇒ Boolean
16 17 18 |
# File 'lib/hunk_review_changes/installer/claude_code.rb', line 16 def detected? command_on_path?("claude") || File.directory?(home(".claude")) end |
#install!(source) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/hunk_review_changes/installer/claude_code.rb', line 20 def install!(source) return failure("`claude` CLI not found on PATH") unless command_on_path?("claude") added, add_out = run("claude", "plugin", "marketplace", "add", source.repo) return failure("`claude plugin marketplace add` failed: #{add_out}") unless added installed, install_out = run( "claude", "plugin", "install", "#{PLUGIN_NAME}@#{MARKETPLACE_NAME}" ) return failure("`claude plugin install` failed: #{install_out}") unless installed ok("installed plugin #{PLUGIN_NAME}@#{MARKETPLACE_NAME} (user scope)") end |
#key ⇒ Object
13 |
# File 'lib/hunk_review_changes/installer/claude_code.rb', line 13 def key = :claude |
#label ⇒ Object
14 |
# File 'lib/hunk_review_changes/installer/claude_code.rb', line 14 def label = "Claude Code" |