
smux
用于高效管理多个项目工作区的命令行工具,支持自动化配置开发环境。
Repository Info
About This Server
用于高效管理多个项目工作区的命令行工具,支持自动化配置开发环境。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
SMUX: Smart Multiplexer for Developer Workspaces
SMUX is a command-line tool that helps developers efficiently manage multiple project workspaces by automating the setup of development environments, including applications, browser tabs, terminal directories, VSCode workspaces, and MCP server configurations.
Features
- Workspace Management: Create, switch between, and configure workspaces for different projects
- Application Launching: Automatically open project-specific applications
- Browser URL Management: Open relevant websites and web applications
- Terminal Directory Setup: Open terminal windows in project-specific directories
- VSCode Workspace Integration: Open the appropriate VSCode workspace
- MCP Server Configuration: Configure Model Context Protocol servers for AI tools like Claude and Windsurf
- Template-based Workspace Creation: Create new workspaces based on existing templates
Installation
Prerequisites
- macOS (currently only supports macOS)
- Swift 5.7 or later
- Xcode 14.0 or later (for development)
Building from Source
-
Clone the repository:
git clone https://github.com/saadatqadri/smux.git cd smux -
Build the project:
swift build -c release -
Install the binary (optional):
cp .build/release/smux /usr/local/bin/smux
Usage
Basic Commands
# Create a new workspace
smux create <workspace-name> [options]
# Switch to an existing workspace
smux switch <workspace-name> [options]
# List all workspaces
smux list
# Configure an existing workspace
smux config <workspace-name> [options]
# Delete a workspace
smux delete <workspace-name>
Creating a Workspace
# Create a basic workspace
smux create my-project
# Create a workspace with specific applications
smux create my-project --applications "Safari,VSCode,Terminal"
# Create a workspace with browser URLs
smux create my-project --browser-urls "https://github.com/myorg/myrepo,https://jira.myorg.com"
# Create a workspace with terminal directories
smux create my-project --terminal-dirs "~/projects/my-project,~/projects/my-project/api"
# Create a workspace with a VSCode workspace
smux create my-project --vscode-workspace "~/projects/my-project"
# Create a workspace with MCP server configurations
smux create my-project --mcp-config path/to/mcp-config.json
# Create a workspace interactively
smux create my-project --interactive
# Create a workspace based on a template
smux create my-project --template existing-project
Switching Workspaces
# Switch to a workspace
smux switch my-project
# Switch to a workspace with verbose output
smux switch my-project --verbose
# Force switch to a workspace (skip confirmation prompts)
smux switch my-project --force
MCP Server Configuration
SMUX supports configuring Model Context Protocol (MCP) servers for AI tools like Claude and Windsurf. MCP servers are defined in the workspace configuration and are automatically configured when switching workspaces.
Example MCP configuration JSON:
{
"karbon": {
"command": "node",
"args": ["/path/to/karbon-mcp-server/dist/index.js"],
"env": {
"KARBON_BEARER_TOKEN": "your-token",
"KARBON_ACCESS_KEY": "your-access-key"
}
},
"linear-mcp": {
"command": "node",
"args": ["/path/to/linear-mcp/build/index.js"],
"env": {
"LINEAR_API_KEY": "your-linear-api-key"
},
"disabled": false,
"alwaysAllow": ["list_teams", "list_issues"]
}
}
Project Structure
Sources/
└── smux/
├── main.swift # Entry point and CLI implementation
├── Models/
│ ├── Workspace.swift # Workspace data model
│ └── WorkspaceManager.swift # Workspace operations
└── Utils/
└── Process.swift # Process execution utilities
Development
Architecture
SMUX follows a simple architecture:
- Models: Data structures representing workspaces and configurations
- WorkspaceManager: Core business logic for managing workspaces
- CLI: Command-line interface implemented in main.swift
Adding New Features
To add new features to SMUX:
- Extend the Workspace Model: If your feature requires new configuration data, extend the
Workspacestruct inWorkspace.swift. - Implement Business Logic: Add methods to
WorkspaceManager.swiftto handle the new functionality. - Update CLI: Modify
main.swiftto add new commands or options for your feature. - Add Tests: Write tests for your new functionality.
Workspace Configuration Format
Workspace configurations are stored as JSON files in ~/.smux/. Each workspace has its own file named <workspace-name>.json. The configuration format is:
{
"name": "workspace-name",
"applications": [
{
"name": "ApplicationName",
"bundleIdentifier": "com.example.app"
}
],
"browserUrls": [
"https://example.com"
],
"terminalDirectories": [
"~/path/to/directory"
],
"vscodeWorkspace": "~/path/to/workspace.code-workspace",
"mcpServers": {
"server-name": {
"command": "executable",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR": "value"
},
"disabled": false,
"alwaysAllow": ["function1", "function2"]
}
}
}
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 some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Roadmap
- Workspace Secrets Management: Securely store and manage sensitive information
- Cross-platform Support: Add support for Linux and Windows
- Workspace Sharing: Export and import workspaces for team collaboration
- Integration with More Tools: Support additional development tools and IDEs
- Workspace Snapshots: Save and restore workspace states
Quick Start
Clone the repository
git clone https://github.com/saadatqadri/smuxInstall dependencies
cd smux
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.