Motia Workbench for VS Code
A VS Code extension that integrates the Motia Workbench directly into your editor.
Features
- Open the Motia Workbench directly within VS Code
- Start and stop the Motia development server from VS Code
- Automatically detect Motia projects
- Configure server settings through VS Code preferences
Requirements
- VS Code 1.80.0 or higher
- A Motia project (with the
@motiadev packages installed)
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Motia Workbench"
- Click Install
Manual Installation
- Download the
.vsix file from the releases page
- In VS Code, go to Extensions (Ctrl+Shift+X)
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded file
Usage
Opening the Workbench
- Open a Motia project in VS Code
- Click the Motia icon in the status bar or run the "Motia: Open Workbench" command from the command palette (Ctrl+Shift+P)
Starting/Stopping the Server
- Use the "Motia: Start Development Server" command to start the Motia development server
- Use the "Motia: Stop Development Server" command to stop the server
Extension Settings
This extension contributes the following settings:
motia.serverPort : Port for the Motia development server (default: 3000)
motia.autoStartServer : Automatically start the server when a Motia project is detected (default: false)
motia.nodejsPath : Custom path to Node.js installation directory (leave empty to use system default)
Setting a Custom Node.js Path
If you need to use a specific Node.js installation or have multiple versions installed:
- Go to Settings (File > Preferences > Settings)
- Search for "Motia Node.js Path"
- Enter the full path to your Node.js installation directory:
- Windows:
C:\Program Files\nodejs or similar
- macOS:
/usr/local/bin or similar
- Linux:
/usr/bin or similar
- Use the "Motia: Validate Node.js Path" command to verify the path
- This checks that the required Node.js executables exist
- Confirms the Node.js version is compatible
- Tests that npx commands can be executed successfully
Known Issues
- The extension currently requires the Motia development server to be running to display the workbench
Release Notes
For a detailed list of changes, see the CHANGELOG.
Development
Building the Extension
- Clone the repository
- Run
npm install
- Run
npm run compile to build the extension
- Press F5 to launch the extension in a new VS Code window
Publishing the Extension
Manual Publishing
- Update the version in
package.json (follow semver)
- Run
npm run publish to package and publish the extension
- Alternatively, use convenience scripts:
npm run publish:patch - Bump patch version and publish
npm run publish:minor - Bump minor version and publish
Automated Publishing
The extension can be published automatically using GitHub Actions:
- Go to the GitHub repository Actions tab
- Select the "Publish Extension" workflow
- Click "Run workflow"
- Select the version bump type (patch, minor, or major)
- Click "Run workflow"
This will:
- Bump the version according to your selection
- Build and package the extension
- Publish to VS Code Marketplace
- Create a GitHub release with the new version
Note: This requires a VS Code Marketplace Personal Access Token (PAT) stored as a GitHub secret named VSCE_PAT .
License
This extension is licensed under the same terms as the Motia framework.
motia-vscode
| |