Open
Conversation
Build Metrics ReportBinary Sizes
Test Results✅ 250 passed, 6 skipped out of 256 tests in 76.2s (+16.8s vs. baseline) CLI Startup Time36ms median (x64, |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces auto-generation of npm commands and TypeScript documentation for the winapp CLI. It exposes all CLI commands as typed async functions in the npm package, ensuring they stay synchronized with the native CLI through automated code generation from the CLI schema.
Changes:
- Adds
callWinappCliCapturefunction to capture stdout/stderr programmatically instead of inheriting stdio - Generates TypeScript wrappers for all CLI commands with full type safety
- Auto-generates comprehensive API documentation from TypeScript source using the TS Compiler API
- Integrates code generation into build pipeline to ensure commands are always up-to-date
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/winapp-npm/src/winapp-commands.ts |
Auto-generated TypeScript wrappers for all CLI commands with typed options interfaces |
src/winapp-npm/src/winapp-cli-utils.ts |
Adds callWinappCliCapture for programmatic CLI execution with output capture |
src/winapp-npm/src/index.ts |
Exports new command functions and types for public API |
src/winapp-npm/scripts/generate-commands.mjs |
Code generator that creates TypeScript wrappers from CLI schema |
src/winapp-npm/scripts/generate-docs.mjs |
Documentation generator using TypeScript Compiler API |
src/winapp-npm/package.json |
Adds npm scripts for code/docs generation and integrates into build pipeline |
src/winapp-npm/README.md |
Documents new programmatic API with usage examples |
src/winapp-npm/.prettierignore |
Excludes auto-generated files from formatting checks |
scripts/build-cli.ps1 |
Integrates npm docs generation into build pipeline |
docs/npm-usage.md |
Auto-generated comprehensive API documentation |
docs/fragments/node-commands.md |
Documents Node.js-specific CLI commands |
README.md |
Links to new npm programmatic API documentation |
azchohfi
reviewed
Feb 20, 2026
Collaborator
azchohfi
left a comment
There was a problem hiding this comment.
Awesome to see this automated!
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.
Description
This PR exposes all winapp CLI commands as typed JS/TS functions in the npm package. It adds a script to autogenerate those exports from the cli-schema so they are always up to date. It also adds a script to auto generate the npm documentation.
Usage Example
Related Issue
Type of Change
Checklist
AI Description
This PR exposes all winapp CLI commands as typed JavaScript/TypeScript functions in the npm package, ensuring they are always up to date through auto-generated exports from the cli-schema. It also updates the documentation to reflect this new programmatic API for usage in JavaScript/TypeScript projects. Usage examples for initializing a project and packaging an app are provided in the documentation.