< All Posts

Automate with ScriptKit

As a developer we’re always looking for how to automate everything from our workflow to products. If you’re a JavaScript developer then you may be happy to hear that there’s currently on OSS project created by John Lindquist called ScriptKit where you can now write simple (or complex) JavaScript snippets to automate any repetitive tasks. The nice part is that this OSS project seems to have already gained a nice following amongst developers. I was able to also immediately contribute to this great community and am listed on the website: https://www.scriptkit.com/JGoodenough so cool!!!

Automation script with ScriptKit

I created a script that allows you to input the port that will kill the process that it is listening on. As a developer I’m sure you probably ran into this issue multiple times. You may have accidentally closed a tab in your terminal that was running a local webserver stepped away from your machine and attempted to start up the server in a new tab with the same port. Oh no!!! Process is already running on port 3000 but I already have 4 other tabs open in the same terminal window with some running other processes. Now if you are a unix user you typically would run something like lsof -i :3000 followed by kill -9 PROCESS_ID . That works all good and you avoided having to close and reopen your entire terminal window.

ScriptKit to the rescue!

Just write JavaScript as you normally would as a NodeJS application you can even leverage any node package on npm you desire. Open ScriptKit with Command+; type port-fkill (the script I wrote) input the desired port and it will now kill it for you. Scriptkit also alows you to schedule automated scripts. I’m looking foward to using this more and optimize my day to day productivity.

Jesse Goodenough Wed Jan 25 2023