@proletariat/cli 0.1.3 → 0.2.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 CHANGED
@@ -1,26 +1,50 @@
1
1
  # ⚒️ PROLETARIAT CLI
2
2
 
3
- > **Multi-Agent Development Orchestrator**
4
- > *Orchestrate parallel coding agents through git worktrees - each agent works independently on features, bugs, or experiments*
3
+ > **Workspace Manager for Parallel AI Development**
4
+ > *Run multiple Cursor sessions, Claude Code instances, or CLI agents simultaneously on one machine - each working on different features without conflicts*
5
5
 
6
- 🚩 **Transform your development workflow with autonomous coding agents working in parallel!** 🚩
6
+ **Scale your solo development: Multiple AI sessions, parallel workspaces, all on your local machine!**
7
7
 
8
8
  ---
9
9
 
10
- ## 💰 What Is This?
10
+ ## What Is This?
11
11
 
12
- **PROLETARIAT CLI** orchestrates multiple coding agents working in parallel on your codebase. Each agent is an independent git worktree that can:
12
+ **PROLETARIAT CLI** implements the design pattern for running multiple AI coding sessions in parallel on a single machine. Each "agent" gets a persistent workspace (a git worktree - but I call them workspaces because it's clearer) where you or your AI tools can work continuously, switching between features as needed:
13
13
 
14
- - 🤖 **Work autonomously** on different features, bugs, or experiments simultaneously
15
- - 🔀 **Operate in isolation** without conflicts between agents
16
- - 🎯 **Focus on specific tasks** while maintaining clean separation of concerns
14
+ - 🤖 **Persistent AI workspaces** - Let one Claude Code instance live in "bezos" while another Claude Code instance works in "musk" - each for weeks at a time
15
+ - 🔀 **Branch without context switching** - Each workspace can switch branches to work on new features while keeping its workspace directory intact
16
+ - 🎯 **Parallel AI work streams** - Multiple AI agents can work simultaneously on different features for the same repo, each in their own branch and workspace
17
17
 
18
18
  Using memorable themes, you manage your agent workforce:
19
19
  - 💰 **Billionaires** become your coding workforce (Bezos, Musk, Gates)
20
20
  - 🚗 **Toyotas** drive your development forward (Prius, Tacoma, Tundra)
21
21
  - 🏢 **Companies** form your development portfolio (Apple, Google, Microsoft)
22
22
 
23
- Each agent operates independently via git worktrees, enabling true parallel development workflows!
23
+ Each workspace is a dedicated git worktree on your local machine. Run as many AI coding sessions as there are agents in your theme (40 billionaires!) - Cursor, Claude Code, Aider, etc. - editing different features, or quickly switch between workspaces without losing context!
24
+
25
+ ---
26
+
27
+ ## 💡 The Design Pattern
28
+
29
+ **Problem:** AI coding tools work in a single directory. Want to work on multiple features? You're stuck with stashing, branching, and context switching.
30
+
31
+ **Solution:** PROLETARIAT creates isolated agent workspaces on your machine where you can run multiple AI sessions:
32
+
33
+ ```
34
+ your-company-hq/ (recommended layout)
35
+ ├── your-repo/ # Your original repo
36
+ ├── your-repo-staff/
37
+ │ ├── bezos/ → Claude Code 1: Building authentication
38
+ │ ├── musk/ → Claude Code 2: Implementing AI features
39
+ │ ├── gates/ → Cursor: Refactoring database
40
+ │ ├── jobs/ → Codex CLI 1: Writing test suite
41
+ │ └── cook/ → Codex CLI 2: Fixing security issues
42
+ ```
43
+
44
+ **Result:** One developer, 5 agent directories, 0 conflicts. Work on multiple features simultaneously or let AI agents handle different tasks!
45
+
46
+ ![Multi-Agent Development in Action](https://github.com/chrismcdermut/proletariat-cli/raw/main/assets/multi-agent-workspace.png)
47
+ *Three workspaces in parallel, each with manual pane + AI agent: `andreesen` (left) on Feature A, `zuck` (center) fixing a reported bug, and `jobs` (right) on Feature B. No musk, he was fired!*
24
48
 
25
49
  ---
26
50
 
@@ -29,13 +53,13 @@ Each agent operates independently via git worktrees, enabling true parallel deve
29
53
  ### ⚡ **Zero Configuration**
30
54
  Just `prlt init` and you're ready to go. Zero configuration required.
31
55
 
32
- ### 🎨 **Three Fun Themes**
33
- - **💰 Billionaires**: Hire/fire billionaire workers in `../project-staff/`
34
- - **🚗 Cars**: Drive/park cars in your `../project-garage/`
35
- - **🏢 Companies**: Buy/sell companies in your `../project-portfolio/`
56
+ ### 🎨 **Three Fun Themes** *(Custom theme support coming soon!)*
57
+ - **💰 Billionaires**: Hire/fire billionaire workers in `../your-repo-staff/`
58
+ - **🚗 Cars**: Drive/park cars in `../your-repo-garage/`
59
+ - **🏢 Companies**: Buy/sell companies in `../your-repo-portfolio/`
36
60
 
37
- ### 🔀 **Agent-Based Development**
38
- Each coding agent is a clean git worktree on its own branch, working independently and in parallel with other agents.
61
+ ### 🔀 **Multiple Agent Workspaces in Your HQ**
62
+ Each agent gets their own clean workspace (`git worktree`) on your local filesystem. Run multiple Cursor windows, Claude Code instances, or just keep different features open - each agent in their own workspace, no context switching needed.
39
63
 
40
64
  ---
41
65
 
@@ -46,12 +70,12 @@ Each coding agent is a clean git worktree on its own branch, working independent
46
70
  npm install -g @proletariat/cli
47
71
 
48
72
  # Initialize with interactive theme selection
49
- cd your-project
73
+ cd your-repo
50
74
  prlt init # Prompts you to choose: billionaires, toyotas, or companies
51
75
 
52
76
  # Create worktrees with themed commands
53
77
  prlt hire bezos musk # Billionaires theme
54
- prlt drive tesla prius # Cars theme
78
+ prlt drive 4runner prius # Cars theme
55
79
  prlt buy apple microsoft # Companies theme
56
80
 
57
81
  # Check status
@@ -65,22 +89,52 @@ prlt park honda # Cars theme
65
89
  prlt sell nvidia # Companies theme
66
90
  ```
67
91
 
68
- ### 🏗️ Flexible Agent Workspace Layouts
92
+ ### 🏗️ Flexible Agent Directory Layouts
93
+
94
+ **HQ Layout (Recommended)** - Group original repositories and agent workspaces under one headquarters directory:
95
+ ```bash
96
+ # IMPORTANT: Run prlt init inside EACH repository you want to manage
97
+ cd frontend-repo && prlt init --hq your-company
98
+ cd ../backend-repo && prlt init --hq your-company
69
99
 
70
- **Default Layout** - Agents as siblings to your project:
100
+ # Each repo needs its own initialization since worktrees are per-repository
71
101
  ```
72
- parent-dir/
73
- ├── your-project/ (main codebase)
74
- ├── your-project-staff/ (billionaire agents)
75
- ├── your-project-garage/ (toyota agents)
76
- └── your-project-portfolio/ (company agents)
102
+
103
+ Creates this organized structure to hold multi-repo projects:
104
+ ```
105
+ your-company-hq/ # HQ containing all repos and agent workspaces
106
+ ├── frontend-repo/ (main frontend repository)
107
+ ├── frontend-repo-staff/ (frontend billionaire agents)
108
+ │ ├── bezos/ (e.g., Claude Code instance 1)
109
+ │ ├── musk/ (e.g., Claude Code instance 2)
110
+ │ └── gates/ (e.g., Cursor)
111
+ ├── backend-repo/ (main backend repository)
112
+ └── backend-repo-staff/ (backend billionaire agents)
113
+ ├── cook/ (e.g., Codex CLI 1)
114
+ ├── jobs/ (e.g., Codex CLI 2)
115
+ └── buffett/ (e.g., Claude Code instance 2)
77
116
  ```
78
117
 
79
- **Workspace Layout** - Group project and agents under one parent directory:
80
- ```bash
81
- prlt init --workspace my-platform
82
- # Creates: ../my-platform/project-name-staff/
83
- # Optionally offers to move your repo to: ../my-platform/project-name/
118
+ Each repository maintains its own `.proletariat/config.json` since worktrees are per-repository.
119
+
120
+ **Default Layout** - Agents as siblings to your repository:
121
+ ```
122
+ some-directory-on-your-machine/
123
+ ├── your-repo/ (main repository)
124
+ └── your-repo-staff/ (billionaire agents)
125
+ ├── bezos/ (e.g., Claude Code instance 1)
126
+ ├── musk/ (e.g., Claude Code instance 2)
127
+ └── gates/ (e.g., Cursor)
128
+ OR
129
+ └── your-repo-garage/ (toyota agents)
130
+ ├── camry/ (e.g., Codex CLI 1)
131
+ ├── prius/ (e.g., Codex CLI 2)
132
+ └── tacoma/ (e.g., Cursor)
133
+ OR
134
+ └── your-repo-portfolio/ (company agents)
135
+ ├── apple/ (e.g., Claude Code)
136
+ ├── google/ (e.g., Cursor instance 1)
137
+ └── microsoft/ (e.g., Cursor instance 2)
84
138
  ```
85
139
 
86
140
  **Custom Location** - Point agents anywhere you want:
@@ -98,19 +152,19 @@ $ prlt init
98
152
  ⚒️ PROLETARIAT ⚒️
99
153
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
100
154
  💰 Billionaire Staff 💰
101
- ⚒️ Making billionaires work as your git worktrees!
155
+ ⚒️ Creating workspaces for your billionaire staff!
102
156
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
103
157
 
104
158
  $ prlt hire bezos musk
105
159
  💰 Hiring billionaire workers
106
- 💰 BEZOS: Ready to work at ../your-project-staff/bezos
107
- 💰 MUSK: Ready to work at ../your-project-staff/musk
160
+ 💰 BEZOS: Ready to work at ../your-repo-staff/bezos
161
+ 💰 MUSK: Ready to work at ../your-repo-staff/musk
108
162
 
109
163
  $ prlt staff
110
164
  💰 Current billionaire staff
111
- 💰 BEZOS: ✅ ACTIVE - ../your-project-staff/bezos
165
+ 💰 BEZOS: ✅ ACTIVE - ../your-repo-staff/bezos
112
166
  📝 Branch: agent/bezos/work
113
- 💰 MUSK: ✅ ACTIVE - ../your-project-staff/musk
167
+ 💰 MUSK: ✅ ACTIVE - ../your-repo-staff/musk
114
168
  📝 Branch: agent/musk/work
115
169
 
116
170
  Workers of the codebase, unite! ✊
@@ -126,15 +180,15 @@ Make the ultra-wealthy work for YOU!
126
180
  ```bash
127
181
  prlt init --theme=billionaires
128
182
  prlt hire bezos musk gates buffett
129
- prlt fire zuckerberg # You're fired!
183
+ prlt fire zuck # You're fired!
130
184
  prlt staff # Check your workers
131
185
  ```
132
186
 
133
- **Agents**: altman, amodei, andreesen, arnault, bezos, blakely, bloomberg, branson, brin, buffett, cook, ellison, gates, horowitz, jobs, ma, munger, musk, nadella, oprah, page, perkins, swift, whitney, wojcicki, zuckerberg
134
- **Directory**: `../[project]-staff/`
187
+ **Agents**: altman, daramodei, danamodei, andreesen, arnault, benioff, bezos, blakely, bloomberg, branson, brin, buffett, carmack, chesky, cook, dean, dorsey, ellison, gates, horowitz, huang, jobs, kalanick, karpathy, lecun, ma, murati, munger, musk, nadella, ng, oprah, page, perkins, sandberg, sutskever, swift, whitney, wojcicki, zuck
188
+ **Directory**: `../[your-repo]-staff/`
135
189
 
136
190
  ### 🚗 Toyotas
137
- Manufacturing's finest keeping your fleet humming.
191
+ Put manufacturing's finest to work as your development fleet.
138
192
 
139
193
  ```bash
140
194
  prlt init --theme=toyotas
@@ -143,11 +197,11 @@ prlt park 4runner # Back to the bay
143
197
  prlt garage # Check your fleet
144
198
  ```
145
199
 
146
- **Agents**: 4runner, camry, fj40, highlander, hilux, ironpig, landcruiser, prius, sierra, tacoma, tercel, troopy, tundra
147
- **Directory**: `../[project]-garage/`
200
+ **Agents**: 1stgen4runner, 2ndgen4runner, 3rdgen4runner, alltrac, camry, fj40, fj60, fj80, fzj80, hdj80, hdj81, highlander, hilux, ironpig, landcruiser, prius, rav4, sierra, tacoma, tercel, troopy, tundra
201
+ **Directory**: `../[your-repo]-garage/`
148
202
 
149
203
  ### 🏢 Companies
150
- Let the Fortune 500 take orders from you.
204
+ Now they're the consumer.
151
205
 
152
206
  ```bash
153
207
  prlt init --theme=companies
@@ -157,7 +211,7 @@ prlt portfolio # Check your holdings
157
211
  ```
158
212
 
159
213
  **Agents**: adobe, amazon, apple, atlassian, cisco, google, ibm, meta, microsoft, netflix, nvidia, oracle, shopify, snowflake, tesla, zoom
160
- **Directory**: `../[project]-portfolio/`
214
+ **Directory**: `../[your-repo]-portfolio/`
161
215
 
162
216
  ---
163
217
 
@@ -165,118 +219,145 @@ prlt portfolio # Check your holdings
165
219
 
166
220
  | Theme | Create | Remove | Status | Directory |
167
221
  |-------|--------|--------|--------|-----------|
168
- | **💰 Billionaires** | `hire` | `fire` | `staff` | `../project-staff/` |
169
- | **🚗 Cars** | `drive` | `park` | `garage` | `../project-garage/` |
170
- | **🏢 Companies** | `buy` | `sell` | `portfolio` | `../project-portfolio/` |
222
+ | **💰 Billionaires** | `hire` | `fire` | `staff` | `../your-repo-staff/` |
223
+ | **🚗 Cars** | `drive` | `park` | `garage` | `../your-repo-garage/` |
224
+ | **🏢 Companies** | `buy` | `sell` | `portfolio` | `../your-repo-portfolio/` |
171
225
 
172
226
  ### Universal Commands
173
227
  - `prlt init [--theme=cars]` - Initialize with theme
174
- - `prlt init --workspace <name>` - Optional workspace layout
175
- - `prlt init --workspace-root <path>` - Use a custom agent directory
228
+ - `prlt init --hq <name>` - Create/join an HQ directory
229
+ - `prlt init --hq-root <path>` - Use a custom agent directory
176
230
  - `prlt list [--theme=cars]` - List available agents
177
231
  - `prlt themes` - Show all themes
232
+ - `prlt repair` - Fix broken worktree references after repo moves
233
+ - `prlt migrate <hq-name>` - Move your repo into an HQ folder
234
+ - `prlt upgrade` - Upgrade config to latest format (backwards compatible)
235
+ - `prlt health` - Check worktree health status
178
236
 
179
237
  ---
180
238
 
181
239
  ## 🛠️ How It Works
182
240
 
183
- 1. **Initialize**: Choose your theme, creates `../project-[directory]/`
184
- 2. **Create**: `git worktree add -b "agent/[name]/work" ../project-[directory]/[name]`
185
- 3. **Track**: Saves active agents in `.proletariat/config.json`
186
- 4. **Work**: Each agent is a persistent workspace - a complete copy of your repo where you can switch between any feature branches
187
- 5. **Remove**: `git worktree remove` and clean up tracking
241
+ 1. **Initialize**: `prlt init` - Choose your theme and HQ layout
242
+ 2. **Create agents**: `prlt hire bezos` / `prlt drive camry` / `prlt buy apple` - Creates isolated workspaces (`git worktrees`)
243
+ 3. **Work**: Each workspace (git worktree) is a persistent directory where agents can work independently - you can switch AI tools or branches but the workspace persists
244
+ 4. **Check status**: `prlt staff` / `prlt garage` / `prlt portfolio` - See your active agents
245
+ 5. **Clean up**: `prlt fire bezos` / `prlt park camry` / `prlt sell apple` - Removes worktrees cleanly
188
246
 
189
- **That's it!** Simple and clean.
247
+ **That's it!** Simple themed commands wrapping git worktrees.
190
248
 
191
- If you chose a workspace or custom location, the layout details are stored in `.proletariat/config.json` so future commands know where to work.
249
+ Configuration is stored in `.proletariat/repo.json` (or `.proletariat/config.json` for backwards compatibility).
192
250
 
193
251
  ---
194
252
 
195
- ## 🎯 Multi-Agent Workflow
253
+ ## 🎯 Parallel AI Development in Action
196
254
 
197
255
  ```bash
198
- # Deploy multiple agents to work on different tasks
256
+ # Set up persistent workspaces
199
257
  prlt hire bezos musk gates
258
+ ```
259
+
260
+ Now open separate terminal panes/tabs or AI IDE windows (Cursor, Windsurf, etc.):
200
261
 
201
- # Agent 1: Bezos tackles the checkout feature
202
- cd ../your-project-staff/bezos
203
- git checkout -b feat/checkout-flow
204
- # ... autonomous development
205
-
206
- # Agent 2: Musk implements AI search
207
- cd ../your-project-staff/musk
208
- git checkout -b feat/ai-search
209
- # ... parallel development
210
-
211
- # Agent 3: Gates fixes security issues
212
- cd ../your-project-staff/gates
213
- git checkout -b fix/security-patches
214
- # ... independent work
215
-
216
- # Orchestrate: Merge all agent work
217
- cd ../your-project
218
- git merge feat/checkout-flow # Integrate Bezos's work
219
- git merge feat/ai-search # Integrate Musk's work
220
- git merge fix/security-patches # Integrate Gates's work
262
+ **Terminal Pane/Tab or AI IDE Window 1: Agent workspace (e.g., bezos)**
263
+ ```bash
264
+ cd ../your-repo-staff/bezos
265
+ claude-code . # Claude Code owns this workspace for weeks
266
+ # Monday: Implement login
267
+ # Tuesday: Add OAuth
268
+ # Wednesday: Fix auth bugs
269
+ # Thursday: Add 2FA
270
+ # All in the same workspace, different branches as needed
271
+ ```
272
+
273
+ **Terminal Pane/Tab or AI IDE Window 2: Agent workspace (e.g., musk)**
274
+ ```bash
275
+ cd ../your-repo-staff/musk
276
+ cursor . # Cursor lives here, building feature after feature
277
+ # Week 1: User endpoints
278
+ # Week 2: Payment endpoints
279
+ # Week 3: Analytics endpoints
280
+ ```
281
+
282
+ **Terminal Pane/Tab or AI IDE Window 3: Agent workspace (e.g., gates)**
283
+ ```bash
284
+ cd ../your-repo-staff/gates
285
+ # Your manual testing, experiments, debugging
286
+ # No AI needed - just your playground
287
+ ```
288
+
289
+ Merge completed work from any workspace:
290
+ ```bash
291
+ # Option 1: GitHub PR (recommended)
292
+ cd ../your-repo-staff/bezos
293
+ gh pr create --title "Add login feature" --body "Authentication implementation"
294
+
295
+ # Option 2: Local merge
296
+ cd ../your-repo # (on main or development branch, feature-branch etc)
297
+ git merge bezos/feature-login
298
+ git merge musk/api-v2
299
+ # Each workspace keeps working independently!
221
300
  ```
222
301
 
223
302
  ---
224
303
 
225
- ## 🌟 Why Multi-Agent Development?
304
+ ## 🌟 Why This Design Pattern?
226
305
 
227
- ### ❌ **Traditional Single-Thread Development**
306
+ ### ❌ **Traditional Single Workspace**
228
307
  ```bash
229
- # Work on one thing at a time
308
+ # One directory, constant context switching
230
309
  git checkout -b feature-1
231
- # ... work ...
232
- git checkout main
233
- git checkout -b feature-2
234
- # Context switching, stashing, conflicts...
310
+ # Work on feature 1...
311
+ git stash # Have to stash to switch
312
+ git checkout -b feature-2
313
+ # Lost context, files changed, AI confused...
235
314
  ```
236
315
 
237
- ### ✅ **Multi-Agent Parallel Development**
316
+ ### ✅ **Multiple Workspaces, One Machine**
238
317
  ```bash
239
- # Deploy agents to work simultaneously
318
+ # Set up workspaces on your local machine
240
319
  prlt hire bezos musk gates
241
320
 
242
- # Three agents, three features, zero conflicts
321
+ # Each workspace ready for AI or manual work
243
322
  prlt staff
244
- # 💰 BEZOS: ✅ Working on checkout-flow
245
- # 💰 MUSK: ✅ Building AI search
246
- # 💰 GATES: ✅ Fixing security issues
323
+ # 💰 BEZOS: ✅ Cursor session 1 → ../your-repo-staff/bezos
324
+ # 💰 MUSK: ✅ Claude Code session → ../your-repo-staff/musk
325
+ # 💰 GATES: ✅ Your manual edits → ../your-repo-staff/gates
326
+
327
+ # Three workspaces, three features, all on your machine!
247
328
  ```
248
329
 
249
- **True parallel development with memorable agent management!** 🎉
330
+ **Scale your solo development: Multiple workspaces, parallel progress, zero stashing!** 🎉
250
331
 
251
332
  ---
252
333
 
253
334
 
254
335
  ## 🏆 Perfect For
255
336
 
256
- - **Parallel Feature Development** - Multiple agents work on different features simultaneously
257
- - **AI-Assisted Coding** - Each agent can be powered by different AI tools or prompts
258
- - **Distributed Bug Fixing** - Deploy agents to tackle multiple bugs in parallel
259
- - **Experimentation** - Agents explore different solutions independently
260
- - **Code Reviews** - Each agent's work is isolated and easy to review
261
- - **Team Collaboration** - Assign real team members to specific agents
337
+ - **Running Multiple Cursor Sessions** - Open 3+ Cursor windows, each editing a different workspace/feature
338
+ - **Parallel Claude Code Instances** - Launch multiple Claude Code sessions working on separate tasks
339
+ - **Concurrent CLI Agents** - Run Codex, Aider, or other CLI agents simultaneously in different workspaces
340
+ - **Mixed AI Tools** - Cursor in one workspace, Claude Code in another, Copilot in a third
341
+ - **Scaling Solo Development** - One developer running multiple AI sessions on their machine
342
+ - **Rapid Prototyping** - Each workspace explores different approaches without affecting others
262
343
 
263
344
  ---
264
345
 
265
346
  ## 📜 License
266
347
 
267
- MIT License - Because even revolutionaries believe in open source!
348
+ MIT License - Because the revolutionso is open source.
268
349
 
269
350
  ---
270
351
 
271
352
  <div align="center">
272
353
 
273
- **🚩 WORKERS OF THE CODEBASE, UNITE! ✊**
354
+ **✊ WORKERS OF THE CODEBASE, UNITE! ✊**
274
355
 
275
356
  *The simplest, most fun git worktree manager in existence!*
276
357
 
277
358
  [![npm version](https://img.shields.io/npm/v/@proletariat/cli.svg)](https://www.npmjs.com/package/@proletariat/cli)
278
359
  [![Downloads](https://img.shields.io/npm/dm/@proletariat/cli.svg)](https://npmjs.org/package/@proletariat/cli)
279
- [![Revolutionary](https://img.shields.io/badge/git--worktree-themed-red.svg)](https://github.com/chrismcdermut/proletariat-cli)
360
+ [![git-worktree](https://img.shields.io/badge/git--worktree-themed-red.svg)](https://github.com/chrismcdermut/proletariat-cli)
280
361
 
281
362
  **[⭐ Star on GitHub](https://github.com/chrismcdermut/proletariat-cli) • [📦 Install from NPM](https://www.npmjs.com/package/@proletariat/cli) • [🐛 Report Issues](https://github.com/chrismcdermut/proletariat-cli/issues)**
282
363
 
package/dist/bin/prlt.js CHANGED
@@ -8,31 +8,80 @@
8
8
  * Cars: "Start your engines!"
9
9
  * Companies: "Time to make some acquisitions!"
10
10
  */
11
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
15
+ desc = { enumerable: true, get: function() { return m[k]; } };
16
+ }
17
+ Object.defineProperty(o, k2, desc);
18
+ }) : (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ }));
22
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
23
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
24
+ }) : function(o, v) {
25
+ o["default"] = v;
26
+ });
27
+ var __importStar = (this && this.__importStar) || (function () {
28
+ var ownKeys = function(o) {
29
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30
+ var ar = [];
31
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32
+ return ar;
33
+ };
34
+ return ownKeys(o);
35
+ };
36
+ return function (mod) {
37
+ if (mod && mod.__esModule) return mod;
38
+ var result = {};
39
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
40
+ __setModuleDefault(result, mod);
41
+ return result;
42
+ };
43
+ })();
11
44
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
46
  };
14
47
  Object.defineProperty(exports, "__esModule", { value: true });
15
48
  const commander_1 = require("commander");
16
49
  const chalk_1 = __importDefault(require("chalk"));
50
+ const fs = __importStar(require("fs"));
51
+ const path = __importStar(require("path"));
17
52
  // Import modules
18
53
  const index_js_1 = require("../lib/themes/index.js");
19
54
  const index_js_2 = require("../lib/worktree/index.js");
55
+ const repair_js_1 = require("../lib/worktree/repair.js");
56
+ const migrate_js_1 = require("../lib/worktree/migrate.js");
57
+ const upgrade_js_1 = require("../lib/config/upgrade.js");
20
58
  const helpers_js_1 = require("../lib/utils/helpers.js");
21
59
  const logger_js_1 = require("../lib/utils/logger.js");
22
60
  const program = new commander_1.Command();
61
+ // Get version from package.json dynamically
62
+ function getVersion() {
63
+ try {
64
+ const packageJsonPath = path.join(__dirname, '../../package.json');
65
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
66
+ return packageJson.version;
67
+ }
68
+ catch {
69
+ return '0.0.0'; // Fallback version if package.json can't be read
70
+ }
71
+ }
23
72
  // Get themes for CLI setup
24
73
  const THEMES = (0, index_js_1.getAllThemes)();
25
74
  // CLI Program setup
26
75
  program
27
76
  .name('prlt')
28
77
  .description('⚒️ Simple Themed Git Worktree Manager')
29
- .version('2.0.0');
78
+ .version(getVersion());
30
79
  program
31
80
  .command('init')
32
81
  .description('🚩 Initialize themed worktree management')
33
82
  .option('-t, --theme <theme>', 'theme (billionaires, cars, companies)')
34
- .option('--workspace <name>', 'Create a workspace directory (e.g. acme-project) to hold the repo and agents')
35
- .option('--workspace-root <path>', 'Explicit path where agent worktrees should live')
83
+ .option('--hq <name>', 'Create an HQ directory (e.g. your-company-hq) to hold repos and agent workspaces')
84
+ .option('--hq-root <path>', 'Explicit path where agent workspaces should live')
36
85
  .action(async (options) => {
37
86
  await (0, index_js_2.initProject)(options);
38
87
  });
@@ -66,6 +115,22 @@ program
66
115
  .command('themes')
67
116
  .description('🎨 List available themes')
68
117
  .action(() => (0, helpers_js_1.listThemes)());
118
+ program
119
+ .command('repair')
120
+ .description('🔧 Repair broken worktree references (e.g., after moving the repository)')
121
+ .action(() => (0, repair_js_1.repairWorktrees)());
122
+ program
123
+ .command('health')
124
+ .description('🏥 Check health of all worktrees')
125
+ .action(() => (0, repair_js_1.checkWorktreeHealth)());
126
+ program
127
+ .command('migrate <hq-name>')
128
+ .description('📦 Migrate repository into HQ folder alongside agent workspaces')
129
+ .action((hqName) => (0, migrate_js_1.migrateToHQ)(hqName));
130
+ program
131
+ .command('upgrade')
132
+ .description('⬆️ Upgrade configuration to latest format')
133
+ .action(() => (0, upgrade_js_1.upgradeConfig)());
69
134
  // Parse command line arguments
70
135
  program.parse(process.argv);
71
136
  // Show help if no command provided
@@ -1 +1 @@
1
- {"version":3,"file":"prlt.js","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6 +8,7 @@ export interface WorkspaceResolution {
8
8
  }
9
9
  export declare function resolveWorkspace(theme: Theme, options?: InitOptions): WorkspaceResolution;
10
10
  export declare function isInitialized(): boolean;
11
+ export declare function migrateConfigIfNeeded(): boolean;
11
12
  export declare function loadConfig(): ProjectConfig;
12
13
  export declare function saveConfig(configData: ProjectConfig): void;
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/config/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1F,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAGvC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,WAAgB,GAAG,mBAAmB,CA2B7F;AAED,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,UAAU,IAAI,aAAa,CAW1C;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAS1D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/config/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE1F,wBAAgB,cAAc,IAAI,MAAM,CAMvC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAGvC;AAED,wBAAgB,aAAa,IAAI,MAAM,CActC;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,WAAgB,GAAG,mBAAmB,CA+B7F;AAED,wBAAgB,aAAa,IAAI,OAAO,CAMvC;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAa/C;AAED,wBAAgB,UAAU,IAAI,aAAa,CAW1C;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CAS1D"}