File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,50 @@ JSON Example:
128128}
129129```
130130
131+ ## Adding Support for Custom IDE/AI Agents
132+
133+ ### Writing the Code Environment for an IDE/AI Agent
134+
135+ To create a custom code environment for an IDE, you first need to define a class that extends
136+ ` \Laravel\Boost\Install\CodeEnvironment\CodeEnvironment ` and implements the appropriate contracts:
137+
138+ - ` Laravel\Boost\Contracts\Agent `
139+ - ` Laravel\Boost\Contracts\McpClient `
140+
141+ ### Example Implementation
142+
143+ ``` php
144+ <?php
145+
146+ declare(strict_types=1);
147+
148+ namespace App;
149+
150+ use Laravel\Boost\Contracts\Agent;
151+ use Laravel\Boost\Contracts\McpClient;
152+ use Laravel\Boost\Install\CodeEnvironment\CodeEnvironment;
153+
154+ class OpenCode extends CodeEnvironment implements Agent, McpClient
155+ {
156+ // Your implementation goes here
157+ }
158+ ````
159+
160+ ### Registering the Custom Code Environment
161+
162+ Once your implementation is complete, register the custom environment using the `Boost` facade’s
163+ `registerCodeEnvironment` method:
164+
165+ ```php
166+ use Laravel\Boost\Boost;
167+
168+ public function boot(): void
169+ {
170+ Boost::registerCodeEnvironment('opencode', OpenCode::class);
171+ }
172+ ```
173+
174+
131175## Contributing
132176
133177Thank you for considering contributing to Boost! The contribution guide can be found in the [ Laravel documentation] ( https://laravel.com/docs/contributions ) .
You can’t perform that action at this time.
0 commit comments