SiroPHP Docs
Build an API with auth in 5 minutes. 6 commands, zero bloat, instant debugging.
Quick Start
From zero to running in 2 commands.
$ composer create-project sirosoft/api my-app$ cd my-app && php siro key:generate$ php siro serveYour dev server is live at http://localhost:8080. That's it.
First CRUD API
Scaffold a complete CRUD in 2 seconds.
$ php siro make:crud products$ php siro make:crud products --simple --seed --force$ php siro make:crud orders --simple$ php siro migrateGenerated files: app/Models/Product.php, app/Controllers/ProductController.php, database/migrations/..., routes/api.php (5 routes), tests/Feature/...
Flags: --simple (minimal files), --seed (auto seed), --force (overwrite existing)
Testing APIs
Test endpoints right from your terminal. No Postman needed.
$ php siro t GET /api/products$ php siro t POST /api/products name=Laptop price=999$ php siro t POST /api/auth/login email=admin@test.com password=secret --as=admin$ php siro t GET /api/products --as=admin --loop=50$ php siro make:test ProductApi$ php siro make:test ProductApi --from-trace=a1b2c3d4$ php siro test$ php siro test --filter=Product --coverage--from-trace generates a PHPUnit test from a real production trace. Flags: --filter (test name filter), --coverage (code coverage report)
Debugging Workflow
The signature Siro workflow. Find and fix bugs in seconds.
$ php siro why$ php siro api:why GET /api/products$ php siro db:why abc123 --slow$ php siro replay a1b2c3d4$ php siro replay a1b2c3d4 --test$ php siro replay$ php siro fix$ php siro log:trace a1b2c3d4$ php siro log:slow --limit=10Every response includes X-Siro-Trace-Id. No guessing. No log diving.
api:why — debug a specific request by METHOD+path. db:why — EXPLAIN query with index suggestions. replay (alias) — replay latest trace. fix — watch mode auto re-tests on save. --test flag generates a regression test from the replay.
Production Safety
Safe debugging in production. No data leaks.
$ php siro replay a1b2c3d4 --dry-run$ php siro replay a1b2c3d4 --diff$ php siro log:export --status=500 --format=json --output=errors.json$ php siro log:export --status=500 --format=postman --output=collection.json$ php siro doctor --prod$ php siro rate:statusCredentials auto-[REDACTED]. Dry-run by default in production. Replay lock prevents accidental writes.
--format=postman exports a Postman collection from traces. doctor --prod checks production readiness. rate:status shows rate limiter state.
OpenAPI + Postman
API docs generated from your validation rules.
$ php siro make:openapi --with-swagger$ php siro make:postmanSwagger UI at /api/docs. Postman collection ready to import.
Deploy
Ship to production in one command.
$ php siro deploy --init$ php siro optimize$ docker compose up -dLog Management
Monitor, analyze, and clean up logs from your terminal.
$ php siro log:tail -f$ php siro log:top --limit=10$ php siro log:stats --days=7$ php siro log:cleanup --days=30 --dry-run$ php siro log:cleanup --days=30$ php siro log:replay --test$ php siro log:replay --force$ php siro debug:healthlog:tail -f tails realtime logs. log:top shows slowest requests. log:stats gives summary. log:cleanup --dry-run previews deletion. log:replay --test generates regression tests from traces. --force bypasses POST safe mode. debug:health checks logging health.
Queue System
Manage background jobs and queues.
$ php siro queue:work$ php siro queue:retry$ php siro queue:flush$ php siro queue:statusEnvironment & Maintenance
Manage env, migrations, routes, and maintenance mode.
$ php siro env:check$ php siro env:switch production$ php siro migrate:reset$ php siro migrate:refresh --seed$ php siro route:list$ php siro route:search users$ php siro route:rules$ php siro down$ php siro upAdvanced CLI
Project scaffolding, trace management, and more.
$ php siro new my-project$ php siro trace:list$ php siro traces$ php siro make:auth$ php siro make:crud orders --seed$ php siro make:service Payment$ php siro make:job SendWelcomeEmail$ php siro make:test ProductApi --from-trace=a1b2c3d4Regression Testing
Verify no regressions when deploying fixes.
$ php siro test:regression --limit=50$ php siro test:regression --fail$ php siro test:regression --limit=100 --failReplays all recorded traces and detects changes in status codes, response structure, or success rates.
--limit=N caps replay count. --fail exits non-zero on any regression (CI-friendly).
Ship your API now
6 commands from zero to API with auth. No Laravel bloat. No config hell.