AssetForge is a powerful, local-first asset optimization toolkit for modern web development. Process and optimize various file formats offline without sending your data to the cloud.
- Resize images with automatic aspect ratio preservation
- Convert formats between JPEG, PNG, WebP, and AVIF
- Optimize quality for the perfect balance of size and visual fidelity
- Add text watermarks with customizable position, color, opacity, and more
- Batch processing with configurable concurrency
- Merge multiple PDFs into a single document
- Add text watermarks to all pages
- Split PDFs (planned feature)
- Convert audio formats (mp3, ogg, webm)
- Adjust bitrates for optimal file size
- Audio trimming (planned feature)
- Minify SVG files for web use
- Remove unnecessary elements and attributes
- Preserve viewBox and important attributes
- Validate JSON files against schema
- Minify JSON for production
- Prettify JSON for development
- Compare and diff JSON files
- Drag and drop interface for easy file processing
- Preview optimized assets before downloading
- No data leaves your machine - 100% local processing
# Install globally
npm install -g assetforge
# OR use directly from Git
git clone https://github.com/solaiman5683/AssetForge.git
cd AssetForge
npm install
# Basic image conversion with resizing and quality adjustment
assetforge image -i input.jpg -o output.webp -w 800 -q 75
# Add watermark
assetforge image -i input.jpg -o output.jpg -w 1200 -q 90 --watermark "© Copyright 2025"
# Process a whole folder of images
assetforge image-batch -s ./source-folder -d ./output-folder --format webp --quality 80
# Merge multiple PDFs
assetforge pdf merge -i document1.pdf document2.pdf document3.pdf -o merged.pdf
# Add watermark to all pages
assetforge pdf watermark -i document.pdf -o watermarked.pdf --text "CONFIDENTIAL"
# Optimize SVG file
assetforge svg -i logo.svg -o optimized.svg
# Validate JSON
assetforge json validate -f data.json
# Minify JSON
assetforge json minify -f data.json -o data.min.json
# Format JSON
assetforge json pretty -f data.json -o data.pretty.json -s 2
# Compare JSON files
assetforge json diff -a file1.json -b file2.json
# Convert audio format
assetforge audio convert -i input.mp3 -o output.ogg --format ogg --bitrate 128k
# Launch the web interface
assetforge ui
# Then open http://localhost:5173 in your browser
Create an assetforge.config.json
file in your project directory to set default options:
{
"image": {
"quality": 82,
"defaultWidth": 1200
},
"concurrency": 4
}
Override config location with --config path/to/config.json
.
The AssetForge UI provides a user-friendly interface for all optimizations without requiring command line knowledge:
- Run
assetforge ui
- Open
http://localhost:5173
in your browser - Drag files to process
- Configure options
- Download optimized results
- API Documentation - Using AssetForge programmatically
- Advanced Options - Detailed options for each processor
- Command Reference - Complete CLI command reference
- Configuration Guide - Customizing AssetForge behavior
npm test
- Video processing support
- PDF splitting and page extraction
- Audio trimming and effects
- Worker threads for improved performance
- Plugin system for extending functionality
- Large files may consume significant memory
- First audio conversion may be slower due to ffmpeg.wasm initialization
- Limited PDF compression capabilities
- Heavy batch processing may impact system performance
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.