feat(cli): add @videojs/cli docs command for LLM-friendly installation#1214
Draft
feat(cli): add @videojs/cli docs command for LLM-friendly installation#1214
Conversation
Introduces `@videojs/cli`, a CLI that serves Video.js documentation from the command line with special handling for the installation page. LLMs and humans can generate framework-specific installation code via flags instead of the interactive web pickers that break in plain text. Key changes: - Extract codegen logic from site React components into pure functions (`site/src/utils/installation/codegen.ts`) shared by both the site and CLI - Add `HumanCase`/`LLMCase` Astro components and Turndown rules so `installation.mdx` serves different content to browsers vs. the LLM markdown pipeline - Create `packages/cli/` with `docs`, `config` commands, interactive prompts via @clack/prompts, and flag parsing via @bomb.sh/args - CLI builds bundled docs from site's LLM markdown output at build time Closes #1185 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (7)
Players (3)
Skins (17)
UI Components (22)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (6)
Skins (14)
UI Components (19)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (8)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
Include the CLI package in the linked-versions group so it gets versioned and published alongside the other packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CLI depends on site build output, which would drag the entire site build into `build:packages`. Exclude it with a negative filter and add a dedicated `build:cli` step to the CD workflow that runs after packages and CDN builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@videojs/cli, a CLI that serves Video.js docs from the command line with codegen for the installation pageHumanCase/LLMCaseAstro components + Turndown rules for browser vs. LLM content splittingCommands
Before merging: npm setup
npm publish --access publicmanually once frompackages/cli/to create the@videojs/clipackage on the registry@videojs/cli→ Settings → Configure trusted publishing for the GitHub Actions workflow (cd.yml), matching the existing packagesCloses #1185
Closes #1215
Test plan
node packages/cli/dist/index.mjs docs how-to/installation --framework html --preset video --install-method npm— verify HTML install outputnode packages/cli/dist/index.mjs docs how-to/installation --framework react --media hls --install-method pnpm— verify React + HLS outputnode packages/cli/dist/index.mjs docs how-to/installation --framework react --install-method cdn— verify invalid combo errorsnode packages/cli/dist/index.mjs docs --list --framework html— verify llms.txt listingnode packages/cli/dist/index.mjs docs concepts/skins --framework react— verify regular doc passthroughnode packages/cli/dist/index.mjs docs how-to/installation— verify promptspnpm -F site test— 375 tests passpnpm -F @videojs/cli test— 13 tests passpnpm turbo run build --filter=@videojs/cli...— full build chain succeeds🤖 Generated with Claude Code