Command Manager Extension
A powerful VS Code extension for managing, organizing, and executing commands with advanced features like variable substitution, command chaining, and flexible terminal options.
🚀 Features
Command Management
- Organized Folders: Group related commands into folders and subfolders
- Rich Command Editor: Create commands with descriptions, icons, and custom terminal settings
- Variable Support: Use global, shared, and command-specific variables
- Command Chaining: Execute multiple commands in sequence
- Quick Run: Fast command execution via
Ctrl+Shift+C
Documentation Hub
- Markdown Integration: Browse and search through project documentation
- Smart Navigation: Jump to specific sections in README files
- Command Extraction: Extract commands from README code blocks
- Hide/Unhide: Organize documentation by hiding unnecessary items
- Dual View Modes: Tree view or flat list for better organization
Advanced Terminal Options
- Multiple Terminal Types: VSCode integrated, external CMD, PowerShell
- Custom Working Directories: Set specific paths for command execution
- Terminal Management: Keep terminals open, clear before execution
- Progress Tracking: Visual feedback during command execution
📦 Installation
From Marketplace (when published)
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search for "Command Manager"
- Click Install
From Source
- Clone this repository
- Run
npm install
- Run
npm run compile
- Press
F5
to open a new Extension Development Host window
🎯 Quick Start
1. Create Your First Command
- Open the Command Manager view (Activity Bar icon)
- Click the "+" button in the view title
- Fill in command details:
- Label: Display name
- Command: The actual command to execute
- Description: Optional description
- Terminal: Choose terminal type and settings
2. Organize with Folders
- Right-click in the Command Manager view
- Select "New Folder"
- Add commands to your folder
- Create subfolders for better organization
3. Use Variables
# Global variables (set in Configuration)
${PROJECT_ROOT} - Current workspace root
${CURRENT_FILE} - Currently open file path
# Command-specific variables
${input:variableName} - Prompt user for input
${select:option1|option2} - Let user choose from options
4. Browse Documentation
- Switch to the Documentation Hub tab
- Browse markdown files in tree or flat view
- Click on files to open them
- Click on section links to jump to specific parts
🔧 Configuration
Global Variables
Access via Command Palette → "Command Manager: Open Configuration"
{
"globalVariables": [
{
"key": "PROJECT_ROOT",
"value": "/path/to/your/project"
}
]
}
Extension Settings
- Documentation Hub View Mode: Tree or flat list
- Documentation Hub Position: Above or below command list
📋 Usage Examples
Basic Commands
# Simple command
npm install
# With working directory
cd ${PROJECT_ROOT} && npm run build
# With variables
git commit -m "${input:commitMessage}"
Advanced Workflows
# Multi-step workflow
npm run clean && npm install && npm run build && npm test
# Conditional execution
if exist package.json (npm install) else (echo "No package.json found")
# Cross-platform commands
# Windows
dir /b *.js
# Unix/Mac
ls *.js
Documentation Integration
Extract Commands from README:
- Right-click on README.md in Documentation Hub
- Select "Extract Commands"
- Commands from code blocks will be imported
Navigate Documentation:
- Click on section links in tooltips
- Use search to find specific content
- Hide/unhide folders to reduce clutter
🎨 Customization
Command Icons
Use VS Code's built-in icons:
$(rocket)
- Rocket
$(gear)
- Settings
$(terminal)
- Terminal
$(file)
- File
$(folder)
- Folder
Terminal Types
- VSCode Current: Use current integrated terminal
- VSCode New: Create new integrated terminal
- External CMD: Open external Command Prompt
- External PowerShell: Open external PowerShell
🔍 Advanced Features
Command Chaining
Execute multiple commands in sequence:
npm run clean && npm install && npm run build
Variable Types
- Fixed: Static values
- Options: User selects from predefined list
- Input: User enters custom value
Shared Variables
Create reusable variables across commands:
{
"sharedVariables": [
{
"key": "ENVIRONMENT",
"label": "Environment",
"value": "development",
"description": "Target environment"
}
]
}
📁 File Structure
Command Manager/
├── Commands/ # Your saved commands
├── Folders/ # Organized command groups
└── Documentation Hub/ # Project documentation
├── README files
├── Markdown docs
└── Section navigation
📝 Changelog
[1.0.0] - 2024-01-XX
Added
Technical
- TypeScript-based architecture
- Comprehensive error handling
- Performance optimizations for large command sets
- Extensible plugin system
For detailed version history, see CHANGELOG.md
🐛 Troubleshooting
Common Issues
Commands not executing:
- Check terminal type settings
- Verify command syntax
- Ensure working directory exists
Variables not resolving:
- Check variable names (case-sensitive)
- Verify global variables are set
- Use correct syntax:
${VARIABLE_NAME}
Documentation not loading:
- Ensure markdown files are in workspace
- Check file permissions
- Try refreshing the Documentation Hub
Debug Mode
- Open Command Palette (
Ctrl+Shift+P
)
- Run "Developer: Toggle Developer Tools"
- Check Console for error messages
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm run test:all
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- VS Code Extension API
- TypeScript
- Node.js
- Community contributors
Happy Commanding! 🚀
For more help, check the VS Code Extension Documentation or open an issue on GitHub.