{"id":41240,"library":"html-minifier-cli","title":"html-minifier-cli","description":"Command-line interface for html-minifier (version 0.1.0), a tool that minifies HTML files to reduce size. Provides a CLI wrapper around the html-minifier library, offering options to customize minification behavior. Supports output file specification and usage help. Lightweight wrapper with no active updates since 2018; useful for simple minification tasks but lacks advanced features like streaming or bundle integration.","status":"deprecated","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/curvedmark/html-minifier-cli","tags":["javascript"],"install":[{"cmd":"npm install html-minifier-cli","lang":"bash","label":"npm"},{"cmd":"yarn add html-minifier-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add html-minifier-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core library providing the actual minification logic.","package":"html-minifier","optional":false},{"reason":"Used for CLI argument parsing.","package":"commander","optional":false}],"imports":[{"note":"There is no programmatic API; the package only exposes a CLI binary. Use child_process to invoke it.","wrong":"const htmlmin = require('html-minifier-cli'); htmlmin.minifyFile(...)","symbol":"cli","correct":"import { execSync } from 'child_process'; execSync('htmlmin -o output.html input.html', { stdio: 'inherit' })"},{"note":"This package does not support npx due to missing bin entry configuration. Use global install or full path.","wrong":"npx html-minifier-cli","symbol":"htmlmin binary","correct":"npm install -g html-minifier-cli\nhtmlmin -h"},{"note":"If you need a programmatic API, use the core package html-minifier directly.","wrong":"import htmlmin from 'html-minifier-cli'","symbol":"html-minifier library","correct":"import { minify } from 'html-minifier'; minify(html, options)"}],"quickstart":{"code":"npm install -g html-minifier-cli\nhtmlmin -o minified.html input.html\n# For help:\nhtmlmin -h","lang":"javascript","description":"Installs the CLI tool globally and minifies an HTML file, showing output and help commands."},"warnings":[{"fix":"Consider alternatives like html-minifier-terser, html-minifier-watch, or using html-minifier programmatically.","message":"Package is unmaintained since 2018 and may have security vulnerabilities in dependencies.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Install globally with npm install -g html-minifier-cli, then run htmlmin.","message":"The package does not support npx execution because it lacks a bin script in package.json.","severity":"gotcha","affected_versions":"=0.1.0"},{"fix":"Use child_process to invoke the binary, or switch to the html-minifier package for a JavaScript API.","message":"No programmatic API; the package only provides a CLI binary.","severity":"gotcha","affected_versions":"=0.1.0"}],"env_vars":null,"search_vec":"'0.1.0':14 '2018':54 'activ':51 'advanc':62 'around':28 'behavior':39 'bundl':67 'cli':4,26 'command':6 'command-lin':5 'custom':37 'featur':63 'file':20,42 'help':46 'html':2,11,19,31 'html-minifi':10,30 'html-minifier-c':1 'integr':68 'interfac':8 'javascript':69 'lack':61 'librari':33 'lightweight':47 'like':64 'line':7 'minif':38,58 'minifi':3,12,18,32 'offer':34 'option':35 'output':41 'provid':24 'reduc':22 'simpl':57 'sinc':53 'size':23 'specif':43 'stream':65 'support':40 'task':59 'tool':16 'updat':52 'usag':45 'use':55 'version':13 'wrapper':27,48","created_at":"2026-06-04T18:51:27.075519+00:00","updated_at":"2026-06-04T18:51:27.075519+00:00","problems":[{"fix":"Run npm install -g html-minifier-cli to install globally.","cause":"Package not installed globally or locally when using npx.","error":"Error: Cannot find module 'html-minifier-cli'"},{"fix":"Check npm global bin path (npm bin -g) and add to PATH, or reinstall with npm install -g html-minifier-cli.","cause":"Global installation path not in PATH after npm install -g.","error":"htmlmin: command not found"},{"fix":"Use child_process to invoke the CLI or import the html-minifier package directly.","cause":"Trying to import the package programmatically when it only exports a CLI binary.","error":"TypeError: htmlmin.minify is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/curvedmark/html-minifier-cli","github":"https://github.com/curvedmark/html-minifier-cli","docs":null,"changelog":null,"pypi":null,"npm":"html-minifier-cli","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}