revolution/laravel-boost-copilot-cli

Laravel Boost Custom CodeEnvironment for GitHub Copilot CLI

Fund package maintenance!
invokable

Installs: 815

Dependents: 2

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

pkg:composer/revolution/laravel-boost-copilot-cli

1.0.17 2025-11-09 04:54 UTC

This package is auto-updated.

Last update: 2025-11-25 05:23:50 UTC


README

tests Maintainability Code Coverage

Ask DeepWiki

Requirements

Supported Platforms

Laravel Sail

It also supports Laravel Sail. Before use, start it with vendor/bin/sail up -d. The copilot command runs outside of Sail.

Testbench for Package Developers

When developing Laravel packages, you can use Laravel Boost with Testbench.

Note: When using Testbench for package development, the environment differs from a regular Laravel project. Some MCP tools that depend on application-specific features (like database connections, specific models, or application routes) may not be available or may not work as expected in the Testbench environment.

Setup

First, ensure your testbench.yaml includes the following configuration:

env:
  CACHE_STORE: array

This is important because Laravel Boost tries to use a database cache store by default, which will not work properly.

Installation

Run the boost installation command using Testbench:

vendor/bin/testbench boost:install

This will generate .github/mcp-config.json configured for Testbench environment with the following settings:

{
    "mcpServers": {
        "laravel-boost": {
            "type": "local",
            "command": "./vendor/bin/testbench",
            "args": [
                "boost:mcp"
            ],
            "tools": [
                "*"
            ]
        }
    }
}

Usage

Use Copilot CLI with the generated config:

copilot --additional-mcp-config @.github/mcp-config.json

Installation

composer require revolution/laravel-boost-copilot-cli --dev

Usage

When you run the Laravel Boost installation command within your Laravel project, you'll see a GitHub Copilot CLI item added to the list. Select it to generate .github/mcp-config.json for Copilot CLI. To generate .github/copilot-instructions.md, also select the boost standard GitHub Copilot.

php artisan boost:install

When running the copilot command, specify .github/mcp-config.json using the --additional-mcp-config option.

copilot --additional-mcp-config @.github/mcp-config.json

If, after starting Copilot, Configured MCP servers: laravel-boost appears, the setup was successful.

From now on, always specify the --additional-mcp-config option when using the copilot command. It can be used together with other options.

copilot --additional-mcp-config @.github/mcp-config.json --resume
copilot --additional-mcp-config @.github/mcp-config.json --continue

Autoloading mcp-config.json

.bashrc or .zshrc can be modified to automatically load the mcp-config.json file if it exists in the current project.

copilot_mcp() {
  local args=()

  if [ -f ".github/mcp-config.json" ]; then
    args+=(--additional-mcp-config @.github/mcp-config.json)
  fi

  if [ -f ".github/mcp-config.local.json" ]; then
    args+=(--additional-mcp-config @.github/mcp-config.local.json)
  fi

  copilot "${args[@]}" "$@"
}

alias copilot=copilot_mcp
copilot
copilot --resume
copilot --continue

Local MCP Configuration

For MCP servers that require sensitive credentials (like Authorization headers), create .github/mcp-config.local.json for local-only settings. Add it to .gitignore to keep credentials out of version control.

echo ".github/mcp-config.local.json" >> .gitignore

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

{
  "mcpServers": {
    "remote-mcp": {
      "type": "http",
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      },
      "tools": ["*"]
    }
  }
}

License

MIT