workon 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -6
- package/dist/cli.js +1408 -94
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +24 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,12 +6,13 @@ A productivity CLI tool that helps developers quickly switch between projects wi
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
✨ **Smart Project Switching** - Switch between projects in your current shell (no nested processes!)
|
|
10
|
-
🔧 **IDE Integration** - Automatically open projects in VS Code, IntelliJ IDEA, or Atom
|
|
11
|
-
🌐 **Web Integration** - Launch project websites and documentation
|
|
12
|
-
🌳 **Git Branch Support** - Different configurations for different branches
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
✨ **Smart Project Switching** - Switch between projects in your current shell (no nested processes!)
|
|
10
|
+
🔧 **IDE Integration** - Automatically open projects in VS Code, IntelliJ IDEA, or Atom
|
|
11
|
+
🌐 **Web Integration** - Launch project websites and documentation
|
|
12
|
+
🌳 **Git Branch Support** - Different configurations for different branches
|
|
13
|
+
🌲 **Git Worktrees** - Create, open, and manage git worktrees with tmux integration
|
|
14
|
+
📁 **Auto Directory Change** - Seamlessly `cd` into project directories
|
|
15
|
+
⚡ **Interactive Setup** - Guided project configuration
|
|
15
16
|
🔄 **Backward Compatible** - Legacy nested shell mode still available
|
|
16
17
|
|
|
17
18
|
## Requirements
|
|
@@ -132,6 +133,49 @@ workon myproject --shell
|
|
|
132
133
|
workon myproject#feature-branch
|
|
133
134
|
```
|
|
134
135
|
|
|
136
|
+
### Git Worktrees
|
|
137
|
+
|
|
138
|
+
Manage git worktrees with full tmux integration:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# List worktrees for a project
|
|
142
|
+
workon worktrees myproject
|
|
143
|
+
|
|
144
|
+
# Create a new worktree
|
|
145
|
+
workon worktrees add myproject feature-branch
|
|
146
|
+
|
|
147
|
+
# Open workon session in a worktree (creates tmux session)
|
|
148
|
+
workon worktrees open myproject feature-branch
|
|
149
|
+
|
|
150
|
+
# Remove a worktree
|
|
151
|
+
workon worktrees remove myproject feature-branch
|
|
152
|
+
|
|
153
|
+
# Merge worktree branch and remove
|
|
154
|
+
workon worktrees merge myproject feature-branch
|
|
155
|
+
|
|
156
|
+
# Create branch from detached HEAD (for PR workflow)
|
|
157
|
+
workon worktrees branch myproject my-worktree new-branch-name --push
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Worktrees created by workon are stored in `.worktrees/` inside the project. You can also use existing worktrees created elsewhere - they'll show as "(external)" in the list.
|
|
161
|
+
|
|
162
|
+
#### Post-Setup Hook
|
|
163
|
+
|
|
164
|
+
Create `.workon/worktree-setup.sh` in your project to run commands after creating a worktree:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
#!/bin/bash
|
|
168
|
+
# Install dependencies
|
|
169
|
+
[ -f "package.json" ] && npm install
|
|
170
|
+
|
|
171
|
+
# Copy environment file
|
|
172
|
+
[ -f "$PROJECT_PATH/.env" ] && cp "$PROJECT_PATH/.env" .env
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Environment variables available:
|
|
176
|
+
- `WORKTREE_PATH` - Absolute path to the new worktree
|
|
177
|
+
- `PROJECT_PATH` - Absolute path to the main project
|
|
178
|
+
|
|
135
179
|
### Legacy Mode (Nested Shells)
|
|
136
180
|
```bash
|
|
137
181
|
# Use the old behavior if needed (spawns new shell)
|