@sooink/ai-session-tidy 0.1.1 → 0.1.3

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.ko.md CHANGED
@@ -31,21 +31,27 @@
31
31
  └── file-history/ # 방치된 Rewind 스냅샷
32
32
  ```
33
33
 
34
- Claude Code는 30일 오래된 세션을 삭제하지만, **Cursor는 자동 정리 기능이 없습니다.** Claude Code도 30일간은 방치된 데이터가 남아있습니다.
34
+ 특히 **git worktree 워크플로우**에서 문제가 심각해집니다. 브랜치가 자주 생성되고 삭제되면서 세션 데이터가 빠르게 쌓이기 때문입니다.
35
35
 
36
- **이 도구는 방치된 세션을 즉시 찾아서 정리합니다.**
36
+ Claude Code는 30일 후 오래된 세션을 삭제하지만, **Cursor는 자동 정리 기능이 없습니다.** Claude Code도 30일간은 방치된 데이터가 남아있습니다. worktree를 삭제할 때마다 수동으로 정리하는 건 번거롭습니다.
37
+
38
+ **이 도구는 방치된 세션을 자동으로 감지하고 정리합니다.**
39
+ `watch start`를 한 번만 실행하면 백그라운드에서 프로젝트 삭제를 감시하고 자동으로 정리합니다.
37
40
 
38
41
  ## 빠른 시작
39
42
 
40
43
  ```bash
41
44
  npm install -g @sooink/ai-session-tidy
42
45
 
46
+ # 자동 정리 (권장)
47
+ ai-session-tidy watch start
48
+
49
+ # 수동 정리
43
50
  ai-session-tidy # 방치된 세션 스캔
44
51
  ai-session-tidy clean # 휴지통으로 이동
45
- ai-session-tidy watch start # 자동 정리 데몬
46
52
  ```
47
53
 
48
- ![Demo](assets/demo.gif)
54
+ ![Demo](https://raw.githubusercontent.com/sooink/ai-session-tidy/main/assets/demo.gif)
49
55
 
50
56
  ## 활용 사례
51
57
 
@@ -86,7 +92,7 @@ git worktree remove ../feature # watch가 감지 → 5분 후 정리
86
92
 
87
93
  ### `scan` (기본)
88
94
 
89
- 삭제 없이 방치된 세션을 찾습니다.
95
+ 삭제 없이 방치된 세션을 찾습니다. `ai-session-tidy`만 실행하면 `ai-session-tidy scan`과 동일합니다.
90
96
 
91
97
  ```bash
92
98
  ai-session-tidy # 기본 스캔
@@ -94,18 +100,49 @@ ai-session-tidy -v # 상세 출력
94
100
  ai-session-tidy --json # JSON 출력
95
101
  ```
96
102
 
103
+ <details>
104
+ <summary><code>-v</code> 출력 예시</summary>
105
+
106
+ ```
107
+ ⚠ Found 2 session folder(s) + 1 config entry(ies) + 3 session-env folder(s) (156.2 MB)
108
+
109
+ ┌─────────────┬──────────┬────────┬─────┬───────┬─────────┬──────────┬───────────┐
110
+ │ Tool │ Sessions │ Config │ Env │ Todos │ History │ Size │ Scan Time │
111
+ ├─────────────┼──────────┼────────┼─────┼───────┼─────────┼──────────┼───────────┤
112
+ │ claude-code │ 2 │ 1 │ 3 │ - │ - │ 156.2 MB │ 45ms │
113
+ └─────────────┴──────────┴────────┴─────┴───────┴─────────┴──────────┴───────────┘
114
+
115
+ Session Folders:
116
+
117
+ [claude-code] deleted-project (128.5 MB)
118
+ → /Users/you/deleted-project
119
+ Modified: 1/15/2025
120
+
121
+ [claude-code] old-worktree (27.7 MB)
122
+ → /Users/you/old-worktree
123
+ Modified: 1/10/2025
124
+
125
+ Config Entries (~/.claude.json):
126
+
127
+ [config] deleted-project
128
+ → /Users/you/deleted-project
129
+ Cost: $1.25 | Tokens: 150K in / 12K out
130
+ ```
131
+
132
+ </details>
133
+
97
134
  ### `clean`
98
135
 
99
136
  방치된 세션을 삭제합니다.
100
137
 
101
138
  ```bash
102
139
  ai-session-tidy clean # 휴지통으로 이동 (확인 필요)
103
- ai-session-tidy clean -i # 대화형 선택
104
- ai-session-tidy clean -f # 확인 생략
140
+ ai-session-tidy clean -i # 대화형 선택 (TTY 필요)
141
+ ai-session-tidy clean -f # 확인 생략 (스크립트/CI용)
105
142
  ai-session-tidy clean -n # 드라이런 (삭제 대상만 표시)
106
143
  ```
107
144
 
108
- ![Interactive Clean](assets/demo-interactive.gif)
145
+ ![Interactive Clean](https://raw.githubusercontent.com/sooink/ai-session-tidy/main/assets/demo-interactive.gif)
109
146
 
110
147
  ### `watch`
111
148
 
@@ -124,14 +161,19 @@ ai-session-tidy watch status -l # 최근 로그 표시
124
161
  설정을 관리합니다.
125
162
 
126
163
  ```bash
127
- ai-session-tidy config show # 전체 설정 보기
128
- ai-session-tidy config paths add ~/projects # 감시 경로 추가
129
- ai-session-tidy config paths list # 감시 경로 목록
130
- ai-session-tidy config delay 1 # 정리 딜레이 설정 (분)
131
- ai-session-tidy config depth 5 # 감시 깊이 설정
132
- ai-session-tidy config reset # 기본값으로 초기화
164
+ ai-session-tidy config show # 전체 설정 보기
165
+ ai-session-tidy config path add ~/projects # 감시 경로 추가
166
+ ai-session-tidy config path list # 감시 경로 목록
167
+ ai-session-tidy config ignore add ~/backup # 제외 경로 추가
168
+ ai-session-tidy config ignore list # 제외 경로 목록
169
+ ai-session-tidy config delay 1 # 정리 딜레이 설정 (분)
170
+ ai-session-tidy config depth 5 # 감시 깊이 설정
171
+ ai-session-tidy config reset # 기본값으로 초기화
133
172
  ```
134
173
 
174
+ > [!TIP]
175
+ > 숨김 폴더 (`.git`, `.cache` 등)와 macOS 시스템 폴더 (`Library`, `Music` 등)는 자동으로 제외됩니다.
176
+
135
177
  ## 정리 대상
136
178
 
137
179
  ### Claude Code
package/README.md CHANGED
@@ -29,21 +29,27 @@ When you delete, move, or rename a project, the session data becomes orphaned:
29
29
  └── file-history/ # Orphaned rewind snapshots
30
30
  ```
31
31
 
32
- While Claude Code cleans up old sessions after 30 days, **Cursor has no automatic cleanup**. And even with Claude Code, you're left with orphaned data for up to a month.
32
+ This becomes especially problematic with **git worktree workflows**, where branches are frequently created and removed—each leaving behind session data that accumulates quickly.
33
33
 
34
- **This tool finds and cleans up orphaned sessions immediately.**
34
+ While Claude Code cleans up old sessions after 30 days, **Cursor has no automatic cleanup**. And even with Claude Code, you're left with orphaned data for up to a month. Manually cleaning up after each worktree removal is tedious.
35
+
36
+ **This tool detects orphaned sessions automatically and cleans them up.**
37
+ Just run `watch start` once—it monitors in the background and cleans up as projects are deleted.
35
38
 
36
39
  ## Quick Start
37
40
 
38
41
  ```bash
39
42
  npm install -g @sooink/ai-session-tidy
40
43
 
44
+ # Automatic cleanup (recommended)
45
+ ai-session-tidy watch start
46
+
47
+ # Manual cleanup
41
48
  ai-session-tidy # Scan for orphaned sessions
42
49
  ai-session-tidy clean # Move to trash
43
- ai-session-tidy watch start # Auto-cleanup daemon
44
50
  ```
45
51
 
46
- ![Demo](assets/demo.gif)
52
+ ![Demo](https://raw.githubusercontent.com/sooink/ai-session-tidy/main/assets/demo.gif)
47
53
 
48
54
  ## Use Cases
49
55
 
@@ -84,7 +90,7 @@ This multiplies session data accumulation. Watch mode keeps your system clean au
84
90
 
85
91
  ### `scan` (default)
86
92
 
87
- Find orphaned sessions without deleting.
93
+ Find orphaned sessions without deleting. Running `ai-session-tidy` without a command is equivalent to `ai-session-tidy scan`.
88
94
 
89
95
  ```bash
90
96
  ai-session-tidy # Basic scan
@@ -92,18 +98,49 @@ ai-session-tidy -v # Verbose output
92
98
  ai-session-tidy --json # JSON output
93
99
  ```
94
100
 
101
+ <details>
102
+ <summary>Example output with <code>-v</code></summary>
103
+
104
+ ```
105
+ ⚠ Found 2 session folder(s) + 1 config entry(ies) + 3 session-env folder(s) (156.2 MB)
106
+
107
+ ┌─────────────┬──────────┬────────┬─────┬───────┬─────────┬──────────┬───────────┐
108
+ │ Tool │ Sessions │ Config │ Env │ Todos │ History │ Size │ Scan Time │
109
+ ├─────────────┼──────────┼────────┼─────┼───────┼─────────┼──────────┼───────────┤
110
+ │ claude-code │ 2 │ 1 │ 3 │ - │ - │ 156.2 MB │ 45ms │
111
+ └─────────────┴──────────┴────────┴─────┴───────┴─────────┴──────────┴───────────┘
112
+
113
+ Session Folders:
114
+
115
+ [claude-code] deleted-project (128.5 MB)
116
+ → /Users/you/deleted-project
117
+ Modified: 1/15/2025
118
+
119
+ [claude-code] old-worktree (27.7 MB)
120
+ → /Users/you/old-worktree
121
+ Modified: 1/10/2025
122
+
123
+ Config Entries (~/.claude.json):
124
+
125
+ [config] deleted-project
126
+ → /Users/you/deleted-project
127
+ Cost: $1.25 | Tokens: 150K in / 12K out
128
+ ```
129
+
130
+ </details>
131
+
95
132
  ### `clean`
96
133
 
97
134
  Remove orphaned sessions.
98
135
 
99
136
  ```bash
100
137
  ai-session-tidy clean # Move to trash (with confirmation)
101
- ai-session-tidy clean -i # Interactive selection
102
- ai-session-tidy clean -f # Skip confirmation
138
+ ai-session-tidy clean -i # Interactive selection (TTY only)
139
+ ai-session-tidy clean -f # Skip confirmation (required for scripts/CI)
103
140
  ai-session-tidy clean -n # Dry-run (show what would be deleted)
104
141
  ```
105
142
 
106
- ![Interactive Clean](assets/demo-interactive.gif)
143
+ ![Interactive Clean](https://raw.githubusercontent.com/sooink/ai-session-tidy/main/assets/demo-interactive.gif)
107
144
 
108
145
  ### `watch`
109
146
 
@@ -122,14 +159,19 @@ ai-session-tidy watch status -l # Show recent logs
122
159
  Manage settings.
123
160
 
124
161
  ```bash
125
- ai-session-tidy config show # Show all settings
126
- ai-session-tidy config paths add ~/projects # Add watch path
127
- ai-session-tidy config paths list # List watch paths
128
- ai-session-tidy config delay 1 # Set cleanup delay (minutes)
129
- ai-session-tidy config depth 5 # Set watch depth
130
- ai-session-tidy config reset # Reset to defaults
162
+ ai-session-tidy config show # Show all settings
163
+ ai-session-tidy config path add ~/projects # Add watch path
164
+ ai-session-tidy config path list # List watch paths
165
+ ai-session-tidy config ignore add ~/backup # Add ignore path
166
+ ai-session-tidy config ignore list # List ignore paths
167
+ ai-session-tidy config delay 1 # Set cleanup delay (minutes)
168
+ ai-session-tidy config depth 5 # Set watch depth
169
+ ai-session-tidy config reset # Reset to defaults
131
170
  ```
132
171
 
172
+ > [!TIP]
173
+ > Hidden folders (`.git`, `.cache`, etc.) and macOS system folders (`Library`, `Music`, etc.) are automatically excluded from watching.
174
+
133
175
  ## What Gets Cleaned
134
176
 
135
177
  ### Claude Code
Binary file
package/assets/demo.gif CHANGED
Binary file