Commit b2d5110
committed
feat(cli): bare \
When hooks are installed and their target dir exists, bare \`enchanter\`
auto-tails the Claude Code hook JSONL instead of running the showcase
loop. This is the v0.7-direction UX: install hooks once → bare
\`enchanter\` shows REAL events from real Claude work, no synthetic
emitter, no manual --tail flag.
New default_command() priority:
1. stdin piped → Inspect from stdin (back-compat)
2. stdin TTY + ~/.cache/enchanter/ exists → Inspect --tail of the
hook JSONL (NEW — preferred when hooks are wired up)
3. stdin TTY + scripts/live.ts reachable → Live showcase (existing
fallback for monorepo dev / demo)
4. stdin TTY + nothing → synthetic demo (last-resort emitter)
The detection trigger is "parent dir exists" rather than "JSONL file
exists" — the file may not appear until the next Claude session fires
a hook, and --tail's 30s late-creation retry handles the wait. So
running \`enchanter\` immediately after installing hooks Just Works.
Showcase loop still available via \`enchanter live\` explicit subcommand.enchanter\ prefers real Claude hook stream over showcase1 parent f1fc5fa commit b2d5110
1 file changed
Lines changed: 45 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
155 | 167 | | |
156 | 168 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
167 | 178 | | |
168 | 179 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
173 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
174 | 205 | | |
175 | 206 | | |
176 | 207 | | |
| |||
0 commit comments