Skip to content

fix: auto-install CLI and auto-login instead of manual commands#21

Closed
0xFANGO wants to merge 14 commits intomainfrom
fix/auto-install-cli
Closed

fix: auto-install CLI and auto-login instead of manual commands#21
0xFANGO wants to merge 14 commits intomainfrom
fix/auto-install-cli

Conversation

@0xFANGO
Copy link
Copy Markdown
Collaborator

@0xFANGO 0xFANGO commented Apr 8, 2026

Summary

  • All skills that depend on listenhub CLI now auto-install and auto-login when the dependency is missing
  • Never ask users to manually run npm install -g @marswave/listenhub-cli — do it for them
  • Never ask users to manually run listenhub auth login — run it directly

Files changed (11)

  • shared/cli-authentication.md — rewrote auth check to auto-install + auto-login
  • shared/cli-patterns.md — error table: "command not found" → auto-install
  • shared/config-pattern.md — reference updated
  • listenhub/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 -g and 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-cli when listenhub is missing and invoking listenhub auth login when not authenticated (via updated shared/cli-authentication.md and shared/config-pattern.md).

Updates all affected skills (e.g., /podcast, /tts, /explainer, /image-gen, /slides, /music, and the listenhub/listenhub-cli router) to reference this new behavior, and refreshes docs to reflect CLI-first setup while keeping /content-parser API-key based with inlined API reference.

Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.

0xFANGO added 14 commits April 8, 2026 10:15
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
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread creator/SKILL.md
"model": "gemini-3-pro-image-preview",
"prompt": "<generated prompt>",
"imageConfig": {"imageSize": "2K", "aspectRatio": "<ratio>"}
}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.

Comment thread creator/SKILL.md

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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 878ba3c. Configure here.

@0xFANGO 0xFANGO closed this Apr 8, 2026
@0xFANGO 0xFANGO deleted the fix/auto-install-cli branch April 8, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant