Autoprompt Commands
A NETLAB Extension for Visual Studio Code
Autoprompt Commands is a powerful extension for Visual Studio Code developed by NETLAB. It revolutionizes developer workflows by automating repetitive tasks, thereby saving valuable time and effort. Get it on the Visual Studio Code Marketplace.
Features
- Task Automation: Simplify your workflow by defining custom tasks and executing them with a single command.
- Multiple Terminal Support: Enhance productivity by managing multiple terminal tabs and executing commands concurrently.
- Dynamic Configuration: Tailor tasks with ease using a JSON file (
automate.json
) for ultimate flexibility and customization.
- Tool Integration: Enjoy seamless integration with various tools and shells including PowerShell, Bash, and more.
- Error Handling: Ensure smooth execution with robust error handling, providing clear feedback in case of failures.
- Cross-Platform Compatibility: Experience consistent performance across different operating systems, ensuring a seamless workflow for all users.
Getting Started
Installation: Unlock the power of NETLAB Autoprompt by installing the extension from the Visual Studio Code Marketplace.
Configuration: Take control of your development environment by creating an automate.json
file in the root folder of your project and defining tasks according to the provided schema.
Key Bindings:
Create automate.json
: Press Ctrl+Alt+/
to automatically generate an automate.json
file in your active project, eliminating manual setup and saving you time.
Run Autoprompt Commands: Execute tasks defined in your automate.json
file using Ctrl+Shift+/
. This activates the extension, running the commands associated with the selected task and streamlining your development workflow.
Generated automate.json
{
"automate": true,
"clear": false,
"tasks": [
{
"task": "Setup Virtual Environment",
"tool": "powershell",
"markAsDone": false,
"done": false,
"exit": false,
"commands": [
{ "command": "python -m venv venv" },
{ "command": ".\\venv\\Scripts\\activate" },
{ "command": "pip install -r requirements.txt" }
]
},
{
"task": "Run Flask Server",
"tool": "powershell",
"markAsDone": false,
"done": false,
"exit": false,
"commands": [
{ "command": ".\\venv\\Scripts\\activate" },
{ "command": "flask run" }
]
},
{
"task": "Build Frontend",
"tool": "cmd",
"markAsDone": false,
"done": false,
"exit": false,
"commands": [
{ "command": "cd frontend" },
{ "command": "npm install" },
{ "command": "npm run build" }
]
},
{
"task": "Start Development Server",
"tool": "cmd",
"markAsDone": false,
"done": false,
"exit": false,
"commands": [
{ "command": "cd backend" },
{ "command": "npm install" },
{ "command": "npm run dev" }
]
}
]
}
Automate Project Creation automate.json
{
"automate": true,
"clear": false,
"tasks": [
{
"task": "Create Python Project",
"tool": "powershell",
"markAsDone": true,
"done": false,
"exit": false,
"commands": [
{ "command": "mkdir App, Config, UX" },
{ "command": "cd ./app/" },
{ "command": "mkdir Server, Source, UI" },
{ "command": "python -m venv venv" },
{ "command": "./venv/scripts/activate" }
]
},
{
"task": "Install Packages",
"tool": "powershell",
"markAsDone": true,
"exit": true,
"commands": [
{ "command": "./app/venv/scripts/activate" },
{ "command": "pip install django" }
]
},
{
"task": "Create App",
"tool": "powershell",
"markAsDone": true,
"exit": true,
"commands": [
{ "command": "./app/venv/scripts/activate" },
{ "command": "cd ./app/source/" },
{ "command": "django-admin startproject Test ." }
]
},
{
"task": "Activate Virtual Env",
"tool": "powershell",
"exit": false,
"commands": [
{ "command": "./venv/scripts/activate" }
]
},
{
"task": "Run Django Server",
"tool": "powershell",
"exit": false,
"commands": [
{ "command": "./app/venv/scripts/activate" },
{ "command": "cd ./app/source/" },
{ "command": "python manage.py runserver" }
]
}
]
}
Using Autoprompt Commands
Ensure that you have created an automate.json
file in the root directory of your project, where you define your desired tasks. or you can generate a automate.json file for your project by clicking the +
icon located to the right of your listed project in automate workspace.
Open the integrated terminal in Visual Studio Code.
Use Ctrl+Shift+/
to activate Autoprompt.
Select the task you want to run from the list presented by the extension.
Autoprompt will execute the commands associated with the chosen task sequentially in the terminal.
Change Log
For a detailed list of changes, see the Change Log.
Note: Refer to the official Autoprompt documentation for a comprehensive guide on advanced features and functionalities.