PHP code example of coquibot / coqui-toolkit-mod-manager
1. Go to this page and download the library: Download coquibot/coqui-toolkit-mod-manager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coquibot / coqui-toolkit-mod-manager example snippets
use CoquiBot\ModManager\ModManagerToolkit;
// From environment variables
$toolkit = ModManagerToolkit::fromEnv();
// Or with explicit configuration
$toolkit = new ModManagerToolkit(
urlResolver: static fn() => 'https://agentcoqui.com/api/v1',
tokenResolver: static fn() => getenv('COQUI_MODS_API_TOKEN') ?: '',
workspaceDir: '/path/to/.workspace',
);
// Get tools
foreach ($toolkit->tools() as $tool) {
echo $tool->name() . ': ' . $tool->description() . "\n";
}
// Execute a tool directly
$tool = $toolkit->tools()[0]; // mods_skills
$result = $tool->execute(['action' => 'search', 'query' => 'code review']);
echo $result->content;