SA

sunapp-ai/sun-to-spotify

开发工具
66 stars 质量 40 趋势 40

Turn any topic, question, or feed into a — and listen to it in Spotify or your favorite podcast app.

概览

Turn any topic, question, or feed into a — and listen to it in Spotify or your favorite podcast app. What's the latest in voice and audio AI? Give me a 10-minute roundup. What's happening in the stock market this morning? Make it a 5-minute brief. Give me my daily brief based on my calendar for the next 30 minutes. Summarize The Hard Thing About Hard Things as a 20-minute podcast. How should I think about marketing my B2B startup? Give me a 15-minute deep dive. Sun handles everything: research, script writing, multi-speaker dialogue, audio mixing, and publishing. The result lands in your Spotify library, ready to play from any device. Install the Sun CLI by running https://sunapp-ai.github.io/sun-to-spotify/install.sh

README

Sun to Spotify

Turn any topic, question, or feed into a dialogue podcast — and listen to it in Spotify or your favorite podcast app.

Just say:

What’s the latest in voice and audio AI? Give me a 10-minute roundup.

What’s happening in the stock market this morning? Make it a 5-minute brief.

Give me my daily brief based on my calendar for the next 30 minutes.

Summarize The Hard Thing About Hard Things as a 20-minute podcast.

How should I think about marketing my B2B startup? Give me a 15-minute deep dive.

Sun handles everything: research, script writing, multi-speaker dialogue, audio mixing, and publishing. The result lands in your Spotify library, ready to play from any device.


Quick Start

1. Install the CLI

Prompt your agent to install the CLI:

Install the Sun CLI by running https://sunapp-ai.github.io/sun-to-spotify/install.sh

Or install manually:

curl -fsSL https://sunapp-ai.github.io/sun-to-spotify/install.sh | bash

The installer picks the first available Python package manager — uv (preferred), then pipx, then pip --user — and installs sun-cli from PyPI. Python 3.10+ required.

uv tool install 'sun-cli>=0.2.1'   # manual: places sun at ~/.local/bin/sun
pipx install 'sun-cli>=0.2.1'      # isolated venv
pip  install 'sun-cli>=0.2.1'      # standard install

2. Install the skill

The sun-to-spotify skill teaches Claude Code how to drive the CLI. Drop it into your Claude Code skills directory:

# Project-scoped (only available inside this repo)
git clone https://github.com/sunapp-ai/sun-to-spotify .claude/skills/sun-to-spotify

# User-scoped (available in every project)
git clone https://github.com/sunapp-ai/sun-to-spotify ~/.claude/skills/sun-to-spotify

Claude Code picks up the skill on the next session.

3. Authenticate

sun login

Opens your browser to sign in or create a free account. One-time for typical use — the CLI caches credentials; tokens refresh automatically. For CI or headless hosts, set SUN_TOKEN or copy credentials from a machine where you ran sun login once (see references/cli-usage.md).

sun whoami    # check who's logged in
sun logout    # forget cached session

4. Ask for whatever you want to hear

The skill handles generation, polling, and download automatically — login, job creation, status checks, and saving the manifest plus per-segment MP3s locally.

5. Save to Spotify

When generation finishes, the skill can offer to publish your podcast to Spotify. Install the save-to-spotify skill or CLI. That path is upload-only (Sun already produced the audio); for richer Spotify packaging (cover art, in-player timeline, and so on), use save-to-spotify directly.


Personal API tokens

sun tokens create     # mint a token (name: ^[a-z0-9-]+$, 1-64 chars)
sun tokens list
sun tokens revoke 

The full secret is printed once at creation. Token shape: sk_live__.


CLI reference

Command What it does
sun login Sign in via browser
sun whoami Check who’s logged in
sun logout Forget cached session
sun tokens create Mint a personal API token
sun tokens list List your tokens
sun tokens revoke Revoke a token
sun audio create Start a podcast generation job
sun audio status Check job status (PENDING, PROCESSING, SUCCESS, ERROR)
sun audio get Print manifest or download finished audio (stream with --partial)

sun courses ... still works as a hidden alias for backwards compatibility — it prints a one-line deprecation warning on stderr. Use sun audio in new scripts.

audio create flags

Flag Description
--prompt TEXT What to generate (1-4000 chars)
--input PATH Read prompt from a file
--duration-minutes N Length in minutes (5-120, default 30)
--voice-id UUID Optional voice override
--callback-url URL Optional HTTPS URL the server POSTs to as each episode finishes
--wait Block until done
--json Machine-readable JSON output

audio get

sun audio get                        # manifest JSON to stdout
sun audio get  --out ./dir           # overview.json + cover. + episodes/NNN-.mp3
sun audio get  --partial --out ./dir # works mid-generation; fills in episodes as they finish

Signed segment URLs are re-signed on each fetch — do not cache audio_url values long-term.

JSON mode

Every command supports --json for scripting. Errors emit {"error": {"code": "...", "message": "..."}} and a non-zero exit. See references/cli-usage.md for exit codes and troubleshooting.


Environment variables

Variable Purpose
SUN_TOKEN API token for CI / non-interactive use (overrides the credentials file)

Error codes (quick)

HTTP error.code Meaning
401 unauthorized Missing / invalid / revoked token
403 forbidden Anonymous user trying to mint a token — complete email login
404 not_found Wrong id or not your resource
409 conflict / not_ready Duplicate token name, or get before SUCCESS (or use --partial)
422 validation_error Fix request body
429 rate_limit_exceeded Respect Retry-After
500 internal_error Safe to retry with backoff

Read error.code, not only HTTP status (409 covers multiple cases).


Repository layout


View this README on GitHub

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add sunapp-ai/sun-to-spotify