Comprehensive Salesforce development toolset with 17 specialized tools
Version 1.0.0 | Built with VS Code Extension API, React 18, Node.js, Express
🚀 Features
- JS Plugin Management - Edit CPQ JavaScript plugins with version control
- Query Records ⭐ - Advanced SOQL with 10K+ row support, virtual scrolling
- Metadata Query - Query Tooling API metadata
- Record Type Picklist Manager - Manage picklist values across record types
- Anonymous Apex ⭐ - Execute Apex with multi-run and variable injection
- API Tests - Postman-like REST API testing
- Platform Event Tests - Publish/subscribe to platform events
- Load Records ⭐ - Bulk insert/update/upsert/delete from CSV
- Search Records ⭐ - Universal search with ID auto-detection
- Create Record - Create or clone records
- Bulk File Management - Process multiple CSV files sequentially
- Metadata Extract ⭐ - Retrieve metadata packages
- Manage Permissions ⭐ - Edit profiles and permission sets
- Metadata Deployment - Deploy to multiple orgs serially
- Permission Comparison ⭐ - Compare permissions across orgs
- Data Comparison ⭐ - Compare data between orgs (with legacy Python engine)
- Metadata Comparison - Line-by-line metadata diff
📋 Prerequisites
- VS Code: Version 1.80.0 or higher
- Node.js: Version 18.0.0 or higher
- Salesforce CLI:
sf CLI v2 (or legacy sfdx)
- Python: 3.8+ (required for comparison tools only)
🛠️ Installation
1. Install Dependencies
# Root dependencies
npm install
# Runtime dependencies
cd runtime
npm install
cd ..
2. Build the Extension
# Build both extension and runtime
npm run build
3. Development Mode
# Run in development mode with hot reload
npm run dev
This starts:
- TypeScript compiler in watch mode for the extension
- Vite dev server for the React app (port 5173)
4. Package for Distribution
# Create .vsix file
npm run package
🎮 Usage
Method 1: Keyboard Shortcut
- Windows/Linux:
Ctrl+Shift+T
- macOS:
Cmd+Shift+T
Method 2: Command Palette
- Press
Ctrl+Shift+P (Cmd+Shift+P on Mac)
- Type "Salesforce: Launch Salesforce Toolstream"
- Press Enter
Method 3: Status Bar
- Click the "🚀 Toolstream" button in the bottom-right status bar
Stop Server
Command Palette:
- "Salesforce: Stop Toolstream Server"
View Logs
Command Palette:
- "Salesforce: Show Toolstream Output"
📁 Project Structure
salesforce-toolstream/
├── src/ # VS Code Extension
│ └── extension.ts # Extension entry point
├── runtime/ # React App + Backend
│ ├── src/
│ │ ├── main.jsx # React entry point
│ │ ├── App.jsx # Main app with routing
│ │ ├── server.js # Express backend
│ │ ├── services/ # Backend services
│ │ │ ├── Logger.js
│ │ │ ├── SessionManager.js
│ │ │ ├── OperationManager.js
│ │ │ └── CLIRunner.js
│ │ ├── contexts/ # React contexts
│ │ │ ├── SessionContext.jsx
│ │ │ └── OperationContext.jsx
│ │ ├── components/ # React components
│ │ │ ├── layout/ # Layout components
│ │ │ ├── operation/ # Operation panel
│ │ │ ├── common/ # Reusable components
│ │ │ └── Home.jsx # Home page
│ │ ├── tools/ # All 17 tools
│ │ │ ├── QueryRecords.jsx # ⭐ Full implementation
│ │ │ └── ... # Other tools (templates)
│ │ └── utils/ # Utilities
│ │ └── api.js # HTTP client
│ ├── index.html
│ ├── vite.config.js
│ └── package.json
├── Documentation/ # Complete specifications
├── package.json # Extension manifest
├── tsconfig.json
└── README.md
🔧 Architecture
Backend Services
Logger - File rotation, console colors, in-memory buffer
- Automatic log rotation (10MB, 5 files)
- Colored console output by level
- Recent logs API for UI
SessionManager - Session isolation and automatic cleanup
- Per-session file storage (
.toolstream/sessions/{id}/)
- 24-hour TTL with hourly cleanup
- Tool-specific directories
OperationManager - Long-running operation tracking
- States: pending, running, paused, completed, failed, canceled
- Pause/cancel/restart capabilities
- Real-time progress updates
CLIRunner - Salesforce CLI integration
- Auto-detects
sf (v2) or sfdx (legacy)
- Connection pooling (max 5 concurrent)
- 50MB buffer for large responses
- JSON output parsing
Frontend Architecture
Session Context - Manages workspace sessions
- Auto-initialization on load
- Persistent workspace ID in localStorage
- Session refresh capability
Operation Context - Manages operations
- Operation registration and tracking
- Status polling every 3 seconds
- Operation panel visibility control
React Router - Client-side routing
/ - Home page with tool grid
/tools/{tool-name} - Individual tool pages
- Layout with sidebar navigation
🎨 UI Components
Reusable Components
Button - Variants: primary, secondary, success, danger, ghost
- Sizes: small, medium, large
- Loading state with spinner
- Icon support
Card - Consistent content containers
- Header with title, subtitle, actions
- Bordered with shadow
- Responsive padding
OperationPanel - Floating panel (top-right)
- Real-time operation tracking
- Progress bars
- Elapsed time display
- Control buttons (pause, cancel, clear)
✅ Complete
- Project structure and configuration
- VS Code extension entry point
- Backend services (all 4 services)
- Frontend framework (React + contexts)
- Layout and navigation
- Reusable UI components
- Home page
- Query Records tool (full implementation)
🚧 Template Stubs Created
All remaining 16 tools have stub files with:
- Basic structure
- Error handling
- Session integration
- Ready for implementation
Refer to QueryRecords.jsx as a reference implementation.
📦 Build Commands
# Development
npm run dev # Run extension + runtime dev server
npm run dev:extension # Build extension in watch mode
npm run dev:runtime # Run Vite dev server only
# Production
npm run build # Build everything
npm run build:extension # Build extension TypeScript
npm run build:runtime # Build React app
# Package
npm run package # Create .vsix file
# Lint & Test
npm run lint # ESLint
npm run test # Run tests
🔐 Security
- No Credential Storage: Uses existing SF CLI authentication
- Session Isolation: Each workspace gets isolated file storage
- Automatic Cleanup: 24-hour TTL on sessions
- Path Traversal Prevention: All file operations validated
- Input Validation: CLI commands sanitized
🐛 Troubleshooting
Server Won't Start
Check SF CLI installation:
sf --version
# or
sfdx --version
Check port availability:
- Default port: 3040
- Change in settings:
salesforce-toolstream.serverPort
Orgs Not Showing
Verify authentication:
sf org list
Re-authenticate if needed:
sf org login web
Build Errors
Clean and rebuild:
rm -rf node_modules runtime/node_modules dist runtime/dist
npm install
cd runtime && npm install && cd ..
npm run build
📚 Documentation
See the Documentation/ folder for:
- Complete tool specifications
- API reference
- CLI integration guide
- Architecture diagrams
- User guides
🤝 Contributing
- Copy
runtime/src/tools/ToolTemplate.jsx
- Rename and customize for your tool
- Add backend routes in
runtime/src/server-routes-tools.js
- Test with development server
- Follow
QueryRecords.jsx as reference
Code Style
- Use ES6+ features
- Functional React components with hooks
- Error boundaries for robustness
- Proper loading and error states
- Accessibility best practices
📄 License
MIT License - See LICENSE file
👨💻 Author
Aviral Dhodi
🎯 Roadmap
v1.1.0 (Planned)
- Complete all 17 tool implementations
- Add virtual scrolling to Query Records
- Implement Monaco editor for code tools
- Add GraphQL support
v1.2.0 (Planned)
- Python script integration for comparison tools
- Bulk API 2.0 support
- Enhanced error reporting
- Tool templates and presets
v2.0.0 (Future)
- Real-time collaboration
- Cloud sync for configurations
- Plugin system for custom tools
- Advanced analytics dashboard
⭐ Star on GitHub
If you find this tool useful, please star the repository!
Happy Salesforce Development! 🚀