Skip to content

Instantly share code, notes, and snippets.

View fgilio's full-sized avatar

Franco Gilio fgilio

View GitHub Profile
@fgilio
fgilio / agently.php
Created June 2, 2025 18:54
Untested DRAFT of a basic coding agent built in PHP
<?php
declare(strict_types=1); // enforce strict typing so PHP catches bad stuff early
// Simple coding agent in a single PHP 8.4 file inspired by Radan Skorić's 94‑line Ruby agent.
// https://radanskoric.com/articles/coding-agent-in-ruby
// Gives OpenAI‑backed chat plus four tools: read_file, list_files, edit_file, run_shell_command.
// Every line is commented with the "why" to align with your preference.
$apiKey = getenv('OPENAI_API_KEY'); // Pull the API key from env vars for security and portability
if (!$apiKey) { // Fail fast if we can't talk to the model
@fgilio
fgilio / SsPrechecks.php
Created January 14, 2026 13:54
ss-prechecks: SingleStore database metrics report for migration evaluation (like PlanetScale ps-prechecks)
<?php
namespace App\Console\Commands;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
/**
* SingleStore pre-checks command for migration evaluation.