Run Bash Task Master (BTM) tasks from the editor.
- Bash Task Master must be installed (e.g. via the install script). The extension discovers BTM using
TASK_MASTER_HOMEif set, otherwise~/.task-master. - Open a workspace that contains a BTM tasks file (
tasks.shor.tasks.sh). The extension activates when it finds either in the workspace.
- Listing tasks – The extension uses
task +s list -a --json(silent + JSON) to get task names, falling back to plaintask listoutput if JSON is not available. Tasks are discovered by invokingbashand sourcing$TASK_MASTER_HOME/task-runner.sh. If no workspace folder contains a tasks file, or BTM is not installed, no tasks are shown. - Task metadata – The extension uses
task +s help <name> --jsonfor machine-readable task metadata (description, required/optional arguments, subcommands). When you run a task, you can choose a subcommand (if any) and be prompted for required and optional arguments. - Running tasks – By default, the extension runs BTM tasks in a dedicated terminal named BTM. The same terminal is reused so that environment variables set by tasks (e.g.
venv activate,gonv activate) persist. You are encouraged to work inside this terminal when you need a shell, so you have access to those state variables. The working directory is set to the folder that contains the tasks file (or the workspace folder root when the task is outside the current project).
- Bash Task Master view – In the Explorer sidebar, open the Bash Task Master view to see workspace folders and their BTM tasks. Expand a task to see its description, required/optional arguments, and subcommands. Right‑click a task and choose Run Task to run it; you can then pick a subcommand (if any) and enter required/optional arguments.
- BTM: Run Task – Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P), run BTM: Run Task, pick a task, then optionally a subcommand and any required or optional arguments. - Terminal → Run Task – BTM tasks also appear in the generic Run Task list; select one to run it.
btm.useDedicatedTerminal(default:true) – When enabled, all BTM task runs use a single dedicated terminal (BTM) so that environment variables (e.g. fromvenv activateorgonv activate) are preserved between runs. If you disable this setting, tasks run via the editor’s task runner instead; environment variables will not be shared between individual task calls (e.g. venv/gonv activate will not persist in the terminal).
- Run Task lists all BTM tasks for every workspace folder (
task list -aper folder) and lets you run any of them. Multi-root workspaces are supported; each folder's tasks are scoped to that folder and run with the correct working directory.
npm install
npm run compileThen open this folder in VSCode/Cursor and press F5 to launch an Extension Development Host. Open another folder that has a tasks.sh or .tasks.sh and use the Bash Task Master view or BTM: Run Task to try the extension.
When cloning the main bash-task-master repo, use:
git clone --recurse-submodules https://github.com/hppr-dev/bash-task-master.gitor after a plain clone:
git submodule update --init --recursiveto include this extension.