1 unstable release
Uses new Rust 2024
| 0.1.0 | Dec 2, 2025 |
|---|
#184 in Images
33KB
661 lines
webtk
webtk is a command-line tool designed to interact with and manage assets from design files, starting with Sketch files.
See Prerequisites (in short, have sketchapp installed which should have sketchtool as well)
Usage
Use the --help flag for detailed command information:
webtk --help
Sketch Commands
The sketch subcommand handles Sketch file operations.
# List all of the Artboards
webtk sketch list-artboards tests/data/sample-sketch.sketch
# List all Artboards with glob
webtk sketch list-artboards -g "ico/*" tests/data/sample-sketch.sketch
# Export all ico/ artboards
webtk sketch export -g "ico/*" --format "svg,png" -o ".out/icons" tests/data/sample-sketch.sketch
# Export as SVG symbols (all icons combined into one SVG with <symbol> elements)
webtk sketch export -g "ico/*" --format "svg-symbols" -o ".out/icons/symbols.svg" tests/data/sample-sketch.sketch
-gis a glob on the artboard name. For mulitple globs do-g "ico/*" -g "logo/*--formatis the format of the export. Can besvg,png,jpeg,svg-symbols.- For multiple, either comma delimited
--format "svg,pngor multiple--format svg --format png svg-symbolsexports all matched artboards as SVG<symbol>elements in a single SVG file
- For multiple, either comma delimited
Prerequisites
This tool relies on the official sketchtool binary. Ensure Sketch is installed on your system. The current implementation assumes sketchtool is located at:
/Applications/Sketch.app/Contents/Resources/sketchtool/bin/sketchtool
Dependencies
~7–37MB
~494K SLoC