fix: auto-install CLI and auto-login instead of manual commands#21
fix: auto-install CLI and auto-login instead of manual commands#21
Conversation
Design spec for migrating skills repo from curl/API to ListenHub CLI, adding slides and music skills, and rebranding as ListenHub CLI Skills. Part of marswaveai/listenhub-ralph#44
…tency - Add API auth isolation section (OpenAPI API-Key vs CLI OAuth/JWT) - Confirm podcast two-step is OpenAPI-only, remove from CLI migration - Delete all shared/ API docs, inline content-parser dependencies - Fix skip-audio semantic asymmetry between slides and explainer - Add --speaker-id to all speaker-supporting skills consistently - Add --lang to image-gen CLI mapping - Add music --status enum values - Clarify creator/ migration: auto-benefits + explicit template updates - Update implementation steps with content-parser inlining and shared/ cleanup
- Keep project name as "ListenHub Skills" (no rename) - listenhub/SKILL.md becomes identical to listenhub-cli/SKILL.md (not deprecated, just different name field) - Update implementation steps accordingly
14-task plan covering shared CLI docs, new slides/music skills, podcast/tts/explainer/image-gen migration, content-parser inlining, umbrella skill, shared/ cleanup, creator update, and README update. Part of marswaveai/listenhub-ralph#44
…d config-pattern - content-parser/SKILL.md: inline all API docs (auth, endpoints, polling, errors) - shared/speaker-selection.md: replace curl speaker fetch with CLI command - shared/config-pattern.md: replace API Key Check with CLI Auth Check
- slides/SKILL.md: slide deck generation (storybook mode=slides) - music/SKILL.md: AI music generation and covers
- podcast: remove two-step (OpenAPI-only), one-step via CLI - tts: quick + script modes via CLI - explainer: single CLI command replaces two polling loops - image-gen: CLI handles file upload natively, remove base64 logic
- listenhub-cli/SKILL.md: new umbrella router with full routing table - listenhub/SKILL.md: identical content (alias), no longer deprecated - Delete DEPRECATED.md
Delete 8 files: api-podcast, api-tts, api-image, api-storybook, api-content-extract, api-speakers, authentication, common-patterns
…mmands All skills that depend on listenhub CLI now auto-install via `npm install -g @marswave/listenhub-cli` and auto-login via `listenhub auth login` when dependencies are missing. Updated: - shared/cli-authentication.md (core auth check logic) - shared/cli-patterns.md (error handling table) - shared/config-pattern.md - All 8 skill files that reference CLI auth
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.
| "model": "gemini-3-pro-image-preview", | ||
| "prompt": "<generated prompt>", | ||
| "imageConfig": {"imageSize": "2K", "aspectRatio": "<ratio>"} | ||
| }') |
There was a problem hiding this comment.
Creator image parsing uses old API response format
High Severity
The image generation command was updated from curl to listenhub image create --json, but the response parsing on line 291 still extracts candidates[0].content.parts[0].inlineData.data — the old curl/API response format. Per image-gen/SKILL.md, the CLI returns {imageUrl: "..."}, and images are fetched via listenhub download. The entire base64 decode block is stale and will fail to extract any image data from the CLI's JSON output.
Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.
|
|
||
| rm /tmp/creator-tts-request.json | ||
| listenhub tts create --text "$(cat /tmp/lh-content.txt)" --speaker "$SPEAKER_ID" --json \ | ||
| | jq -r '.data' | base64 -D > "{slug}-narration/audio.mp3" |
There was a problem hiding this comment.
Creator TTS incorrectly parses CLI output as base64
High Severity
The TTS command was migrated to listenhub tts create --json but the output is piped through jq -r '.data' | base64 -D, assuming the CLI returns base64-encoded audio. Per shared/cli-patterns.md, the TTS CLI returns JSON with an audioUrl field. The response needs to be parsed for audioUrl and downloaded separately. Additionally, base64 -D is macOS-only — on Linux it would need base64 -d.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.


Summary
listenhubCLI now auto-install and auto-login when the dependency is missingnpm install -g @marswave/listenhub-cli— do it for themlistenhub auth login— run it directlyFiles changed (11)
shared/cli-authentication.md— rewrote auth check to auto-install + auto-loginshared/cli-patterns.md— error table: "command not found" → auto-installshared/config-pattern.md— reference updatedlistenhub/SKILL.md,listenhub-cli/SKILL.md— "guide user" → "auto-install"tts/SKILL.md,podcast/SKILL.md,music/SKILL.md,image-gen/SKILL.md,explainer/SKILL.md,slides/SKILL.md— "stop and guide" → "auto-install and auto-login"Follows up on
PR #19 (CLI migration)
Note
Medium Risk
Medium risk because it changes prerequisite/auth flows for multiple CLI-based skills, introducing automatic
npm install -gand OAuth login behavior that can affect user environments and execution reliability.Overview
Switches CLI-based skills to automatically ensure prerequisites by running
npm install -g @marswave/listenhub-cliwhenlistenhubis missing and invokinglistenhub auth loginwhen not authenticated (via updatedshared/cli-authentication.mdandshared/config-pattern.md).Updates all affected skills (e.g.,
/podcast,/tts,/explainer,/image-gen,/slides,/music, and thelistenhub/listenhub-clirouter) to reference this new behavior, and refreshes docs to reflect CLI-first setup while keeping/content-parserAPI-key based with inlined API reference.Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.