Fast code formatting and minification tool using the best available tools
Project description
VexyFormi
Fast code formatting and minification using the best available tools.
Features
- 🔥 Blazing Fast: Uses fastest available tools (esbuild, swc, biome, ruff)
- 🛡️ Safe: Atomic operations with automatic backups
- 🎯 Smart: Automatic tool detection and fallbacks
- 📦 Simple: Zero-config operation with sensible defaults
- 🌐 Universal: Supports JS, TS, CSS, HTML, Python, JSON, YAML, TOML, Markdown
Quick Start
# Install
pip install vexy-formi
# Install all required tools automatically
vfor install
# Minify current directory
vfor mini
# Format Python files
vfor fmt --verbose src/
# Show available tools
vfor tools
# Update all tools to latest versions
vfor update
# Use as Python package
python -c "import vexy_formi; vexy_formi.minify('src/')"
Supported Tools
- JavaScript/TypeScript: esbuild, swc, terser, biome, prettier
- CSS/SCSS: biome, lightningcss, prettier
- Python: ruff, black
- HTML: html-minifier-terser, prettier
- JSON: biome, jq, prettier
- TOML: taplo, dprint
- YAML: prettier, yq
- Markdown: dprint, prettier
Configuration
Set preferences via environment variables:
VFOR_PREFERRED_JS_TOOL=esbuildVFOR_PREFERRED_CSS_TOOL=biomeVFOR_PREFERRED_PYTHON_TOOL=ruffVFOR_MAX_WORKERS=8
Or create .vfor.json in your project:
{
"preferred_js_tool": "esbuild",
"preferred_css_tool": "biome",
"max_workers": 4
}
CLI Usage
# Minify files
vfor mini # Current directory
vfor mini src/ # Specific directory
vfor mini --verbose src/ # Show detailed output
vfor mini --no-backup src/ # Skip backups
# Format files
vfor fmt # Current directory
vfor fmt --recursive src/ # Process recursively
vfor fmt --exclude "*.min.*" # Exclude patterns
# Tool management
vfor install # Install all required tools
vfor update # Update tools to latest versions
vfor tools # Show available tools
vfor cleanup # Clean backup files
Python API
import vexy_formi
# Simple API
result = vexy_formi.minify('src/')
result = vexy_formi.format('src/', recursive=True, exclude=['*.test.*'])
# Advanced usage
from vexy_formi import FileProcessor
processor = FileProcessor()
result = processor.minify_files(
Path('src/'),
recursive=True,
max_workers=8,
create_backup=True
)
print(f"Processed {result.total_files} files")
print(f"Size reduction: {result.total_size_reduction_percent:.1f}%")
Development
# Clone repository
git clone https://github.com/vexyart/vexy-formi.git
cd vexy-formi
# Install dependencies
pip install -e .[dev,test]
# Run CLI directly
./vfor mini examples/
# Run tests
pytest
# Format code
ruff format src/
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vexy_formi-1.0.4.tar.gz
(10.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vexy_formi-1.0.4.tar.gz.
File metadata
- Download URL: vexy_formi-1.0.4.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
973a04deffa36c897fe34c972025ed12d026dd29d453d89acc9717b862e825cc
|
|
| MD5 |
2ea3a2c587cc88fb2f664a26eec2017c
|
|
| BLAKE2b-256 |
678f9c5a36ddd5674d03e15867d26330455c080af7f926b2c04051ddcdf6581a
|
File details
Details for the file vexy_formi-1.0.4-py3-none-any.whl.
File metadata
- Download URL: vexy_formi-1.0.4-py3-none-any.whl
- Upload date:
- Size: 47.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
208593b73ca22de3e4c7a3bdddfd5a7fac5fc56dbe11724d776aa0bd68ed2bf3
|
|
| MD5 |
ed7ca7a0b7c058856d6a1df2ff5f576a
|
|
| BLAKE2b-256 |
7d60c86e32233e840665c78ea3e672bd21bf50a2c143535f688888d5ce4f79e4
|