Skip to content

Add VIP Local Development Environment support#2535

Draft
Crixu wants to merge 3 commits intotrunkfrom
vip-local-dev-env-support
Draft

Add VIP Local Development Environment support#2535
Crixu wants to merge 3 commits intotrunkfrom
vip-local-dev-env-support

Conversation

@Crixu
Copy link

@Crixu Crixu commented Feb 5, 2026

This PR explores support for detecting and managing VIP Local Development Environments within Studio, allowing developers to have a unified view of all their local WordPress environments.

Key features:

  • Detection: Automatically detects existing VIP environments by reading from ~/.local/share/vip/dev-environment/
  • Display: Shows VIP sites in the sidebar alongside Studio sites with clear visual differentiation
  • Lifecycle management: Start/stop VIP environments via the VIP CLI
  • Environment creation: Create new VIP environments through the "Add Site" flow
  • Auto-login: Quick access to wp-admin using VIP's autologin feature

Technical approach (Hybrid):
Studio acts as a UI layer on top of VIP CLI rather than reimplementing the stack:

  • Reads environment data directly from filesystem (instance_data.json)
  • Queries Docker for running status
  • Spawns vip dev-env start/stop commands for lifecycle management
  • Keeps VIP's supported stack intact

Screenshot

Annotation on 2026-02-05 at 10-34-14 image image image

Testing

  1. Install VIP CLI: npm install -g @automattic/vip-cli
  2. Create a VIP environment: vip dev-env create --slug=test-site
  3. Run Studio with npm run dev
  4. Verify VIP environment appears in sidebar
  5. Test start/stop functionality

Checklist

  • Linting passes (npm run lint)
  • Tests pass (npm test)
  • Manual testing completed
  • Screenshots added

Crixu and others added 3 commits January 28, 2026 08:46
Introduces backend support for managing VIP Local Dev-Envs through Studio:

- Add VIP module with TypeScript types for environments
- Implement environment detection by reading instance_data.json
- Add Docker-based running status detection
- Expose IPC handlers for list, start, stop, and open operations
- Add preload API methods for renderer access
- Include unit tests with 10 passing tests

This enables Studio to detect and manage existing VIP environments
created via the VIP CLI, laying the groundwork for UI integration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The pm2-axon module is imported directly in cli/commands/_events.ts but was
not in the Rollup externals list, causing the build to fail with:

  Rollup failed to resolve import "pm2-axon" from "cli/commands/_events.ts"

Adding pm2-axon to the externals list alongside pm2 fixes the build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add VIP site display in sidebar with running status indicators
- Add VIP content tabs (Overview, Settings, Import/Export, Sync)
- Add VIP environment start/stop/create functionality
- Add VIP context provider for state management
- Add "Add VIP Site" option in site creation stepper
- Integrate VIP IPC handlers with main process
- Extract main content to separate component for cleaner routing
@wojtekn
Copy link
Contributor

wojtekn commented Feb 11, 2026

Thanks for exploration @Crixu . Since it's a proof of concept, I'm adding the "do not merge" label to help us navigate the PR list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants