Tinkerun for Visual Studio Code
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.
Install the extension
CMD+Shift+p then select
Tinkerun: install to active the extension to your Laravel project.
Tinkerun: install command will create a
.tinkerun folder in your project.
│ ├── inspiring.php // the example code to run
│ ├── tinkerun.json // the tinkerun config file
Open the file
.tinkerun/inspiring.php, you will see a green ▶️ play button in the upper right corner. Press it.
The play button read the config from
and open a tinker process with the config, then simulate to input the code from
You are ready to Go :-) 🎉 🎉 🎉
Create PHP files in the
.tinkerun folder, and run it via green play button or shortcut
You can create lots of connections
// default connection config
"command": "php artisan tinker"
// you can also connect docker
"command": "sail tinker"
// and connect your ssh server
"command": "ssh firstname.lastname@example.org -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.
How to change the default shortcut to run code
The default shortcut is
CTRL+r, also you can bind yours:
Code -> Preferences -> Keyboard Shortcuts
- bind your favorite shortcut
How to hand back to Tinker after running code
Enter in the Tinkerun result panel, and your missing Tinker back.
Ask for help
If the troubleshooting guides did not resolve the issue, please reach out to me by filing an issue, starting a GitHub discussion