TaskPilot
Hierarchical task menu for VS Code - execute terminal commands, VS Code commands, and tasks from YAML configuration.
Features
- Hierarchical Menu: Organize commands in a tree structure with unlimited depth
- Quick Pick UI: Fast keyboard-driven interface
- Multiple Action Types:
- Terminal commands (with named terminals)
- VS Code commands (with arguments)
- tasks.json tasks
- Remote actions (Dev Container, SSH)
- YAML Configuration: Easy-to-edit configuration file
- Command Reuse: Define commands once, reference from multiple menus (
ref feature)
- Auto Reload: Configuration changes are automatically detected
Installation
From Visual Studio Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "TaskPilot"
- Click Install
Manual Installation
- Download the
.vsix file from Releases
- In VS Code, open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run "Extensions: Install from VSIX..."
- Select the downloaded
.vsix file
Quick Start
- Create
.vscode/task-menu.yaml in your workspace:
version: "1.0"
menu:
- label: Build
icon: "$(tools)"
type: terminal
command: npm run build
- label: Development
icon: "$(rocket)"
children:
- label: Start Server
icon: "$(play)"
type: terminal
terminal: dev
command: npm run dev
- label: Run Tests
icon: "$(beaker)"
type: terminal
command: npm test
- Press
Cmd+Shift+T (Mac) or Ctrl+Shift+T (Windows/Linux)
- Select a menu item to execute
Configuration
Settings
| Setting |
Description |
Default |
taskPilot.configPath |
Path to YAML config file |
.vscode/task-menu.yaml |
YAML Schema
version: "1.0"
# Reusable command definitions
commands:
command_id:
type: terminal | vscodeCommand | task
command: string # Command to execute
terminal: string # Terminal name (for type: terminal)
args: array # Command arguments
cwd: string # Working directory
description: string # Description
# Menu structure
menu:
- label: string # Display name (required)
icon: string # Icon (emoji or codicon)
description: string # Description text
children: [] # Sub-menu items (for categories)
# Action (one of the following)
ref: string # Reference to commands section
type: terminal | vscodeCommand | task
command: string
Example: Full Configuration
version: "1.0"
commands:
start_server:
type: terminal
terminal: Server
command: npm run dev
description: Start development server
rebuild_container:
type: vscodeCommand
command: remote-containers.rebuildContainer
description: Rebuild dev container
menu:
- label: Development
icon: "$(rocket)"
children:
- label: Start Server
icon: "$(play)"
ref: start_server
- label: Run Tests
icon: "$(beaker)"
type: terminal
command: npm test
- label: Container
icon: "$(package)"
children:
- label: Rebuild
icon: "$(refresh)"
ref: rebuild_container
- label: Troubleshooting
icon: "$(tools)"
children:
- label: Server Issues
children:
- label: Restart Server
ref: start_server # Same command, different context
Commands
| Command |
Description |
Shortcut |
TaskPilot: Show Menu |
Open the task menu |
Cmd+Shift+T / Ctrl+Shift+T |
TaskPilot: Reload Configuration |
Reload YAML config |
- |
Action Types
Terminal
Execute commands in VS Code's integrated terminal:
- label: Build Project
type: terminal
command: npm run build
terminal: Build # Optional: named terminal
cwd: ./packages/app # Optional: working directory
VS Code Command
Execute VS Code commands:
- label: Format Document
type: vscodeCommand
command: editor.action.formatDocument
- label: Open Folder
type: vscodeCommand
command: vscode.openFolder
args:
- /path/to/folder
Task
Execute tasks defined in tasks.json:
- label: Run Build Task
type: task
command: build # Task name from tasks.json
Dev Container
Open a folder in Dev Container (requires Remote - Containers extension):
- label: Open in Container
type: openInDevContainer
path: /home/user/project # フルパス推奨(~は非推奨)、.devcontainerを含むディレクトリを指定
Remote SSH
Open a folder via SSH (requires Remote - SSH extension):
- label: Open Remote Project
type: openRemoteSSH
path: /home/user/project
host: my-server # Host from ~/.ssh/config
Remote Tunnel
Open a folder via Remote Tunnel (requires Remote - Tunnels extension):
- label: Connect to Win11
type: openRemoteTunnel
path: /home/user/project # フルパス推奨(~は非推奨)
tunnelName: my-tunnel # GitHub認証済みのトンネル名
Requirements
- VS Code 1.85.0 or higher
- Node.js 18.x or higher (for development)
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
Support