You can create a files called tasks.json to run commands when opening a project, in my case right now im using laravel so always a run some commands to start the dev environment, for example to start a project with a php artisan serve you can do:
The file must be on folder .vscode/tasks.json
Example Content:
{
"version": "2.0.0",
"tasks": [
{
"label": "launch server",
"type": "shell",
"command": "php artisan serve",
"group": "none",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
}