Skip to content

Design: CLI for LLM-friendly Video.js installation#1205

Open
decepulis wants to merge 8 commits intomainfrom
claude/find-llm-issue-I7FfX
Open

Design: CLI for LLM-friendly Video.js installation#1205
decepulis wants to merge 8 commits intomainfrom
claude/find-llm-issue-I7FfX

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

@decepulis decepulis commented Apr 2, 2026

Summary

Design doc for @videojs/cli create — a CLI that generates Video.js installation code, solving the problem of docs/installation.md being bad for LLM consumers (#1185). MVP scope; the same package will later support skin ejection.

An incremental step towards #247. Mostly concerned with closing #1215 and #1185 though.

Implementation: #1215

Draft design for @videojs/cli package that solves interactive documentation
degrading poorly for LLM consumers (issue #1185). Covers code generation
extraction, HumanCase/LLMCase components, and CLI interface design.

https://claude.ai/code/session_012GnierNzbMa91BrtdeXBqC
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 2, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit b985580
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69cfd62f3cf90c000873a60f
😎 Deploy Preview https://deploy-preview-1205--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Apr 3, 2026 3:01pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 24.90 kB
/video (default + hls) 156.69 kB
/video (minimal) 24.89 kB
/video (minimal + hls) 156.60 kB
/audio (default) 23.04 kB
/audio (minimal) 23.04 kB
/background 6.92 kB
Media (7)
Entry Size
/media/background-video 1.04 kB
/media/container 1.59 kB
/media/dash-video 236.43 kB
/media/hls-video 133.39 kB
/media/mux-video 155.85 kB
/media/native-hls-video 3.48 kB
/media/simple-hls-video 14.92 kB
Players (3)
Entry Size
/video/player 6.64 kB
/audio/player 6.63 kB
/background/player 6.62 kB
Skins (17)
Entry Type Size
/video/minimal-skin.css css 3.42 kB
/video/skin.css css 3.44 kB
/video/minimal-skin js 24.87 kB
/video/minimal-skin.tailwind js 25.17 kB
/video/skin js 24.92 kB
/video/skin.tailwind js 25.29 kB
/audio/minimal-skin.css css 2.48 kB
/audio/skin.css css 2.45 kB
/audio/minimal-skin js 23.09 kB
/audio/minimal-skin.tailwind js 23.26 kB
/audio/skin js 23.05 kB
/audio/skin.tailwind js 23.36 kB
/background/skin.css css 117 B
/background/skin js 1.15 kB
/base.css css 157 B
/shared.css css 88 B
/skin-element js 1.34 kB
UI Components (22)
Entry Size
/ui/alert-dialog 2.19 kB
/ui/alert-dialog-close 1.69 kB
/ui/alert-dialog-description 1.66 kB
/ui/alert-dialog-title 1.62 kB
/ui/buffering-indicator 1.93 kB
/ui/captions-button 2.00 kB
/ui/controls 1.94 kB
/ui/error-dialog 2.37 kB
/ui/fullscreen-button 1.98 kB
/ui/mute-button 2.00 kB
/ui/pip-button 1.98 kB
/ui/play-button 1.95 kB
/ui/playback-rate-button 2.00 kB
/ui/popover 2.62 kB
/ui/poster 1.80 kB
/ui/seek-button 2.01 kB
/ui/slider 1.63 kB
/ui/thumbnail 2.22 kB
/ui/time 1.70 kB
/ui/time-slider 2.03 kB
/ui/tooltip 2.55 kB
/ui/volume-slider 2.29 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 19.87 kB
/video (default + hls) 151.72 kB
/video (minimal) 19.92 kB
/video (minimal + hls) 151.82 kB
/audio (default) 16.67 kB
/audio (minimal) 16.74 kB
/background 3.15 kB
Media (6)
Entry Size
/media/background-video 476 B
/media/dash-video 236.26 kB
/media/hls-video 133.27 kB
/media/mux-video 155.90 kB
/media/native-hls-video 3.44 kB
/media/simple-hls-video 14.93 kB
Skins (14)
Entry Type Size
/video/minimal-skin.css css 3.35 kB
/video/skin.css css 3.37 kB
/video/minimal-skin js 19.84 kB
/video/minimal-skin.tailwind js 23.30 kB
/video/skin js 19.80 kB
/video/skin.tailwind js 23.39 kB
/audio/minimal-skin.css css 2.38 kB
/audio/skin.css css 2.34 kB
/audio/minimal-skin js 16.66 kB
/audio/minimal-skin.tailwind js 19.13 kB
/audio/skin js 16.60 kB
/audio/skin.tailwind js 19.13 kB
/background/skin.css css 90 B
/background/skin js 272 B
UI Components (19)
Entry Size
/ui/alert-dialog 2.00 kB
/ui/buffering-indicator 1.63 kB
/ui/captions-button 1.83 kB
/ui/controls 1.67 kB
/ui/error-dialog 2.10 kB
/ui/fullscreen-button 1.79 kB
/ui/mute-button 1.78 kB
/ui/pip-button 1.77 kB
/ui/play-button 1.75 kB
/ui/playback-rate-button 1.79 kB
/ui/popover 3.36 kB
/ui/poster 1.53 kB
/ui/seek-button 1.78 kB
/ui/slider 2.48 kB
/ui/thumbnail 2.06 kB
/ui/time 1.89 kB
/ui/time-slider 3.35 kB
/ui/tooltip 2.52 kB
/ui/volume-slider 2.79 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (8)
Entry Size
. 5.29 kB
/dom 8.92 kB
/dom/media/custom-media-element 1.76 kB
/dom/media/dash 235.82 kB
/dom/media/hls 132.72 kB
/dom/media/mux 155.32 kB
/dom/media/native-hls 2.84 kB
/dom/media/simple-hls 14.40 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 999 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.39 kB
/html 696 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.53 kB
/events 319 B
/function 261 B
/object 247 B
/predicate 265 B
/string 148 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (3)
Entry Size
. 40 B
/dom 12.45 kB
/playback-engine 12.41 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

Cut implementation details (generator functions, HumanCase/LLMCase
mechanics, MDX examples). Trimmed alternatives from six to three.
Sharpened prose per writing style guide.

https://claude.ai/code/session_012GnierNzbMa91BrtdeXBqC
@decepulis decepulis marked this pull request as ready for review April 2, 2026 21:57
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome, few small suggestions! Ideally the LLM can just look at the project and recommend the best options to run.

Providing LLM a sample src/poster depending on media would be great.


Flags:
--framework <html|react> (required)
--use-case <video|audio|background-video> (default: video)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: --preset

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might even go one step further and suggest that we should ditch "use case" on the installation page and teach folks the word "preset" even earlier.

--framework <html|react> (required)
--use-case <video|audio|background-video> (default: video)
--skin <default|minimal> (default: default)
--renderer <html5-video|html5-audio|hls|background-video> (default: per use case)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: --media

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not opposed

npx @videojs/cli create [flags]

Flags:
--framework <html|react> (required)
Copy link
Copy Markdown
Member

@mihar-22 mihar-22 Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Should framework refer to html or react, or specifically application framework like next, vite, start, react-router, astro, nuxt, etc. Thinking the latter because it'll determine how we scaffold. IF we're letting LLM ultimately decide what to do with the player code then we can ignore this for now, but for users not using an LLM it'll come back up in the future. Want to be careful what --framework means. Also, if "frameworks" is broader then we might still need a option to determine html/react if you're targeting something agnostic like astro.

  2. Think we're missing --css option for vanilla or tailwind I saw our installation page doesn't have ejected option or expose any styling so I guess css option doesn't make sense yet.

References:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea. One that could be extended to our installation page, too. Kind of like what you do in vidstack. Where folks select "sveltekit" but they're still given the html custom element options.

I remember Heff being opposed to this but I don't remember why (it was in the pre-beta rush) so I'm going to treat this as out-of-scope and make a note to revisit it.


## Open questions for now

- **Prompt library** — `@inquirer/prompts` vs `@clack/prompts` vs something else?
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like clack! there's tons of options so whatever your heart desires

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the first thing about these options. I'll just use clack since you like it, and we can throw it out if we decide on something else later!

Rename --use-case to --preset, --renderer to --media. Promote
--source-url from open question to API section. Add broader
--framework scope as open question for later. Note clack preference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

3 participants