Skip to content

Commit 06674db

Browse files
committed
Add Docs
Signed-off-by: Pushpak Chhajed <[email protected]>
1 parent e32ee7b commit 06674db

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff 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

133177
Thank you for considering contributing to Boost! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).

0 commit comments

Comments
 (0)