
glTF Transform CLI
CLICommand-line tool for inspecting, compressing and optimizing glTF/GLB 3D models, with Draco and Meshopt mesh compression, texture resizing and WebP/KTX2 compression; a single optimize command handles it all.
@gltf-transform/cli
Part of the glTF Transform project.
- GitHub: https://github.com/donmccurdy/glTF-Transform
- Project Documentation: https://gltf-transform.dev/
- CLI Documentation: https://gltf-transform.dev/cli
Quickstart
Install the CLI, supported in Node.js LTS versions.
npm install --global @gltf-transform/cli
List available CLI commands:
gltf-transform --help
Optimize everything all at once:
gltf-transform optimize input.glb output.glb --texture-compress webp
Or pick and choose your optimizations, building a custom pipeline.
Compress mesh geometry with Draco or Meshoptimizer:
# Draco (compresses geometry).
gltf-transform draco input.glb output.glb --method edgebreaker
# Meshopt (compresses geometry, morph targets, and keyframe animation).
gltf-transform meshopt input.glb output.glb --level medium
Resize and compress textures with Sharp, or improve VRAM usage and performance with KTX2 and Basis Universal:
# Resize textures.
gltf-transform resize input.glb output.glb --width 1024 --height 1024
# Compress textures with WebP.
gltf-transform webp input.glb output.glb --slots "baseColor"
# Compress textures with KTX2 + Basis Universal codecs, UASTC and ETC1S.
gltf-transform uastc input.glb output1.glb \
--slots "{normalTexture,occlusionTexture,metallicRoughnessTexture}" \
--level 4 --rdo --rdo-lambda 4 --zstd 18 --verbose
gltf-transform etc1s output1.glb output2.glb --quality 255 --verbose
... and much more.
Credits
See Credits.
License
Copyright 2023, MIT License.
관련 리소스

glTF Transform
CLISDK and CLI for reading, editing and optimizing glTF 2.0 3D models: one optimize command does it all, or run Draco and Meshopt geometry compression, texture resizing and WebP or KTX2 compression separately. Suits game and web 3D assets.
donmccurdy/glTF-Transform2k
Three.js Loaders
SkillThree.js asset loading reference with code: loading GLTF models, textures, images and HDR environments, coordinating loaders and progress with LoadingManager, and async loading patterns.
CloudAI-X/threejs-skills3.6k
Scenario Agent Skills
SkillOfficial Scenario skills: generate production-ready images, video, voiceover and music, textures and 3D assets through the Scenario MCP, for product shots, ads, storyboards and game art, plus expert skills for Blender, Maya and ZBrush. Needs a Scenario account (free tier available).
scenario-labs/skills1k
SVGO
CLISVG optimizer CLI and Node.js library: shrinks SVGs by removing editor metadata, comments, hidden elements and redundant attributes, processes whole directories recursively, and gives fine control through plugin config.
svg/svgo22.7k
pngquant
CLILossy PNG compression CLI: converts images to 8-bit PNGs that keep transparency, usually 60-80% smaller, with batch processing and a quality range setting. Handy for slimming down web assets, slides and article images. Install via Homebrew on macOS; no account.
kornelski/pngquant5.8k
fontTools
CLIFont toolkit: pyftsubset subsets fonts to the characters you use and outputs WOFF2 to shrink web fonts, and ttx converts fonts to editable XML for inspection and edits. Needs Python 3.11+ and the woff extra for WOFF2; check the license before subsetting commercial fonts.
fonttools/fonttools5.3k