The missing way of running tinker in Visual Studio Code, inspired by Tinkerwell.
🗒 Looking for the 👉 Tinkerun Desktop App?
- 🪶 write with typescript only
- 🖖 never leave VSCode
- 🚀 speed in docker, ssh
- 🥶 deadly simple, you are just creating the PHP files
- 📄 Form Mode
If you are creating awesome Laravel project with VSCode, you will never miss it.
👋 Welcome! Let's start running tinker in Visual Studio Code.
Press CMD+Shift+p then select Tinkerun: install to active the extension to your Laravel project.
The Tinkerun: install command will create a .tinkerun folder in your project.
├── .tinkerun
│ ├── inspiring.php // the example code to run
│ ├── tinkerun.json // the tinkerun config file
Open the file .tinkerun/inspiring.php, you will see a green
The play button read the config from .tinkerun/tinkerun.json,
and open a tinker process with the config, then simulate to input the code from .tinkerun/inspiring.php.
You are ready to Go :-) 🎉 🎉 🎉
Create PHP files in the .tinkerun folder, and run it via green play button or shortcut CTRL+r
You can create lots of connections
{
"connections": [
// default connection config
{
"name": "dev",
"command": "php artisan tinker"
},
// you can also connect docker
{
"name": "docker",
"command": "sail tinker"
},
// and connect your ssh server
{
"name": "tinke.run",
"command": "ssh deloyer@tinke.run -t 'cd /var/www/tinke.run/current && php artisan tinker;bash --login'"
}
]
}then when you are running the PHP file under .tinkerun folder. You will Pick a connection to run at first time.
The default shortcut is CTRL+r, also you can bind yours:
- open
Code -> Preferences -> Keyboard Shortcuts - search
tinkerun.runcommand - bind your favorite shortcut
Press Enter in the Tinkerun result panel, and your missing Tinker back.
Add support for WSL, please add export TERM=xterm to commands in .tinkerun/tinkerun.json.
For example :
{
"connections": [
{
"name": "dev",
"command": "export TERM=xterm && php artisan tinker"
}
]
}If the troubleshooting guides did not resolve the issue, please reach out to me by filing an issue, starting a GitHub discussion


