feat: add CLI package and shared extraction layer#79
Merged
wangdicoder merged 3 commits intomasterfrom Mar 25, 2026
Merged
Conversation
- Add @tiny-design/cli with 8 commands: list, info, doc, demo, token, icon, doctor, usage - Extract shared extraction logic into @tiny-design/extract (internal package) - Refactor @tiny-design/mcp to use shared extraction package - Add CLI documentation page (en + zh) to docs site - Reorganize Guide sidebar menu into 4 groups: Overview, Getting Started, AI, Resources
- Update extract test imports from deleted local scripts to @tiny-design/extract - Use import.meta.url for __dirname in ESM test files - Remove rootDir from MCP tsconfig to allow cross-package type imports - Add --passWithNoTests to CLI test script
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
@tiny-design/cli— a CLI tool for querying component metadata, docs, demos, tokens, and icons from the terminal (fully offline, agent-optimized)@tiny-design/extract(internalprivate: truepackage) to eliminate duplication between MCP and CLI@tiny-design/mcpto import types and extraction functions from the shared packageCLI Commands
tiny-design listtiny-design info <component>tiny-design doc <component>tiny-design demo <component> [name]tiny-design token [category]tiny-design icon [search]tiny-design doctortiny-design usage [dir]Release
@tiny-design/cli: minor (new package)@tiny-design/mcp: patch (internal refactor, no API changes)Test plan
pnpm install && pnpm build— all packages build successfullypnpm --filter @tiny-design/mcp build— MCP builds with shared extractionpnpm --filter @tiny-design/cli build— CLI builds and extracts metadatanode packages/cli/dist/index.js list— lists all componentsnode packages/cli/dist/index.js info Button --format json— JSON output worksnode packages/cli/dist/index.js doc Button --lang zh— Chinese docs worknode packages/cli/dist/index.js demo Button Type— demo code displayednode packages/cli/dist/index.js token colors— token values shownnode packages/cli/dist/index.js icon arrow— icon search worksnode packages/cli/dist/index.js doctor— diagnostics runpnpm --filter @tiny-design/docs build— docs build with new CLI page and grouped Guide menu