GithubHelp home page GithubHelp logo

tinkerun / tinkerun-vscode Goto Github PK

View Code? Open in Web Editor NEW
53.0 3.0 2.0 571 KB

The missing way of running tinker in Visual Studio Code

Home Page: https://tinke.run/vscode

License: MIT License

JavaScript 1.19% PHP 0.19% TypeScript 89.14% CSS 9.48%
vscode-extension tinker tinkerwell laravel psysh

tinkerun-vscode's Introduction

Tinkerun

Tinkerun

A new way of Running Tinker. Simplify the Web Artisan's workflow. inspired by Tinkerwell

screenshot

Snippet Form

Download links

Github Releases

๐Ÿ—’ If you are using Visual Studio Code, you may like Tinkerun for Visual Studio Code

Features

  • Connections: Quick connect to your app either locally, in production or in docker container etc;
  • Snippets: Manage the code snippets you have ran;
  • Editor: Run your terminal code via editor;
  • Output: Focus on the results you really care that terminal return;
  • Snippet Form: Switch the editor to the form, so that you can modify your variable value via form, like an admin panel;
  • Dark mode

Tech Stack

Renderer

Main

Contributing to Tinkerun

See CONTRIBUTING.md

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

License

MIT

tinkerun-vscode's People

Contributors

billyct avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jaberwiki eiromz

tinkerun-vscode's Issues

running twice in an ssh session

First of all, thank you so much for your work here - it's awesome and really super helpful! Practically, I use it all day long while programming.
I'm running vscodium on unix, trying to tinker on a windows server. With my local environment it works absolutely fine, but the code is executed twice during an ssh session on the win server.

I followed your settings:
"command": "ssh -i ~/.ssh/id_rsa [email protected] -t 'cd C:/path/to/project && php artisan tinker'"

If I call this line directly from a terminal, tinker is executed remotely and no duplicates are printed (everything normal).
The duplications are also shown already shifted during initialization with tinkerun, like:

Tinkerun is Initializing...
<13 -t 'cd C:/path/to/proj                                      ect/portal && php artisan tinker'ojec

Maybe there is a problem with the remote connection, like connecting twice, because the run-command works properly. IMHO. Maybe tinkerun need's the new bash '[...] php artisan tinker; bash --login'? I don't know.
I'm already looking in your code, but I guess you'll find it quicker than me.
hope it helps! Let me know if I can help you with further informations and thank you again for you great work.

Edit: another output with random strings - there are some duplicate lines everytime, but not always as clear to differ as here.

=> Illuminate\Support\Collection {#5088
     all: [
       "F01P6NGhc3paC7LT4BIDfyouh2BGnLQN",
       "0CTbTn79hNaBfcHcQlhoWPPw6bvMlrAi",
       "Z225MZO8qAQ1RAtlaiQAzeZlNxpFH8ku",
       "ei7GLlkoXSqpkzCTl3JG1hZW1XrCkNo1",
       "mH5sE39dLo6Pmk34X4vCpqVk7ItIPfKU",
     ],
   }
       "mH5sE39dLo6Pmk34X4vCpqVk7ItIPfKU", 
     ],
   }

Configure Artisan Tinker command in VS Code

Hi, thanks for your the great work with tinkerrun!

My project is running tinker on php artisan tenancy:tinker. Can you add a setting option to VS Code so this can be configured?

And/or Is there a workaround I can use to set the config.command_default setting?

Kind Regards,
Paul

Add /.tinkerun to .gitignore during install

Hello,

I believe the project as a VSCode extension would benefit from during installation adding automatically '/.tinkerun' to the .gitignore file.

The reason for this is that in team with multiple members sharing scripts via git is, in my opinion, not ideal since not everyone is working on the same thing and you wouldn't want to be sharing some of your "concepts" with everyone as they're only concepts and if they become the end development it will be integrated in the project.

Hope you feel the same way.

Thank you for your time.

Regards,
Rodrigo

"Cannot redeclare function"

Hi,

When I run a file twice or more, I have an error message saying that functions or classes "cannot be redeclared" / "already exists" : Cannot redeclare f() in Psy Shell, Class named C already exists. So I have to kill the shell manually every time.

I upgraded my system recently but I don't really know what triggered that change as I tested it with PHP 7 & 8.

Does it mean Tinkerun re-uses the same PsySH session ? Would it be feasible to kill it & start a new shell instead ?

Thank you

Versions :
MacOS : 11.5.2
VSCode : 1.73.1
Tinkerun 0.2.2
PHP : 7.4.32 & 8.0.26
Laravel : 8.83.23

Give hand back to Tinker after running code

When you run the code, Tinkerun displays the result, but does not give control back to Tinker. I understand the idea is you're supposed to modify the file, and re-run the code, but sometimes you want to write it directly in Tinker.

Use case 1 : running a long operation, you don't want to wait every time before you start writing after, using the Tinkerun results.

Use case 2 : I'd like to use Tinkerun files as init scripts for Tinker debugging sessions, e.g. the infamous use Carbon\Carbon, annoying to write every time.

Great work ; thank you !

No connection selected

First of all really cool idea for running tinker.

But when I click Run I get this message:

Screenshot_1

I have the default connection defined in .tinkerun/tinkerun.json. Also I'm on Windows 10.

Reset current connection at runtime

Great extension - thx! Just one request:

Would it be possible to reset the current connection at runtime?

My use case is to switch the connection for the same query without closing vscode.

I can think of two possible solutions:

  1. A keyboard shortcut which resets the current connection and triggers the "run on" menu
  2. Possibility to assign different .php files with a default connection (could be made confgurable in the tinkerun.json)

An option to change shortcut

I would like to make it possible to change the shortcut to run code.

Use case : incompatibility with VSCodeVim. Vim has Ctrl+R as "redo" action, and it's been a standard for decades.

Thank you.

Run code without creating file?

Apologies for my potential ignorance on this, but is there not simply a way to have a tab that opens to write in or copy paste multiline code to run in tinker? I don't want to have to create a file. I like the ease of running "php artisan tinker" and being able to quickly test out simple code, but obviously its a pain when you have to work with any multiline code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.