22
33> ** Switch Pantheon Terminus versions in a snap**
44
5- Never get locked into a specific Terminus version again. Switch between Terminus 2.x, 3.x, and 4.x without breaking your workflows or dealing with Homebrew conflicts.
5+ Switch between Terminus 2.x, 3.x, and 4.x without breaking your workflows or dealing with Homebrew conflicts.
66
77[ ![ Tests] ( https://github.com/lcatlett/tvm/actions/workflows/test.yml/badge.svg )] ( https://github.com/lcatlett/tvm/actions/workflows/test.yml )
8- [ ![ License: MIT ] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
8+
99
1010## ✨ Why Choose TVM
11- - ** 📋 Reproduce exact Terminus context alongside application conxtext. ** for scripts, CI/CD pipelines, or local testing
12- - ** 🎯 Crutial for mixed and many-site portfolios** managing multiple Pantheon projects with different Terminus requirements
11+ - ** 📋 Reproduce exact Terminus context alongside application context ** for scripts, CI/CD pipelines, or local testing
12+ - ** 🎯 Crucial for mixed and many-site portfolios** managing multiple Pantheon projects with different Terminus requirements
1313- ** ⚡ Zero downtime** switching between versions - no reinstalls, no conflicts
1414- ** 🔒 CI/CD ready** - pin exact versions for consistent deployments
1515- ** 🛡️ Risk-free testing** - try new Terminus features without breaking production workflows
16+ - ** 🔌 Version-specific plugin management** - plugins automatically switch with Terminus versions
1617- Also streamlines terminus plugin and terminus core development and testing
1718
1819## 📋 Table of Contents
@@ -28,6 +29,7 @@ Never get locked into a specific Terminus version again. Switch between Terminus
2829 - [ 💡 Usage Examples] ( #-usage-examples )
2930 - [ Basic Version Management] ( #basic-version-management )
3031 - [ Advanced Usage] ( #advanced-usage )
32+ - [ Plugin Management] ( #plugin-management )
3133 - [ Team Workflows] ( #team-workflows )
3234 - [ 🎯 Why Use TVM?] ( #-why-use-tvm )
3335 - [ ** Version Lock-in Issues** ] ( #version-lock-in-issues )
@@ -50,6 +52,7 @@ Never get locked into a specific Terminus version again. Switch between Terminus
5052 - [ Test Coverage] ( #test-coverage )
5153 - [ CI/CD Pipeline] ( #cicd-pipeline )
5254 - [ Contributing] ( #contributing )
55+ - [ 📝 Changelog] ( #-changelog )
5356 - [ ⚠️ Disclaimer] ( #️-disclaimer )
5457
5558## 🚀 Quick Start
@@ -68,9 +71,12 @@ tvm use latest # Use newest available
6871
6972# 4. List installed versions
7073tvm list
74+
75+ # 5. Check plugin environment (optional)
76+ tvm plugins:status
7177```
7278
73- TVM handles the rest automatically.
79+ TVM handles version switching and plugin management automatically.
7480
7581## 📦 Installation
7682
@@ -162,6 +168,36 @@ export TERMINUS_VM_DIR="$HOME/my-terminus-versions"
162168tvm install latest
163169```
164170
171+ ### Plugin Management
172+
173+ TVM automatically manages version-specific plugin directories to prevent compatibility issues:
174+
175+ ``` bash
176+ # Check current plugin environment
177+ tvm plugins:status
178+
179+ # View plugin directories for current version
180+ tvm plugins:status
181+ # Output:
182+ # Current Terminus version: 3.6.2
183+ # Major version: 3.x
184+ # Plugin directory: ~/.terminus/plugins-3.x
185+ # Dependencies directory: ~/.terminus/dependencies-3.x
186+
187+ # Switch versions - plugins automatically switch too
188+ tvm use 4.0.3 # Now uses plugins-4.x directory
189+ tvm use 3.6.2 # Now uses plugins-3.x directory
190+
191+ # Manually trigger plugin migration (runs automatically on first use)
192+ tvm plugins:migrate
193+ ```
194+
195+ ** How Plugin Management Works:**
196+ - ** Version-specific directories** : ` ~/.terminus/plugins-3.x ` , ` ~/.terminus/plugins-4.x ` , etc.
197+ - ** Automatic switching** : Plugin environment changes when you switch Terminus versions
198+ - ** Symlink management** : ` ~/.terminus/plugins ` points to the correct version-specific directory
199+ - ** Seamless migration** : Existing plugins are automatically moved to version-specific directories
200+
165201### Team Workflows
166202
167203``` bash
@@ -207,6 +243,11 @@ terminus auth:login --machine-token=$PANTHEON_TOKEN
207243- ** TVM Solution** : Standardize on specific versions per project with easy switching
208244- ** Use Case** : Ensure all developers use the same Terminus version for a given project
209245
246+ ### ** Plugin Compatibility Issues**
247+ - ** Problem** : Terminus plugins may not be compatible across major versions, causing conflicts or failures
248+ - ** TVM Solution** : Automatic version-specific plugin management prevents cross-version conflicts
249+ - ** Use Case** : Use different plugin versions for Terminus 3.x vs 4.x without manual directory management
250+
210251## 🔧 How It Works
211252
212253** Simple and Transparent:**
@@ -215,10 +256,18 @@ terminus auth:login --machine-token=$PANTHEON_TOKEN
215256- Smart command routing: TVM commands vs. Terminus passthrough
216257- Zero-overhead execution via your system PHP binary
217258
259+ ** Plugin Management:**
260+ - Version-specific plugin directories: ` ~/.terminus/plugins-3.x ` , ` ~/.terminus/plugins-4.x `
261+ - Automatic symlink management: ` ~/.terminus/plugins ` → version-specific directory
262+ - Environment variables set for Terminus plugin discovery
263+ - One-time migration of existing plugins to version-specific structure
264+
218265** Environment Variables:**
219266- ` TERMINUS_VM_DIR ` — Custom storage location (default: ` ~/.terminus/phars ` )
220267- ` TERMINUS_PHP ` — PHP binary to use (default: ` php ` )
221268- ` GITHUB_TOKEN ` — Avoid API rate limits (optional)
269+ - ` TERMINUS_PLUGINS_DIR ` — Set automatically to version-specific plugin directory
270+ - ` TERMINUS_DEPENDENCIES_DIR ` — Set automatically to version-specific dependencies directory
222271
223272## 🔗 Command Aliases
224273
@@ -237,6 +286,10 @@ terminus-vm list # Direct access
237286# All show installed versions:
238287* 3.6.2 (current)
239288 4.0.3
289+
290+ # Plugin management commands (TVM-specific):
291+ tvm plugins:status # Show current plugin environment
292+ tvm plugins:migrate # Migrate existing plugins (runs automatically)
240293```
241294
242295## ⚠️ Important Limitations
@@ -296,10 +349,11 @@ make clean
296349
297350### Test Coverage
298351
299- The test suite includes ** 14 test cases** with ** 24+ assertions** covering:
352+ The test suite includes ** 14+ test cases** with ** 24+ assertions** covering:
300353
301354- ** Core Functionality** : Script existence, permissions, help commands
302355- ** Version Management** : Install, switch, list, path operations
356+ - ** Plugin Management** : Version-specific plugin directories, symlink management
303357- ** Command Aliases** : ` terminus ` , ` terminus-vm ` , and ` tvm ` command functionality
304358- ** Environment Handling** : Custom directories, PHP binaries
305359- ** Error Scenarios** : Invalid commands, missing versions
@@ -324,6 +378,9 @@ The test suite includes **14 test cases** with **24+ assertions** covering:
3243786 . ** Push** to the branch: ` git push origin feature/amazing-feature `
3253797 . ** Open** a Pull Request
326380
381+ ## 📝 Changelog
382+
383+ See [ CHANGELOG.md] ( CHANGELOG.md ) for a detailed history of changes, including the major plugin management enhancement.
327384
328385## ⚠️ Disclaimer
329386
0 commit comments