Skip to content

feat: CLI v2 Phase 2 — smart play, history subcommand, unified AI#13

Merged
luongnv89 merged 1 commit intomainfrom
feat/10-cli-v2-phase2-smart-play
Apr 4, 2026
Merged

feat: CLI v2 Phase 2 — smart play, history subcommand, unified AI#13
luongnv89 merged 1 commit intomainfrom
feat/10-cli-v2-phase2-smart-play

Conversation

@luongnv89
Copy link
Copy Markdown
Owner

Summary

Implements all 11 subtasks from CLI v2 Phase 2, building on the Phase 1 foundation from #9.

  • Smart play [SOURCE]: Auto-detects mode from positional argument (file path -> local, YouTube URL -> youtube, HTTP URL -> radio stream, station name -> radio, bare -> context)
  • Deprecation warnings: play -m ai and play -m history warn users to use mc ai play / mc history play N instead
  • history group: Converted from command to group with list and play N subcommands; h alias continues to work
  • radio update: Moved update-radios into radio update; old command kept as hidden alias
  • ai model: Renamed models -> model (singular), set-default -> default; old names kept as hidden aliases
  • Duration default: Unified AI --duration default to 15 seconds on both play -d and ai play -d
  • mood MOOD: mc mood focus directly starts mood-based radio playback
  • Volume validation: vol argument now uses IntRange(0, 100) — rejects out-of-range values
  • Help text: All music-cli references replaced with mc in echo/help strings
  • 70 new tests: Comprehensive coverage for all Phase 2 features with mocked DaemonClient

Closes #10

Test plan

  • mc play ~/file.mp3 auto-detects local mode
  • mc play https://youtube.com/watch?v=xxx auto-detects YouTube mode
  • mc play jazz auto-detects station name
  • play -m ai and play -m history show deprecation warnings
  • mc history play 3 replays from history
  • mc radio update works, old update-radios still works
  • mc ai model default X works
  • AI --duration defaults to 15 on both paths
  • mc mood focus starts focus radio playback
  • mc vol 150 rejects with range error
  • No music-cli references remain in help/echo text
  • All 102 tests pass (32 Phase 1 + 70 Phase 2)

…e validation (CLI v2 Phase 2)

Implements all 11 subtasks from issue #10:
- 2.1: Smart play [SOURCE] auto-detection (file/YouTube/URL/station/context)
- 2.2: Deprecation warning on play -m ai
- 2.3: Deprecation warning on play -m history
- 2.4: Convert history to group with list + play N subcommands
- 2.5: Move update-radios to radio update (old form hidden alias)
- 2.6: Rename ai models to ai model, set-default to default (old forms aliased)
- 2.7: Unify AI --duration default to 15 on both paths
- 2.8: mc mood MOOD plays mood radio directly
- 2.9: Volume validation with IntRange(0, 100)
- 2.10: Replace all music-cli references with mc in help/echo text
- 2.11: 70 new tests covering all Phase 2 features
@luongnv89 luongnv89 merged commit fb666c6 into main Apr 4, 2026
12 of 14 checks passed
@luongnv89 luongnv89 deleted the feat/10-cli-v2-phase2-smart-play branch April 4, 2026 22:53
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.

CLI v2 Phase 2: Smart play, history subcommand, unified AI

1 participant