Skip to content

refactor: simplify InstallCommand by consolidating CodeEnvironment handling and removing legacy agents #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
d911705
refactor: simplify InstallCommand by consolidating CodeEnvironment ha…
pushpak1300 Aug 12, 2025
ee75632
Fix code styling
pushpak1300 Aug 12, 2025
ca6a45e
refactor: replace Agent and Ide contracts with CodingAgent and McpClient
pushpak1300 Aug 12, 2025
447a5dc
refactor: integrate CodingAgent contract in InstallCommand and enhanc…
pushpak1300 Aug 12, 2025
7e51cf8
refactor: adjust InstallCommand docblocks and structure for consisten…
pushpak1300 Aug 12, 2025
1a80964
refactor: rename CodingAgent to Agent, streamline detection methods, …
pushpak1300 Aug 12, 2025
a8290fb
refactor: add unit tests for CodeEnvironment and update InstallComman…
pushpak1300 Aug 12, 2025
a616134
refactor: rename ideName to mcpClientName and enhance MCP client hand…
pushpak1300 Aug 12, 2025
391ad01
refactor: update McpInstallationStrategy casing to align with consist…
pushpak1300 Aug 12, 2025
0ed0b93
refactor: enhance InstallCommand with improved contract handling and …
pushpak1300 Aug 12, 2025
b623165
refactor: streamline code environment detection and remove redundant …
pushpak1300 Aug 12, 2025
1dad67b
feat: update VS code display name
ashleyhindle Aug 12, 2025
df817a1
feat: bypass 'what to install' if herd isn't available
ashleyhindle Aug 12, 2025
b28b356
feat: only show zed if it's installed
ashleyhindle Aug 12, 2025
0cb33db
feat: slightly rename some main rule files when they're shown in the …
ashleyhindle Aug 12, 2025
e69581a
feat: improve boost:install
ashleyhindle Aug 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
275 changes: 130 additions & 145 deletions src/Console/InstallCommand.php

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion src/Contracts/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,29 @@

namespace Laravel\Boost\Contracts;

// We give Agents AI Rules
/**
* Agent contract for AI coding assistants that receive guidelines.
*/
interface Agent
{
/**
* Get the display name of the Agent.
*
* @return string|null
*/
public function agentName(): ?string;

/**
* Get the file path where AI guidelines should be written.
*
* @return string The relative or absolute path to the guideline file
*/
public function guidelinesPath(): string;

/**
* Determine if the guideline file requires frontmatter.
*
* @return bool
*/
public function frontmatter(): bool;
}
17 changes: 0 additions & 17 deletions src/Contracts/Ide.php

This file was deleted.

29 changes: 29 additions & 0 deletions src/Contracts/McpClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

declare(strict_types=1);

namespace Laravel\Boost\Contracts;

/**
* Contract for code editors that support MCP (Model Context Protocol).
*/
interface McpClient
{
/**
* Get the display name of the MCP (Model Context Protocol) client.
*
* @return string|null
*/
public function mcpClientName(): ?string;

/**
* Install an MCP server configuration in this IDE.
*
* @param string $key Server identifier/name
* @param string $command Executable command to run the MCP server
* @param array<int, string> $args Command line arguments
* @param array<string, string> $env Environment variables
* @return bool True if installation succeeded, false otherwise
*/
public function installMcp(string $key, string $command, array $args = [], array $env = []): bool;
}
22 changes: 0 additions & 22 deletions src/Install/Agents/ClaudeCode.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Install/Agents/Copilot.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Install/Agents/Cursor.php

This file was deleted.

68 changes: 0 additions & 68 deletions src/Install/Agents/FileMcpIde.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/Install/Agents/Junie.php

This file was deleted.

13 changes: 0 additions & 13 deletions src/Install/Agents/PhpStormJunie.php

This file was deleted.

43 changes: 0 additions & 43 deletions src/Install/Agents/ShellMcpIde.php

This file was deleted.

15 changes: 0 additions & 15 deletions src/Install/Agents/VsCode.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/Install/Agents/Windsurf.php

This file was deleted.

20 changes: 19 additions & 1 deletion src/Install/CodeEnvironment/ClaudeCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

namespace Laravel\Boost\Install\CodeEnvironment;

use Laravel\Boost\Contracts\Agent;
use Laravel\Boost\Contracts\McpClient;
use Laravel\Boost\Install\Enums\McpInstallationStrategy;
use Laravel\Boost\Install\Enums\Platform;

class ClaudeCode extends CodeEnvironment
class ClaudeCode extends CodeEnvironment implements McpClient, Agent
{
public function name(): string
{
Expand Down Expand Up @@ -37,4 +40,19 @@ public function projectDetectionConfig(): array
'files' => ['CLAUDE.md'],
];
}

public function mcpInstallationStrategy(): McpInstallationStrategy
{
return McpInstallationStrategy::SHELL;
}

public function shellMcpCommand(): string
{
return 'claude mcp add -s local -t stdio {key} "{command}" {args} {env}';
}

public function guidelinesPath(): string
{
return 'CLAUDE.md';
}
}
Loading