🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@marswave/listenhub-cli

Package Overview
Dependencies
Maintainers
6
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marswave/listenhub-cli

Command-line interface for ListenHub

latest
Source
npmnpm
Version
0.0.12
Version published
Weekly downloads
111
-81.19%
Maintainers
6
Weekly downloads
 
Created
Source

ListenHub CLI

Command-line interface for ListenHub — create podcasts, text-to-speech, explainer videos, storybooks, AI images, music, and videos from your terminal.

中文文档

Built on @marswave/listenhub-sdk.

Install

npm install -g @marswave/listenhub-cli

Requires Node.js >= 20.

Two Ways to Authenticate

OAuth LoginOpenAPI Key
Setuplistenhub auth login (opens browser)Set LISTENHUB_API_KEY env var or run listenhub openapi config set-key
Commandslistenhub podcast, listenhub tts, listenhub music, etc.listenhub openapi podcast, listenhub openapi tts, etc.
Best forInteractive use, account managementScripts, CI/CD, programmatic access
Token storage~/.config/listenhub/credentials.json~/.config/listenhub/openapi.json or env var

Both methods provide access to the same underlying APIs. Choose whichever fits your workflow.

Quick Start — OAuth

# Log in via browser
listenhub auth login

# Create a podcast
listenhub podcast create --query "AI agent trends in 2026" --mode quick

# Generate music
listenhub music generate --prompt "Chill lo-fi beats" --style "lo-fi" --title "Study Session"

# Text-to-speech
listenhub tts create --text "Hello, world" --lang en

# Generate an AI image
listenhub image create --prompt "a dragon in watercolor style" --reference ./sketch.png

Quick Start — OpenAPI Key

# Set your API key (one-time)
export LISTENHUB_API_KEY="lh_sk_..."
# Or interactively:
listenhub openapi config set-key

# List speakers
listenhub openapi speakers list --language zh

# Text-to-speech (binary audio output)
listenhub openapi tts --text "Hello world" --voice <speaker-id> --output hello.mp3

# Create a podcast
listenhub openapi podcast create \
  --source-text "Quantum computing is changing cryptography" \
  --speaker-id <speaker-id> --no-wait -j

# Check subscription credits
listenhub openapi subscription -j

OAuth Commands

Auth

CommandDescription
listenhub auth loginLog in via browser OAuth
listenhub auth logoutLog out and revoke tokens
listenhub auth statusShow current login status

Music

CommandDescription
listenhub music generateGenerate music from a text prompt
listenhub music coverCreate a cover from reference audio
listenhub music extendExtend music from reference audio
listenhub music remixRemix an existing song with new lyrics
listenhub music instrumentalGenerate a standalone instrumental
listenhub music soundtrackGenerate music from an image or video
listenhub music trackGenerate a single instrument/vocal track
listenhub music recognizeRecognize lyrics (with timestamps) from audio
listenhub music describeAnalyze audio (description, tags, genres, instruments)
listenhub music stemSeparate audio into stems (download URLs)
listenhub music listList music tasks
listenhub music get <id>Get music task details

Content Creation

CommandDescription
listenhub podcast createCreate a podcast episode
listenhub podcast listList podcast episodes
listenhub tts createCreate text-to-speech audio
listenhub tts listList TTS creations
listenhub explainer createCreate an explainer video
listenhub explainer listList explainer videos
listenhub slides createCreate a slide deck
listenhub slides listList slide decks

Images

CommandDescription
listenhub image createGenerate an AI image
listenhub image listList AI images
listenhub image get <id>Get image details
listenhub image delete <id...>Delete one or more AI images

Video Generation

CommandDescription
listenhub video createCreate a video generation task
listenhub video listList video tasks
listenhub video get <id>Get video task details
listenhub video estimateEstimate credit cost

Lyrics

CommandDescription
listenhub lyrics extract <id>Extract lyrics from a creation

Other

CommandDescription
listenhub speakers listList available speakers
listenhub creation get <id>Get creation details
listenhub creation delete <id...>Delete creations

OpenAPI Key Commands

All commands below are under listenhub openapi.

Config

CommandDescription
openapi config set-keySet API key interactively
openapi config showShow current key status
openapi config clearRemove stored key

Speakers

CommandDescription
openapi speakers listList available speakers (filterable by --language)

TTS & Speech

CommandDescription
openapi ttsText-to-speech, saves audio file locally
openapi audio-speechTTS (OpenAI-compatible endpoint)
openapi speechCreate speech, returns audio URL

Flow Speech

CommandDescription
openapi flow-speech createCreate flow speech from URLs/text
openapi flow-speech get <id>Get flow speech details
openapi flow-speech ttsCreate flow speech from scripts
openapi flow-speech text-stream <id>Stream generated text (SSE)

Podcast

CommandDescription
openapi podcast createCreate a podcast episode
openapi podcast get <id>Get podcast details
openapi podcast text-contentGenerate text only (no audio)
openapi podcast generate-audio <id>Generate audio for existing text
openapi podcast text-stream <id>Stream generated text (SSE)

Storybook

CommandDescription
openapi storybook createCreate a storybook/explainer
openapi storybook get <id>Get storybook details
openapi storybook generate-video <id>Generate video for storybook

Image

CommandDescription
openapi image createGenerate an AI image (supports local file + URL references)

Video

CommandDescription
openapi video createCreate video generation task
openapi video get <id>Get video task details
openapi video listList video tasks
openapi video estimateEstimate credit cost

Content

CommandDescription
openapi content extractExtract content from a URL
openapi content get <id>Get extraction result

Subscription

CommandDescription
openapi subscriptionShow credits and plan info

Common Options

All commands support:

  • --json / -j — Output JSON instead of human-readable text
  • --help / -h — Show help

Creation commands also support:

  • --no-wait — Return the ID immediately without polling
  • --timeout <seconds> — Polling timeout (default varies by command)

Local File Support

OAuth commands (music cover, image create, video create) auto-detect local paths, validate format/size, and upload to cloud storage before calling the API.

OpenAPI image create supports local file references via base64 encoding (no size limit enforced by CLI).

# OAuth: local audio for cover (mp3, wav, flac, m4a, ogg, aac; max 20MB)
listenhub music cover --audio ./song.mp3

# OAuth: local image reference (jpg, png, webp, gif; max 10MB)
listenhub image create --prompt "inspired by this" --reference ./photo.jpg

# OpenAPI: local image reference (base64 encoded)
listenhub openapi image create --prompt "in this style" --reference ./sketch.png --provider google

# URLs are passed through directly in both modes
listenhub openapi video create --prompt "same style" --reference-video https://example.com/clip.mp4 --input-video-duration 5

Examples

OpenAPI: Podcast workflow (text → audio)

# Step 1: Generate text content
listenhub openapi podcast text-content \
  --source-url https://example.com/article \
  --speaker-id voice-clone-xxx \
  --no-wait -j
# Returns: {"episodeId": "abc123"}

# Step 2: Check status
listenhub openapi podcast get abc123 -j

# Step 3: Generate audio from text
listenhub openapi podcast generate-audio abc123

# Step 4: Stream the script
listenhub openapi podcast text-stream abc123 --event script

OpenAPI: Video generation

# Text-to-video
listenhub openapi video create --prompt "A cat playing piano" --no-wait -j

# With first frame
listenhub openapi video create --prompt "Camera zooms out" \
  --first-frame https://example.com/frame.png

# Estimate credits before creating
listenhub openapi video estimate --model doubao-seedance-2-pro --resolution 1080p --duration 10

OAuth: Music generation

# Generate with style
listenhub music generate --prompt "Upbeat electronic dance" --style "EDM" --title "Night Drive"

# Instrumental only
listenhub music generate --prompt "Peaceful piano melody" --instrumental

# Cover from local file
listenhub music cover --audio ./original.mp3 --title "My Remix"

# Remix an existing song with new lyrics (file, --audio-url, or --provider-song-id)
listenhub music remix ./original.mp3 --lyrics "New verse..." --prompt "Lo-fi hip hop"

# Standalone instrumental (--prompt XOR --reference-audio)
listenhub music instrumental --prompt "Cinematic orchestral build-up" --model mureka-8

# Soundtrack from an image or video (--image XOR --video)
listenhub music soundtrack --image ./cover.png --prompt "Dreamy synthwave"

# Single instrument/vocal track (--audio XOR --provider-song-id)
listenhub music track ./song.mp3 --generate-type Drums --prompt "Punchy breakbeat"
listenhub music track --provider-song-id abc123 --generate-type Vocals \
  --prompt "Soulful chorus" --lyrics "Hold on..." --vocal-gender female

# Sync analysis commands (print immediately)
listenhub music recognize --audio ./song.mp3
listenhub music describe --audio ./song.mp3
listenhub music stem --audio ./song.mp3 --model audio-separation-2

JSON output for scripting

# Get ID without waiting, then poll
ID=$(listenhub openapi flow-speech create \
  --source-text "Some article content" \
  --speaker-id voice-xxx \
  --no-wait -j | jq -r '.episodeId')

listenhub openapi flow-speech get "$ID" -j

Development

git clone https://github.com/marswaveai/listenhub-cli.git
cd listenhub-cli
pnpm install
pnpm run dev    # TypeScript watch mode
pnpm run build  # Build for distribution
pnpm test       # Run tests
pnpm run lint   # Lint

License

MIT

FAQs

Package last updated on 09 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts