@aku11i/phantom 0.3.0 → 0.4.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.ja.md CHANGED
@@ -8,14 +8,18 @@
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
9
  [![Node.js Version](https://img.shields.io/node/v/@aku11i/phantom.svg)](https://nodejs.org)
10
10
 
11
- [インストール](#-インストール) • [クイックスタート](#-クイックスタート) • [なぜPhantom?](#-なぜphantom) • [ドキュメント](#-ドキュメント)
11
+ [インストール](#-インストール) • [基本的な使い方](#-基本的な使い方) • [なぜPhantom?](#-なぜphantom) • [ドキュメント](#-ドキュメント)
12
12
 
13
13
  </div>
14
14
 
15
- ## ✨ 主な機能
15
+ ## ✨ 概要
16
+
17
+ Phantomは、Git worktreeの管理を劇的にシンプルにするCLIツールです。複数の機能開発、バグ修正、PRレビューを並行して進める現代の開発ワークフローに最適化されています。
18
+
19
+ ### 主な特徴
16
20
 
17
21
  - 🚀 **シンプルなWorktree管理** - 直感的なコマンドでGit worktreeを作成・管理
18
- - 🔄 **シームレスなコンテキスト切り替え** - stashやcommitせずに異なる機能間をジャンプ
22
+ - 🔄 **シームレスなコンテキスト切り替え** - stashやcommitせずに異なる作業間を瞬時に移動
19
23
  - 🤖 **AI対応** - 複数のAIコーディングエージェントを並行実行するのに最適
20
24
  - 🎯 **ブランチとWorktreeの同期** - 各worktreeに対応するブランチを自動作成
21
25
  - 🐚 **インタラクティブシェル** - SSH風のworktreeナビゲーション体験
@@ -23,21 +27,26 @@
23
27
 
24
28
  ## 🤔 なぜPhantom?
25
29
 
26
- 現代の開発ワークフローでは、複数の機能を同時に作業することがよくあります。AIコーディングエージェントを並行実行したり、開発しながらPRをレビューしたり、単純に複数の機能をマルチタスクで作業したりする場合、複数のGit worktreeの管理は面倒になりがちです。
30
+ 現代の開発ワークフローでは、複数の機能を同時に作業することが一般的になっています。Git worktreeは素晴らしい機能ですが、パスとブランチを個別に指定する必要があり、少し面倒です。
31
+
32
+ ### Git worktreeを使う際の問題点
33
+
34
+ 素のGit worktreeを使う場合、worktreeのパス、ブランチ名、ベースブランチなどを毎回指定する必要があります。また、作業を切り替える際はディレクトリを移動する必要があり、複数の作業を頻繁に切り替える場合は少し手間がかかります。
27
35
 
28
- **問題点:**
29
- - Git worktreeコマンドは冗長で複雑
30
- - ブランチとworktreeを別々に管理するのはエラーが起きやすい
31
- - コンテキストの切り替えには複数のコマンドが必要
32
- - 同じコードベースで並行してAIエージェントを実行するのは困難
36
+ ### Phantomの解決策
37
+
38
+ ```bash
39
+ # 従来の方法
40
+ git worktree add -b feature ../project-feature origin/main
41
+ cd ../project-feature
42
+
43
+ # Phantomを使用
44
+ phantom create feature --shell
45
+ ```
33
46
 
34
- **Phantomの解決策:**
35
- - 1つのコマンドでworktreeとブランチの両方を作成: `phantom create feature-x`
36
- - 即座にコンテキストを切り替え: `phantom shell feature-x`
37
- - ディレクトリを変更せずにコマンドを実行: `phantom exec feature-x npm test`
38
- - 複数のAIエージェントとの「並行バイブコーディング」に最適
47
+ Phantomは、worktreeとブランチの作成を1つのコマンドにまとめ、作業スペース間の移動や操作を簡単にします。
39
48
 
40
- ## 🚀 クイックスタート
49
+ ## 🚀 基本的な使い方
41
50
 
42
51
  ```bash
43
52
  # Phantomをインストール
@@ -88,10 +97,6 @@ npm link
88
97
 
89
98
  ## 📖 ドキュメント
90
99
 
91
- ### コアコンセプト
92
-
93
- **Worktree** 🌳 - Phantomによって管理されるGit worktree。各worktreeは特定のブランチや機能のための独立したワークスペースで、競合なしに並行開発が可能です。
94
-
95
100
  ### コマンド概要
96
101
 
97
102
  #### Worktree管理
@@ -128,11 +133,52 @@ phantom shell <name>
128
133
 
129
134
  ### 環境変数
130
135
 
131
- Phantomで管理されたworktree内で作業する際、以下の環境変数が利用可能です:
136
+ `phantom shell`でインタラクティブシェルを開いた際、以下の環境変数が設定されます:
132
137
 
138
+ - `PHANTOM` - phantom shellから起動されたすべてのプロセスに"1"がセットされる
133
139
  - `PHANTOM_NAME` - 現在のworktreeの名前
134
140
  - `PHANTOM_PATH` - worktreeディレクトリへの絶対パス
135
141
 
142
+ ## 💡 ユースケース
143
+
144
+ Phantomは単なるworktreeラッパーではなく、開発生産性を劇的に向上させるツールです。以下に実際の使用例を紹介します。
145
+
146
+ ### tmuxとの統合
147
+
148
+ tmuxとPhantomを組み合わせることで、驚くほど効率的なワークフローを実現できます:
149
+
150
+ ```bash
151
+ # 新しいtmuxウィンドウを開いて、同時にworktreeを作成
152
+ tmux new-window 'phantom create new-feature --shell'
153
+ ```
154
+
155
+ このたった1行のコマンドで:
156
+ 1. `new-feature`用の新しいGit worktreeを作成 ✨
157
+ 2. 新しいtmuxウィンドウを開く 🪟
158
+ 3. 新しいworktreeでインタラクティブシェルを起動 🚀
159
+
160
+ 複数の機能を並行して開発する際に、各機能を独立したtmuxウィンドウで管理できます。
161
+
162
+ ### VS Codeとの統合
163
+
164
+ ```bash
165
+ # worktreeを作成してすぐにVS Codeで開く
166
+ phantom create feature-auth
167
+ phantom exec feature-auth code .
168
+ ```
169
+
170
+ ### 並行開発ワークフロー
171
+
172
+ ```bash
173
+ # 機能開発中にバグレポートが来た場合
174
+ phantom create hotfix-critical # バグ修正用のworktreeを作成
175
+ phantom shell hotfix-critical # すぐに作業開始
176
+
177
+ # 修正後、元の機能開発に戻る
178
+ exit # hotfixシェルを終了
179
+ phantom shell feature-awesome # 機能開発を続行
180
+ ```
181
+
136
182
  ## 🔄 Phantom vs Git Worktree
137
183
 
138
184
  | 機能 | Git Worktree | Phantom |
@@ -183,10 +229,10 @@ Phantomの新しいバージョンをリリースするには:
183
229
  ```bash
184
230
  # パッチリリース(バグ修正)の場合
185
231
  npm version patch
186
-
232
+
187
233
  # マイナーリリース(新機能)の場合
188
234
  npm version minor
189
-
235
+
190
236
  # メジャーリリース(破壊的変更)の場合
191
237
  npm version major
192
238
  ```
@@ -208,7 +254,7 @@ Phantomの新しいバージョンをリリースするには:
208
254
  --title "Phantom v<version>" \
209
255
  --generate-notes \
210
256
  --target main
211
-
257
+
212
258
  # v0.1.3の例:
213
259
  gh release create v0.1.3 \
214
260
  --title "Phantom v0.1.3" \
@@ -251,4 +297,4 @@ Phantomの新しいバージョンをリリースするには:
251
297
 
252
298
  <div align="center">
253
299
  <a href="https://github.com/aku11i">aku11i</a>と<a href="https://claude.ai">Claude</a>により👻で作成
254
- </div>
300
+ </div>
package/README.md CHANGED
@@ -8,11 +8,15 @@
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
9
  [![Node.js Version](https://img.shields.io/node/v/@aku11i/phantom.svg)](https://nodejs.org)
10
10
 
11
- [Installation](#-installation) • [Quick Start](#-quick-start) • [Why Phantom?](#-why-phantom) • [Documentation](#-documentation) • [日本語](./README.ja.md)
11
+ [Installation](#-installation) • [Basic Usage](#-basic-usage) • [Why Phantom?](#-why-phantom) • [Documentation](#-documentation) • [日本語](./README.ja.md)
12
12
 
13
13
  </div>
14
14
 
15
- ## ✨ Key Features
15
+ ## ✨ Overview
16
+
17
+ Phantom is a CLI tool that dramatically simplifies Git worktree management. It's optimized for modern development workflows where you need to work on multiple features, bug fixes, and PR reviews in parallel.
18
+
19
+ ### Key Features
16
20
 
17
21
  - 🚀 **Simplified Worktree Management** - Create and manage Git worktrees with intuitive commands
18
22
  - 🔄 **Seamless Context Switching** - Jump between different features without stashing or committing
@@ -23,21 +27,26 @@
23
27
 
24
28
  ## 🤔 Why Phantom?
25
29
 
26
- Modern development workflows often require working on multiple features simultaneously. Whether you're running AI coding agents in parallel, reviewing PRs while developing, or simply multitasking across features, managing multiple Git worktrees can be cumbersome.
30
+ Modern development workflows often require working on multiple features simultaneously. While Git worktree is a powerful feature, it requires specifying paths and branches separately, which can be cumbersome.
31
+
32
+ ### The Manual Process
33
+
34
+ When using Git worktree directly, you need to specify the worktree path, branch name, and base branch each time. Additionally, switching between tasks requires navigating directories, which can be a bit tedious when frequently switching between multiple parallel tasks.
27
35
 
28
- **The Problem:**
29
- - Git worktree commands are verbose and complex
30
- - Managing branches and worktrees separately is error-prone
31
- - Switching contexts requires multiple commands
32
- - Running parallel AI agents on the same codebase is challenging
36
+ ### The Phantom Solution
37
+
38
+ ```bash
39
+ # Traditional approach
40
+ git worktree add -b feature ../project-feature origin/main
41
+ cd ../project-feature
42
+
43
+ # With Phantom
44
+ phantom create feature --shell
45
+ ```
33
46
 
34
- **The Phantom Solution:**
35
- - One command to create both worktree and branch: `phantom create feature-x`
36
- - Instant context switching: `phantom shell feature-x`
37
- - Execute commands without changing directories: `phantom exec feature-x npm test`
38
- - Perfect for "parallel vibe coding" with multiple AI agents
47
+ Phantom combines worktree and branch creation into a single command, making it easy to switch between and work in different workspaces.
39
48
 
40
- ## 🚀 Quick Start
49
+ ## 🚀 Basic Usage
41
50
 
42
51
  ```bash
43
52
  # Install Phantom
@@ -88,10 +97,6 @@ npm link
88
97
 
89
98
  ## 📖 Documentation
90
99
 
91
- ### Core Concepts
92
-
93
- **Worktrees** 🌳 - Git worktrees managed by Phantom. Each worktree is an isolated workspace for a specific branch or feature, allowing parallel development without conflicts.
94
-
95
100
  ### Commands Overview
96
101
 
97
102
  #### Worktree Management
@@ -128,11 +133,52 @@ phantom shell <name>
128
133
 
129
134
  ### Environment Variables
130
135
 
131
- When working within a worktree managed by Phantom, these environment variables are available:
136
+ When opening an interactive shell with `phantom shell`, these environment variables are set:
132
137
 
138
+ - `PHANTOM` - Set to "1" for all processes spawned from phantom shell
133
139
  - `PHANTOM_NAME` - Name of the current worktree
134
140
  - `PHANTOM_PATH` - Absolute path to the worktree directory
135
141
 
142
+ ## 💡 Use Cases
143
+
144
+ Phantom is more than just a worktree wrapper - it's a productivity multiplier. Here are some real-world examples:
145
+
146
+ ### tmux Integration
147
+
148
+ Combine tmux with Phantom for an incredibly efficient workflow:
149
+
150
+ ```bash
151
+ # Open a new tmux window and create a worktree in one command
152
+ tmux new-window 'phantom create new-feature --shell'
153
+ ```
154
+
155
+ This single line:
156
+ 1. Creates a new Git worktree for `new-feature` ✨
157
+ 2. Opens a new tmux window 🪟
158
+ 3. Starts an interactive shell in the new worktree 🚀
159
+
160
+ When developing multiple features in parallel, you can manage each feature in its own tmux window.
161
+
162
+ ### VS Code Integration
163
+
164
+ ```bash
165
+ # Create a worktree and immediately open it in VS Code
166
+ phantom create feature-auth
167
+ phantom exec feature-auth code .
168
+ ```
169
+
170
+ ### Parallel Development Workflow
171
+
172
+ ```bash
173
+ # When a bug report comes in during feature development
174
+ phantom create hotfix-critical # Create worktree for the fix
175
+ phantom shell hotfix-critical # Start working immediately
176
+
177
+ # After fixing, return to your feature
178
+ exit # Exit the hotfix shell
179
+ phantom shell feature-awesome # Continue feature development
180
+ ```
181
+
136
182
  ## 🔄 Phantom vs Git Worktree
137
183
 
138
184
  | Feature | Git Worktree | Phantom |
@@ -183,10 +229,10 @@ To release a new version of Phantom:
183
229
  ```bash
184
230
  # For patch releases (bug fixes)
185
231
  npm version patch
186
-
232
+
187
233
  # For minor releases (new features)
188
234
  npm version minor
189
-
235
+
190
236
  # For major releases (breaking changes)
191
237
  npm version major
192
238
  ```
@@ -208,7 +254,7 @@ To release a new version of Phantom:
208
254
  --title "Phantom v<version>" \
209
255
  --generate-notes \
210
256
  --target main
211
-
257
+
212
258
  # Example for v0.1.3:
213
259
  gh release create v0.1.3 \
214
260
  --title "Phantom v0.1.3" \