v0.26.0 bash 3.2 + Go 3 engines ยท 0 new deps

ting / ๅฌ

An agent-first multi-source media engine with a terminal face. Search a source, play it through mpv detached from your terminal, and keep controlling it โ€” from a TUI if you are a human, from a single-line JSON contract if you are a program.

zh ยท Monoline ๅฌ
โ•ญโ”€โ”€โ•ฎ   โ•ฑโ”€โ”€โ•ฎ
โ•ฐโ”€โ”€โ•ฏ   โ•ฏ  โ”‚
en ยท Heavy Block ๅฌ
โ–ˆโ–€โ–€โ–ˆ   โ–„โ–„โ–ˆโ–ˆ
โ–ˆโ–„โ–„โ–ˆ   โ–€  โ–ˆ
$ brew install binlecode/tap/ting
Install via Homebrew tap on macOS & Linux (or brew tap binlecode/tap && brew install ting)

Two 100% First-Class Faces

No MCP wrapper needed: machine programs and humans interact on equal terms.

Machine Face (Agent-First CLI) JSON Envelope

Designed from day zero for AI agents, shell scripts, and headless automation. Zero modal prompts, deterministic behavior.

  • Single-line JSON envelope output (-j) on every verb
  • Strict 4-tier exit code taxonomy (0 ok / 1 usage / 2+ tool fail / 4 no-op)
  • Detached background playback daemon lifecycle (-d, --status, --stop)
  • Lock-free append-only listening history and durable playlist stores
ting-play --search -j
# Single-line JSON envelope for coding agents
$ ting-play --search -j -n 2 -- "lofi hip hop"
{"event":"search","engine":"yt","query":"lofi hip hop","count":2,"results":[{"id":"jfKfPfyJRdk","title":"lofi hip hop radio","duration":"live"}]}
Human Face (Bubbletea TUI) Dual-Column Workspaces

A high-craft Go terminal UI with responsive dual-column workspaces, synchronized lyrics, Kitty cover art, and 13 curated themes.

  • Five top-level workspaces (Search, Feeds, Queue, Playlists, History) with non-destructive state retention
  • Dual-style minimalist pixel wordmarks: calligraphic Monoline (zh) and brutalist Heavy Block (en)
  • Responsive dual-column layout: Stage list paired with an Inspector for synchronized lyrics stream
  • Full-screen Theater stage mode (F) with centered lyrics and ambient typography
  • Sub-cell progress bar, incremental filter (/), row jump (Nj), and 3-second z undo
  • In-terminal album cover art over Kitty graphics protocol with clean fallback
  • 13 built-in truecolor/ANSI themes (Catppuccin, Tokyo Night, Nord, Rose Pine, Everforest...)
ting โ€” dual-column workspace & synced lyrics
โ•ญโ”€โ”€โ•ฎ โ•ฑโ”€โ”€โ•ฎ [w1 ๆœ็ดข*] w2 ๆŽจ่ w3 ๅพ…ๆ’ญ w4 ๆญŒๅ• w5 ๅކๅฒ โ•ฐโ”€โ”€โ•ฏ โ•ฏ โ”‚ query='lofi hip hop' yt ยท 14 ็ป“ๆžœ ยท ๅทฒ็™ปๅฝ• โ–ถ ๆ’ญๆ”พไธญ: Best of lofi hip hop 2021 [beats to relax/study to] ใ€00:07/06:10:57ใ€‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ–Ž 1. Best of lofi hip hop 2021 [beats to relax/study to] 6:10:58 โ”‚ ๅฝ“ๅ‰ๆ’ญๆ”พไธŽๅŒๆญฅๆญŒ่ฏ 2. lofi hip hop radio beats to relax/study to --:-- โ”‚ Best of lofi hip hop 2021 [beats... 3. ๏ผฎ๏ฝ‰๏ฝ‡๏ฝˆ๏ฝ” ๏ผค๏ฝ’๏ฝ‰๏ฝ–๏ฝ… ~ lofi hip hop mix ~ beats to chill / drive to 24:37:03 โ”‚ yt 4. 90's Chill Lofi Study Music Lofi Rain Chillhop Beats Lofi Rain Playlist 11:53:45 โ”‚ 139k opus ยท stereo ยท ้Ÿณ้‡ 100% 5. 1 A.M Study Session [lofi hip hop] 1:01:14 โ”‚ ------------------------------ 6. 90's Chill Lofi Chill Music Lofi Rain Hip Hop Beats Lofi Rain Playlist 1:43:55 โ”‚ Rain falling on the roof 7. remember when lofi hip-hop was chill like this. 1:00:21 โ”‚ > Neon lights blur in mist 8. Work Lofi - R&B That Sparks a Mood [rnb , lofi hiphop] 3:23:04 โ”‚ Coffee aroma in the room โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ†‘โ†“ ้€‰ๆ‹ฉ โŽ ๆ’ญๆ”พ / ่ฟ‡ๆปค z ๆ’ค้”€ F ่ˆžๅฐๆจกๅผ w1~w5 ๅทฅไฝœๅŒบ q ้€€ๅ‡บ ? ้”ฎไฝ

Three Shipped Source Engines

Site-specific knowledge is isolated in engines; the player and TUI never change to admit new sources.

YouTube --engine yt

Direct streams via yt-dlp, quality tier mapping (low / mid / high), start offset normalization, and timestamp extraction.

Features: Search, direct stream, live streams, start offsets, transcript extraction.
Bilibili --engine bili

High-speed curl HTTP metadata extraction paired with yt-dlp stream negotiation and multi-part container (--items) traversal.

Features: Search, multi-part video paging, audio-only extraction, related recommendations.
NetEase Cloud Music --engine ne

Encrypted browser weapi protocol via openssl, real access licensing tiers (full / preview / paywalled), and synced lyrics.

Features: Encrypted search, synchronized lyrics transcript, access flags, high-bitrate audio.

Architecture & Hard Invariants

Seven standalone executables, bash 3.2 baseline, strictly locked to 5 external dependencies.

The suite refuses abstraction sprawl: mpv, yt-dlp, nc -U, curl, and jq are the only external dependencies. No C libraries, no daemon managers, no bloated MCP servers.

+----------------------------------------------------------------------------------------+ | CALLERS & FACES | | [ Agent / Program / CLI ] [ Human Terminal ] | | ting-play --search -j ting (Go Single-View TUI) | +---------------------------+---------------------------------------+--------------------+ | | (Calls CLI verbs) v v +----------------------------------------------------------------------------------------+ | TING-PLAY (The Player & Lifecycle) | | - Detached mpv daemon management: id / pid / unix socket / locks / reap | | - Uniform CLI Envelope (-j) and 4-tier deterministic exit codes | | - Queue consumption & Start offset translation | +---------------------------+---------------------------------------+--------------------+ | | +-------------+-------------+ | Direct audio stream | | v v v +--------------------+ [ Engine Dispatch ] [ Durable Stores ] | mpv (Detached) | ting-engine-yt ting-playlist | - Runs in bg | ting-engine-bili ting-history (jsonl) | - Unix socket IPC | ting-engine-ne (weapi) +--------------------+ +----------------------------------------------------------------------------------------+

Keyboard Navigation

Optimized for terminal ergonomics. Single-stroke actions with instant z undo.

Enter Play focused track
Space Pause / Resume
j / k Navigate up / down
w1 ~ w5 Five Workspaces
F Theater Stage Mode
/ Fuzzy filter rows
b Playlists library
u Inspect player queue
h Listening history log
c / i Parts / Chapters
z Instant Undo
t Cycle 13 Themes
q Quit & cleanup