drahil / tailor
Enhanced Laravel Tinker with session management, code export, and smart autocomplete
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/drahil/tailor
Requires
- php: ^8.2
- psy/psysh: ^0.12.12
- symfony/console: ^7.3
Requires (Dev)
- dg/bypass-finals: ^1.9
- mockery/mockery: ^1.6
- pestphp/pest: ^2.0
- phpstan/phpstan: ^2.1
This package is auto-updated.
Last update: 2025-12-14 22:10:26 UTC
README
Enhanced Laravel Tinker with session management and isolated history.
What is Tailor?
Tailor extends Laravel Tinker with powerful session management, allowing you to save your REPL sessions, execute them later, and maintain isolated command history per project.
Features
- Session Management - Save, load, view, and execute your Tinker sessions
- Session Metadata - Add descriptions and tags to organize your sessions
- Isolated History - Per-project command history that doesn't pollute your global PsySH history
- Session Tracking - Track commands and variables during your REPL session
- Session Execution - Replay saved sessions to reproduce your work
Installation
composer require --dev drahil/tailor
Usage
Start Tailor:
php artisan tailor
Session Commands
Save a session:
session:save my-work # Save current session session:save my-work -d "API testing" # Save with description session:save my-work -t api -t testing # Save with tags session:save my-work --force # Overwrite existing session
List sessions:
session:list # List all saved sessions sessions # Alias for session:list
View session details:
session:view my-work # View session metadata and commands view my-work # Alias for session:view
Execute a session:
session:execute my-work # Run all commands from a session exec my-work # Alias for session:execute
Delete a session:
session:delete my-work # Delete a session (with confirmation) session:delete my-work --force # Delete without confirmation delete my-work -f # Short flag version
Configuration
Tailor uses sensible defaults for session storage. Sessions are stored in storage/tailor/sessions by default.
You can customize storage paths by publishing the configuration file:
php artisan vendor:publish --tag=tailor-config
Then edit config/tailor.php to customize storage paths and other settings.
Requirements
- PHP 8.2 or higher
- Symfony Console ^7.3
- PsySH ^0.12.12
Development
Run tests:
composer test
Run static analysis:
composer phpstan
Run all checks:
composer check
License
MIT License. See LICENSE for details.