Skip to main content
Glama

  1. 拿起遥控器

  2. 打开 Netflix 应用

  3. 搜索节目

  4. 选择季度

  5. 选择单集

  6. 按下播放

约 30 秒

stv play netflix "Dark" s1e1

约 3 秒

没有电视?没问题。 没有配置电视时,stv 会直接在浏览器中打开内容。 Netflix、YouTube、Spotify、Disney+ — 只需 pip install stv 即可开始。


🛋 Vibe 编程与放松

凌晨 2 点 Vibe 编程。Claude 写你的代码。你告诉它放个节目。它照做。

you: play frieren on the living room tv
claude: Playing Frieren s2e8 on Living Room. (3s)

you: bit quieter
claude: Volume → 18.

you: good night
claude: All 3 TVs off.

已经装好 stv?直接告诉 Claude:

# Option 1 — just talk (zero config)
"run stv play netflix Frieren s2e8"

# Option 2 — install the Skill for auto-trigger
clawhub install smartest-tv
# now "play Frieren", "good night", "next episode" just work mid-session

也可作为 MCP 服务器(21 个工具)用于 Claude Code、Codex、Antigravity 及其他 MCP 客户端。


Related MCP server: TVWizard

🎯 只需输入 stv

没有子命令?你会得到一张“正在播放”卡片,以及基于观看历史的三个上下文相关下一步操作—而不是一份 30 条命令的帮助信息堆砌。

$ stv "play dark on netflix"     # natural language works
$ stv play "Frieren"             # auto-detects platform
$ stv next                       # continue last show
$ stv stats                      # → insights

输入无法识别?你会得到友好的提示,而不是报错。


🎨 一款观感如产品般的 CLI

每条命令都以 Catppuccin Mocha 配色、语义图标和真正的视觉层级渲染。更喜欢其他配色?设置 STV_THEME=nord 或 STV_THEME=gruvbox。

--format json 始终可用,以便你通过管道传给 jq。


✨ 它能做什么

🎬 按名称播放

stv play netflix "Dark" s1e1
stv play disney "Percy Jackson" s1e1
stv play prime "The Boys" s1e1
stv play "Frieren" s2e8          # auto-detects platform

说出名称。stv 会找到 ID、打开应用、开始播放。Netflix 和 Apple TV+ 通过解析 HTML 实现;Disney+、Max、Prime、Hulu、Paramount+、Peacock、Crunchyroll 以及 JustWatch 上的所有平台 通过它们的 API 实现—无需登录,无需 API 密钥。省略平台名称时,stv 会自动检测它在你的地区由哪个平台提供流媒体播放。

🔗 投射任意 URL

stv cast https://youtu.be/dQw4w
stv cast https://netflix.com/watch/...
stv cast https://open.spotify.com/...

朋友发来链接。粘贴进去。电视上播放。

🎵 队列与派对

stv queue add youtube "Gangnam Style"
stv queue add spotify "Blinding Lights"
stv queue play

每个人添加自己的选择。电视按顺序播放。

🎭 场景预设

stv scene movie-night   # volume 20, cinema
stv scene kids          # volume 15, Cocomelon
stv scene sleep         # rain sounds, auto-off

一条命令搞定氛围。

🔊 多房间音频

stv audio play "lo-fi beats"
stv audio volume kitchen 30
stv audio stop

屏幕关闭。音乐无处不在。免费 Sonos。

📺 电视作显示屏

stv display message "Dinner!"
stv display clock
stv display dashboard "Temp:22°C"

仪表盘、时钟、标牌。$0/月。

📊 观看洞察

stv insights
stv screen-time
stv sub-value netflix --cost 17.99

你的 Netflix 每月 18 美元值不值?

🌐 同步派对

stv --all play youtube "lo-fi beats"
stv --group party play netflix "Wed..."
stv --all off   # good night

每台电视同时播放。远方的朋友也能同步。

🤖 AI 礼宾服务

"Play something chill"
→ tv_recommend → tv_play
→ Playing The Queen's Gambit

21 个 MCP 工具。一句话就够。


🤖 让你的 AI 控制电视

stv 是一个 MCP 服务器。Claude、GPT、Cursor 或任何 MCP 客户端都可以用自然语言控制你的电视。

设置(一行):

{
  "mcpServers": {
    "tv": {
      "command": "uvx",
      "args": ["stv"]
    }
  }
}

或通过 OpenClaw:

clawhub install smartest-tv

然后直接说:

You: "I just got home, set up movie night"

Claude: 🎬 Movie night activated.
  Volume → 20, cinema mode on.
  
  Based on your history:
  1. The Queen's Gambit (Netflix)
  2. Ozark (Netflix)
  3. Squid Game S2 (Netflix)

You: "Play 1, put a clock on kitchen TV"

Claude: ✓ Playing The Queen's Gambit
         ✓ Clock on kitchen TV

类别

工具

功能

播放

tv_play

按名称搜索并播放

tv_cast

投射任意 URL

tv_next

继续观看

tv_launch

按 ID 启动应用

tv_resolve

仅获取内容 ID

发现

tv_whats_on

热门内容

tv_recommend

个性化推荐

控制

tv_power

开/关

tv_volume

获取/设置/步进/静音

tv_screen

屏幕开/关

tv_notify

Toast 通知

tv_status

当前状态

整理

tv_queue

播放队列

tv_scene

场景预设

tv_history

观看历史

智能

tv_insights

观看统计

tv_display

电视作显示屏

tv_audio

多房间音频

多电视

tv_sync

在所有电视上播放

tv_list_tvs

列出电视

tv_groups

电视分组


📅 stv 的一天

时间

发生的事情

7am

在厨房电视上运行 stv display dashboard "Weather:18°C" "Meeting:10am"

8am

stv scene kids --tv kids-room —— 播放 Cocomelon,音量 15

12pm

朋友发来 Netflix 链接 → stv cast <url>

5pm

stv screen-time → 孩子今天看了 2 小时 15 分钟

6:30pm

stv scene movie-night —— 音量 20,影院模式

7pm

stv recommend --mood chill → 推荐《Ozark》

9pm

stv audio play "friday vibes" -p spotify —— 音乐无处不在

10pm

stv --group party play netflix "Wednesday" s1e1 —— 同步播放

11:30pm

stv scene sleep → stv --all off —— 晚安


🔥 杀手级组合

🌙 睡前自动模式

stv audio play "rain" --rooms bedroom
stv scene sleep
stv --all off

环境音、屏幕关闭、自动定时,其他电视全部关闭。

🎧 免费 Sonos

stv audio play "lo-fi beats"
stv audio volume kitchen 40
stv audio volume bedroom 15

每台电视都是音箱。按房间调节音量。屏幕关闭。

💰 订阅审计

stv sub-value netflix --cost 17.99
# → $8.50/hr — consider canceling

stv sub-value youtube --cost 13.99
# → $1.20/hr — good value

还有 10 种玩法 →



⚙️ 工作原理

  "Play Dark S1E1"
        │
        ▼
  ┌─── Resolution ───┐
  │ Cache → API → Web │  content_id
  │  0.1s   1s    3s  │──────────────▶ 📺 TV plays it
  └───────────────────┘       │
                         Deep link via
                    LG / Samsung / Roku / Android

说出名称。stv 会将其解析为内容 ID,并通过深度链接进入你电视上的应用。无需浏览器自动化,无需 API 密钥,不依赖云端。结果会被缓存,因此重复播放立即完成。


📦 安装

pip install stv                    # LG webOS (default)
pip install "stv[samsung]"         # Samsung Tizen
pip install "stv[android]"         # Android TV / Fire TV
pip install "stv[all]"             # Everything
stv setup                          # auto-discover + pair your TV

支持 LG webOS · Samsung Tizen · Android TV / Fire TV · Roku

Home Assistant(HACS)

hacs_badge

添加为自定义仓库(默认列表审核中:hacs/default#6907):

HACS → ⋮ (top right) → Custom repositories
  URL: https://github.com/Hybirdss/smartest-tv
  Category: Integration → Add
Then: Install → Restart HA
Settings → Integrations → Add → "Smartest TV" → auto-discovers your TVs

Android TV / Fire TV:设置流程会在电视上显示一个 6 位 PIN——在配对表单中输入它即可完成。在 HA OS / HA Container 中设置 STV_CONFIG_DIR=/config/smartest-tv,这样配对在容器重建后依然有效。参见 docs/integrations/home-assistant.md。

然后在自动化中使用:

service: media_player.play_media
target:
  entity_id: media_player.living_room
data:
  media_content_type: stv
  media_content_id: "netflix:Frieren:s2e8"

这能完成 HA 内置 media_player.play_media 做不到的事:按名称解析节目,并深度链接到流媒体应用。电源、音量和播放控制也作为标准的 HA media player 实体正常工作。


🔌 可与以下搭配使用

集成

方式

Home Assistant

HACS 自定义集成 → 带内容解析的 media_player.play_media

Claude Code / Cursor

添加 MCP 配置 → "play Dark s1e1"

OpenClaw

clawhub install smartest-tv → Telegram 机器人

cron

0 7 * * * stv display dashboard ...

Shell 脚本

sleep-mode、party-mode 一行命令

任意 MCP 客户端

21 个工具,stdio 或 HTTP(stv serve)


📚 文档

快速开始

适用于任何电视品牌的设置

播放内容

play、cast、queue、resolve

场景

movie-night、kids、sleep、custom

同步与派对

多电视、远程观看派对

配方

10 种强大的功能组合

AI 智能体

面向 Claude、Cursor、OpenClaw 的 MCP

CLI 参考

所有命令和选项

MCP 工具

全部 21 个工具及参数


🔓 开源

stv 的每一行代码都在 GitHub 上 —— CLI、解析器(Netflix、Apple TV+、YouTube、Spotify、Disney+、Max、Prime Video、Paramount+、Hulu、Peacock、Crunchyroll,以及通过 JustWatch 支持的更多平台)、全部 4 个电视驱动(LG、Samsung、Roku、Android)、缓存、同步引擎、场景,以及全部 253 个测试。流媒体可用性数据由 JustWatch 提供。


🔒 隐私

stv 在你的本地网络上运行。没有遥测、没有分析、没有云同步、不会将你观看的内容回传。没有 posthog、没有 amplitude、没有 sentry、没有 mixpanel —— 去源码里 grep 一下。

一个例外 —— 社区缓存贡献。 当你播放的内容不在本地缓存中时,stv 会解析它(通过网页解析),并将解析出的 ID 提交到共享的社区缓存,这样下一位用户就能立即查询到。这与 Wikipedia 或软件包镜像的模式相同 —— 大量微小的贡献,且都是匿名的。

会发送的内容(后台 HTTPS,发后即忘,绝不会阻塞播放):

  • 平台名称(netflix / youtube / spotify)

  • 内容 slug(例如 frieren)

  • 解析出的内容 ID(Netflix 标题 ID、YouTube 视频 ID、Spotify URI)

不会发送的内容:

  • 你的姓名、电子邮件或任何用户标识

  • 你的 IP 地址(按照标准 HTTP,CDN 会看到一个连接 IP,但客户端从不读取或传输它)

  • 你的观看历史或播放时间戳

  • 你电视的 IP 地址或硬件信息

  • 任何关于你使用 stv 的频率或时间的信息

要完全禁用缓存贡献:

export STV_NO_CONTRIBUTE=1

来源:src/smartest_tv/cache.py —— 搜索 _contribute。


🤝 参与贡献

211 个测试。运行它们不需要电视。

pip install -e ".[dev]"
python -m pytest tests/ -v

Samsung、Roku 和 Android TV 驱动需要真实环境测试。如果你有其中一台,你的反馈很重要。

缓存贡献 · 驱动开发


Available Tools

23 tools
tv_audioTv AudioC

Multi-room audio mode — play music with screens off.

Actions: play, stop, volume.

Inputs: action (required), room, query, rooms, +2 more. Returns: result

tv_castTv CastB

Cast a Netflix/YouTube/Spotify URL to the TV.

Paste any streaming URL. stv parses the platform and content ID automatically.

Inputs: url (required), tv_name. Returns: result

tv_displayTv DisplayB

Turn the TV into a display — show dashboards, messages, clocks, or any URL.

The TV becomes a smart display. HTML is generated and served locally, then opened in the TV's browser.

Inputs: content_type (required), data, port, tv_name. Returns: result

tv_groupsTv GroupsA

List all TV groups and their members.

Inputs: no named parameters. Returns: result

tv_historyTv HistoryC

Show recent play history.

Inputs: limit. Returns: result

tv_insightsTv InsightsB

Get viewing insights, screen time, or subscription value analysis.

Inputs: period, report_type. Returns: result

tv_launchTv LaunchA

Launch an app, optionally with a deep link.

Use tv_play instead if you have a content name (not ID). Use this when you already have the exact content ID.

Inputs: app (required), tv_name, content_id. Returns: result

tv_list_tvsTv List TvsA

List all configured TVs with name, platform, IP, and default status.

Inputs: no named parameters. Returns: result

tv_nextTv NextB

Play the next episode. Continues from watch history.

Inputs: query, tv_name. Returns: result

tv_notifyTv NotifyB

Show a toast notification on the TV screen.

Inputs: message (required), tv_name. Returns: result

tv_playTv PlayB

Find content by name and play it on TV.

This is the primary tool. Resolves the content ID automatically, then deep-links into the app on your TV.

Inputs: query (required), platform (required), season, episode, +2 more. Returns: result

tv_powerTv PowerB

Turn TV on or off.

Inputs: on (required), tv_name. Returns: result

tv_queueTv QueueC

Manage the play queue. Actions: add, show, play, skip, clear.

Inputs: action (required), query, season, episode, +2 more. Returns: result

tv_recommendTv RecommendB

Get personalized recommendations based on watch history + trending.

Inputs: mood, limit. Returns: result

tv_resolveTv ResolveA

Resolve a content name to its platform ID without playing.

Inputs: query (required), platform (required), season, episode, +1 more. Returns: result

tv_sceneTv SceneB

Run or list scene presets. Built-in: movie-night, kids, sleep, music.

Inputs: name, action, tv_name. Returns: result

tv_screenTv ScreenB

Turn screen on or off (audio continues when off).

Inputs: on (required), tv_name. Returns: result

tv_stateTv StateA

Get unified live TV state: playback, volume, input, power.

Returns a single snapshot for agent branching. Fields the target driver cannot supply are returned as None.

Inputs: tv_name. Returns: object

tv_state_watchTv State WatchA

Stream tv_state snapshots via progress notifications.

Emits count progress updates spaced interval seconds apart, then returns the final snapshot. Default is 1 minute of watching.

Inputs: count, tv_name, interval. Returns: object

tv_statusTv StatusB

Get TV status: current app, volume, mute, model, firmware.

Inputs: tv_name. Returns: object

tv_syncTv SyncB

Play content on multiple TVs simultaneously (party mode).

Resolves once, launches on all targets via asyncio.gather.

Inputs: query (required), platform (required), group, season, +3 more. Returns: result

tv_volumeTv VolumeA

Get or set volume, step up/down, or toggle mute. All in one tool.

  • No args: returns current volume + mute status

  • level=25: set volume to 25

  • direction="up"/"down": step volume

  • mute=True/False/None: mute, unmute, or toggle

Inputs: mute, level, tv_name, direction. Returns: result

tv_whats_onTv Whats OnC

Show trending content on Netflix and/or YouTube.

Inputs: limit, platform. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools target distinct tasks, and descriptions help separate close cases like tv_play vs tv_launch vs tv_cast. However, tv_status vs tv_state, tv_volume vs tv_audio's volume action, and tv_power vs tv_screen have overlapping surface area that could occasionally cause misselection.

    Naming Consistency5/5

    All tools use a predictable tv_snake_case convention, such as tv_play, tv_queue, tv_volume, and tv_state_watch. The only variation is noun-only vs verb-noun names, but the prefix and separators are consistent throughout.

    Tool Count3/5

    23 tools is heavy for a smart TV control server, landing in the 16-25 range where discoverability and selection cost rise. The feature breadth is real, but some controls could likely be consolidated.

    Completeness3/5

    The server covers power, volume, playback, casting, queue, history, recommendations, scenes, groups, multi-room audio, and display modes. Notable gaps remain around explicit pause/resume/stop-current-playback and input/source switching.

    Maintenance

    ActivityMaintained
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers