Use your cursor/vscode tasks.json
25 May 2025
Tasks.json is a great bit of functionality I only just found out about, and it's in both vscode and cursor.
Cyberpunk geek with his minions

The Tasks.json file is a configuration file that VSCode/Cursor can run automatically (or manually, but I'm not using it for that). You can see in the sample below that there are a number of scripts I run in this folder (runOn: folderOpen) as soon as I open it in the IDE.

In this case it is:

  1. Starting the browser-tools MCP for my AI work

  2. Running laravel's server

  3. Running a simple webserver on a particular folder, alongside the laravel one but on a different port

  4. Running npm run dev

  5. And opening my local screenshots folder to make it easier to drag screenshots into Claude Code

What could you automate for yourself?

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "mcp-browser-tools-server",
            "type": "shell",
            "command": "npx -y @agentdeskai/browser-tools-server@latest",
            "runOptions": {
                "runOn": "folderOpen",
            }
        },
        {
            "label": "latest-export",
            "type": "shell",
            "command": "cd storage/app/exports/latest && ws --port 3000",
            "runOptions": {
                "runOn": "folderOpen",
            }
        },
        {
            "label": "artisan-serve",
            "type": "shell",
            "command": "php artisan serve",
            "runOptions": {
                "runOn": "folderOpen",
            }
        },
        {
            "label": "artisan-queue-listen",
            "type": "shell",
            "command": "php artisan queue:listen",
            "runOptions": {
                "runOn": "folderOpen",
            }
        },
        {
            "label": "npm-run-dev",
            "type": "shell",
            "command": "npm run dev",
            "runOptions": {
                "runOn": "folderOpen",
            }
        },
        {
            "label": "explorer-screenshots",
            "type": "shell",
           "command": "powershell.exe",
            "args": ["-Command", "Invoke-Item", "'C:\\Users\\blake\\Pictures\\Screenshots'"],
            "runOptions": {
                "runOn": "folderOpen",
            },
            "group": "build",
            "presentation": {
                "echo": false,
                "reveal": "never",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": false,
                "clear": false
            },
            "problemMatcher": []
        }
    ]
}

Get Updates

I don't post here frequently. So if you'd like me to let you know when I post something, subscribe below.

    I won't send you spam. You can unsubscribe at any time.

    RECENT POSTS

    Cursor running and fixing code

    I've recently started expanding my usage of Cursor to let it run commands, tests, etc and fix it's own issues. Here's my experience.