npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tapestrylab/cli

v0.2.1

Published

Unified CLI for all Tapestry tools

Readme

@tapestrylab/cli

Unified command-line interface for all Tapestry design system tools.

Installation

npm install -g @tapestrylab/cli
# or
pnpm add -g @tapestrylab/cli

Usage

The tapestry CLI provides a single entrypoint for all Tapestry tools:

Extract Component Metadata

Extract component metadata from source files:

tapestry extract --root ./src --output ./metadata.json

Options:

  • -c, --config <path> - Path to config file
  • -r, --root <path> - Project root directory
  • -o, --output <path> - Output file path
  • -i, --include <patterns...> - Include patterns
  • -e, --exclude <patterns...> - Exclude patterns
  • --json - Output as JSON

Generate Documentation

Generate documentation from component source files:

tapestry generate --source ./src/Button.tsx --template component-docs

Options:

  • -s, --source <path> - Source file or directory (default: ./src/components)
  • -o, --output <path> - Output directory (default: ./docs)
  • -t, --template <name|path> - Template name or path to template file
  • -f, --format <format> - Output format: markdown, mdx, or html (default: mdx)
  • --theme <path> - Path to custom theme file
  • --no-relationships - Skip relationship resolution
  • --project-root <path> - Project root for relationship resolution

List Available Templates

List all built-in templates:

tapestry list

Initialize Configuration

Initialize Tapestry configuration in the current directory:

tapestry init

Options:

  • --force - Overwrite existing files

This will create:

  • tapestry.config.js - Configuration file
  • templates/ - Directory for custom templates
  • templates/custom.taptpl.json - Example custom template
  • custom.theme.js - Example custom theme

Examples

Extract and Generate Documentation

# Extract metadata from all components
tapestry extract --root ./src/components --output ./metadata.json

# Generate documentation for a single component
tapestry generate --source ./src/Button.tsx --template component-docs --format mdx

# Generate documentation for all components in a directory
tapestry generate --source ./src/components --output ./docs --template api-reference

Using Custom Templates and Themes

# Initialize Tapestry configuration
tapestry init

# Edit the generated tapestry.config.js and templates/custom.taptpl.json

# Generate docs with custom template and theme
tapestry generate --template ./templates/custom.taptpl.json --theme ./custom.theme.js

Migration from Individual CLIs

If you were previously using tapestry-extract or tapestry-template, you can now use the unified tapestry CLI:

Before:

tapestry-extract extract --root ./src --output ./metadata.json
tapestry-template generate --source ./src/Button.tsx --template component-docs
tapestry-template list
tapestry-template init

After:

tapestry extract --root ./src --output ./metadata.json
tapestry generate --source ./src/Button.tsx --template component-docs
tapestry list
tapestry init

The individual CLIs (tapestry-extract and tapestry-template) will continue to work, but we recommend using the unified tapestry CLI for a better experience.

Package Architecture

This CLI package is a thin wrapper that delegates to the underlying packages:

  • tapestry extract@tapestrylab/extract
  • tapestry generate@tapestrylab/template
  • tapestry list@tapestrylab/template
  • tapestry init@tapestrylab/template

License

MIT