VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-copilot-cli/2.2-configuration-generation

⇱ Configuration Generation | invokable/laravel-boost-copilot-cli | DeepWiki


Loading...
Last indexed: 7 March 2026 (397730)
Menu

Configuration Generation

This page explains what happens when you run php artisan boost:install after installing the package. It covers the interactive prompts, the files that are written to disk, and how boost.json records your selections.

For how to invoke the copilot binary once these files exist, see Starting Copilot CLI. For environment-specific differences in the generated mcp-config.json (Sail, Testbench), see Environment-Specific Setup.


The boost:install Command

Running php artisan boost:install starts an interactive wizard provided by the laravel/boost package. The wizard detects registered agents — including copilot-cli, which is registered by CopilotCliServiceProvider::boot() — and presents two sequential prompts.

Diagram: boost:install command flow with agent method invocations


Sources: README.md43-53 src/CopilotCli.php66-82 src/CopilotCli.php91-103 src/CopilotCli.php108-140

<old_str>

Prompt 2: AI Agents

This prompt only appears if Boost MCP Server Configuration was selected in Prompt 1. It asks Which AI agents would you like to configure?. Selecting GitHub Copilot CLI causes boost:install to write .github/mcp-config.json.

The content written to mcp-config.json is determined by CopilotCli::mcpServerConfig(), which calls convertCommandToPhpPath() to select the correct command for the current environment. The resulting file follows this structure for a standard Laravel application:


For Sail or Testbench environments, the command and args values differ. See Environment-Specific Setup and the convertCommandToPhpPath decision tree described in CopilotCli Agent Class.

Sources: README.md43-53 src/CopilotCli.php91-103 .github/copilot-instructions.md41-90 <new_str>

Prompt 2: AI Agents

This prompt only appears if Boost MCP Server Configuration was selected in Prompt 1. It asks Which AI agents would you like to configure?. Selecting GitHub Copilot CLI causes boost:install to write .github/mcp-config.json.

The content written to mcp-config.json is determined by CopilotCli::mcpServerConfig() src/CopilotCli.php91-103 which calls convertCommandToPhpPath() src/CopilotCli.php108-122 to select the correct command for the current environment.

Diagram: Environment detection logic in mcpServerConfig()


Sources: src/CopilotCli.php91-103 src/CopilotCli.php108-140

The resulting file follows this structure for a standard Laravel application:


For Sail or Testbench environments, the command and args values differ. See Environment-Specific Setup for examples of each environment's configuration.

Sources: README.md43-53 src/CopilotCli.php91-103 .github/copilot-instructions.md41-90


Prompt 1: Boost Features

The first prompt is Which Boost features would you like to configure?. Each choice maps to one or more output files, as described in the table below.

Feature selectionFile writtenPath defined in
AI Guidelines.github/instructions/laravel-boost.instructions.mdCopilotCli::guidelinesPath()
Agent Skills.github/skills/ (e.g. pest-testing/SKILL.md)CopilotCli::skillsPath()
Boost MCP Server Configuration.github/mcp-config.jsonCopilotCli::mcpConfigPath()

The path constants are not hardcoded strings scattered across the codebase. They are methods on the CopilotCli agent class:

  • guidelinesPath() returns the value of config('boost.agents.copilot_cli.guidelines_path'), defaulting to .github/instructions/laravel-boost.instructions.md. src/CopilotCli.php66-69
  • skillsPath() returns the value of config('boost.agents.copilot_cli.skills_path'), defaulting to .github/skills. src/CopilotCli.php73-76
  • mcpConfigPath() returns the fixed string .github/mcp-config.json. src/CopilotCli.php79-82

Prompt 2: AI Agents

This prompt only appears if Boost MCP Server Configuration was selected in Prompt 1. It asks Which AI agents would you like to configure?. Selecting GitHub Copilot CLI causes boost:install to write .github/mcp-config.json.

The content written to mcp-config.json is determined by CopilotCli::mcpServerConfig(), which calls convertCommandToPhpPath() to select the correct command for the current environment. The resulting file follows this structure for a standard Laravel application:


For Sail or Testbench environments, the command and args values differ. See Environment-Specific Setup and the convertCommandToPhpPath decision tree described in CopilotCli Agent Class.

Sources: README.md43-53 src/CopilotCli.php91-103 .github/copilot-instructions.md41-90


Generated Files in Detail

Diagram: CopilotCli methods mapped to output files


Sources: src/CopilotCli.php66-103

.github/instructions/laravel-boost.instructions.md

This is the AI guidelines file consumed by the Copilot CLI on every session. Its content is rendered from the Blade template at resources/boost/guidelines/core.blade.php. The guidelines instruct the AI on how to use the laravel-boost MCP tools. See Guidelines and Instructions for details on the template and its sync workflow.

.github/skills/

The skills directory holds agent skill definitions. The pest-testing skill is the one supported by this package. It is written to .github/skills/pest-testing/SKILL.md. See Pest Testing Skill for what this file contains and how it influences AI behavior.

.github/mcp-config.json

This is the MCP server definition file. The Copilot CLI reads it at startup via the --additional-mcp-config flag. It tells Copilot CLI to spawn php artisan boost:mcp (or an environment-specific equivalent) as a local subprocess. The full field structure is documented in MCP Configuration File.


Local Configuration Overrides

For MCP servers that require sensitive credentials (such as API tokens or authorization headers), create .github/mcp-config.local.json for local-only settings. This file is loaded in addition to mcp-config.json when using the copilot_mcp shell function.

Add it to .gitignore to prevent credentials from being committed:


Example .github/mcp-config.local.json:


Sources: README.md101-124


boost.json — Recording the Configuration

After boost:install completes, it writes a boost.json file at the project root. This file records which features and agents were selected, so future runs of boost:install (or boost:update) can determine the current state.

An example boost.json for a project that selected all Copilot CLI features:


Configuration field reference:

KeyTypeDescription
agentsarrayAgent identifiers that were configured (e.g. "copilot-cli")
guidelinesboolWhether the AI guidelines feature was enabled
mcpboolWhether the MCP server configuration was enabled
skillsarraySkill identifiers included (e.g. "pest-testing")
herd_mcpboolWhether the Laravel Herd MCP feature was enabled
nightwatch_mcpboolWhether the Nightwatch MCP feature was enabled
sailboolWhether the Laravel Sail integration was enabled

This file is used by subsequent invocations of boost:install or boost:update to determine which features are currently configured. The Laravel Boost framework reads this file to decide which agents and features to present or update.

Sources: README.md43-53


Testbench Variant

When running inside a package development environment (where the TESTBENCH_CORE constant is defined), the installation command is:


The generated .github/mcp-config.json will use ./vendor/bin/testbench as the command instead of php, and the args array will be ["boost:mcp"] (omitting artisan). This branching is handled in CopilotCli::mcpServerConfig() src/CopilotCli.php91-103 and convertCommandToPhpPath() src/CopilotCli.php108-122

Before running vendor/bin/testbench boost:install, you should complete the workbench setup. See Environment-Specific Setup for the full Testbench setup sequence.

Sources: docs/testbench.md54-78 src/CopilotCli.php108-140