PHP code example of myctobot / aoe-php

1. Go to this page and download the library: Download myctobot/aoe-php 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/ */

    

myctobot / aoe-php example snippets


return [
    'storage_path' => $_SERVER['HOME'] . '/.aoe-php',
    'default_tool' => 'claude',
    'myctobot_conf_path' => '/path/to/myctobot/conf',

    'tmux' => [
        'prefix' => 'aoe-',  // Session prefix: aoe-{tenant}-{id}
    ],

    'websocket' => [
        'host' => '127.0.0.1',
        'port' => 9502,
        'poll_interval' => 100,
    ],
];

use Aoe\Session\Storage;
use Aoe\Tenant\TenantContext;
use Aoe\Config\AoeConfig;

// Set tenant from session
$tenantSlug = $_SESSION['tenant_slug'];
TenantContext::set($tenantSlug);

// Load config
$config = AoeConfig::createDefault();
$tenantConfig = $config->forTenant($tenantSlug);

// Get sessions
$storage = new Storage($tenantSlug);
$sessions = $storage->loadAll();
bash
composer 
bash
git clone <repository>
cd aoe-php
composer install