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

@svgsketch/cli

v0.4.0

Published

CLI tool for importing SVG, Illustrator and PDF documents and working with SVGSketch documents

Downloads

436

Readme

@svgsketch/cli

Command-line interface for working with SVGSketch .svgs documents.

Install

npm install -g @svgsketch/cli

Commands

svgsketch import <input.svg|.ai|.pdf|.eps> -o <output.svgs>
svgsketch convert <input.svg|.ai|.pdf|.eps|.svgs> -o <output.svg>
svgsketch validate <input>
svgsketch render <input> -o <output.svg>
svgsketch info <input>
svgsketch vars <input>
svgsketch codegen <input> -f <svg|react|vue|d3|css>

Examples

# Import foreign SVG into the native document format
svgsketch import artwork.svg -o artwork.svgs

# Import an Illustrator file, keeping text editable, with a JSON report
svgsketch import poster.ai -o poster.svgs --report poster-report.json

# Import pages 1 and 3 of a PDF with text converted to outlines
svgsketch import brochure.pdf -o brochure.svgs --artboards 1,3 --text outline

# Convert an Illustrator file straight to plain SVG
svgsketch convert poster.ai -o poster.svg --background white

# Validate a document
svgsketch validate design.svgs

# Render to SVG
svgsketch render design.svgs -o out.svg --background white

# Generate React component
svgsketch codegen icon.svgs -f react -o Icon.tsx --name Icon --typescript

# Generate CSS+SVG markup
svgsketch codegen design.svgs -f css -o design-snippet.svg

Illustrator, PDF and EPS input

import and convert read the first bytes of the input to decide its format. The file extension is never trusted: a PDF saved as .svg is imported as a PDF, and a note on stderr says so. Raster images are rejected, and import rejects .svgs input because it is already native.

An Illustrator file saved with "Create PDF Compatible File" carries a PDF rendition and its private Illustrator source. The rendition provides the appearance and the source provides artboard names, layer names, lock state and hidden state. Plain PDF files import their pages as artboards and their optional-content groups as layers. A file saved without PDF content, or a PostScript-era .ai or .eps file, is refused with a message that says how to save it again.

| Option | Meaning | | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | --artboards <1,3\|all> | Artboards (pages) to import, 1-based. Default all. Several artboards become one document with a <view> per artboard. | | --text <editable\|outline> | Keep text editable (default) or convert every glyph to outlines. | | --hidden-layers <import\|skip> | Import hidden layers as hidden (default) or leave them out. | | --report <file.json> | Write the import report: what was preserved, approximated, rasterized or dropped, the fonts the document needs, and the timings. |

Transcoder diagnostics print to stderr as severity: pdf:code: message and severity: illustrator:code: message lines beside the ingest diagnostics. --fail-on-warnings counts them along with the ingest warnings.

Render diagnostics

import, convert, render, and codegen report machine-readable diagnostics as warning: / error: lines on stderr. Import diagnostics also include their stable diagnostic code. Malformed SVG never produces a partial .svgs file.

Render diagnostics include cases such as an unsupported shape type that was dropped from the output. The output is still written and the exit status stays 0. Pass --fail-on-warnings to these commands to exit with a nonzero status when a warning is reported - useful in CI.

svgsketch import artwork.svg -o artwork.svgs --fail-on-warnings
svgsketch convert poster.ai -o poster.svg --fail-on-warnings
svgsketch render design.svgs -o out.svg --fail-on-warnings
svgsketch codegen design.svgs -f react -o Icon.tsx --fail-on-warnings