Skip to content

Commit df817a1

Browse files
committed
feat: bypass 'what to install' if herd isn't available
1 parent 1dad67b commit df817a1

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/Console/InstallCommand.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,20 +225,22 @@ private function selectBoostFeatures(): Collection
225225
{
226226
$defaultInstallOptions = ['mcp_server', 'ai_guidelines'];
227227
$installOptions = [
228-
'mcp_server' => 'Boost MCP Server',
229-
'ai_guidelines' => 'Package AI Guidelines (i.e. Framework, Inertia, Pest)',
228+
'mcp_server' => 'Boost MCP Server (with 15+ tools)',
229+
'ai_guidelines' => 'Boost AI Guidelines (for Laravel, Inertia, and more)',
230230
];
231231

232232
if ($this->herd->isMcpAvailable()) {
233233
$installOptions['herd_mcp'] = 'Herd MCP Server';
234+
235+
return collect(multiselect(
236+
label: 'What shall we install?',
237+
options: $installOptions,
238+
default: $defaultInstallOptions,
239+
required: true,
240+
));
234241
}
235242

236-
return collect(multiselect(
237-
label: 'What shall we install?',
238-
options: $installOptions,
239-
default: $defaultInstallOptions,
240-
required: true,
241-
));
243+
return collect(['mcp_server', 'ai_guidelines']);
242244
}
243245

244246
/**
@@ -291,12 +293,11 @@ private function selectTargetAgents(): Collection
291293
/**
292294
* Get configuration settings for contract-specific selection behavior.
293295
*
294-
* @param string $contractClass
295296
* @return array{scroll: int, required: bool, displayMethod: string}
296297
*/
297298
private function getSelectionConfig(string $contractClass): array
298299
{
299-
return match($contractClass) {
300+
return match ($contractClass) {
300301
Agent::class => ['scroll' => 4, 'required' => false, 'displayMethod' => 'agentName'],
301302
McpClient::class => ['scroll' => 5, 'required' => true, 'displayMethod' => 'displayName'],
302303
default => throw new InvalidArgumentException("Unsupported contract class: {$contractClass}"),

0 commit comments

Comments
 (0)