{"library":"postcss-cli","title":"PostCSS CLI","description":"Official command-line interface for PostCSS, the popular CSS post-processor. Current stable version is 11.0.1 (2024-05-??). PostCSS CLI allows you to run PostCSS plugins from the terminal, supporting input/output files, directories, glob patterns, stdin/stdout piping, and watch mode. It requires Node ≥18 and PostCSS ≥8 as a peer dependency. Unlike alternative tools like PostCSS's programmatic API or build tool plugins, this CLI is designed for direct command-line usage and scripting, with support for configuration files (postcss.config.js), custom parsers/syntaxes, and sourcemaps. Version 8.0.0 made PostCSS a peer dependency, and version 7.0.0 dropped Node 6 & 8 support. The tool is actively maintained by the PostCSS core team.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install postcss-cli"],"cli":{"name":"postcss","version":null}},"imports":["npx postcss input.css -o output.css","const postcss = require('postcss-cli')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npm install --save-dev postcss postcss-cli\n\n# Basic usage: compile input.css to output.css\nnpx postcss input.css -o output.css\n\n# Watch mode\nnpx postcss input.css -o output.css --watch\n\n# Using a config file (postcss.config.js)\n# Example config:\n# module.exports = {\n#   plugins: [\n#     require('autoprefixer'),\n#   ]\n# }\nnpx postcss src/*.css --dir build --base src\n\n# With stdin/stdout piping\ncat input.css | npx postcss -u autoprefixer > output.css\n\n# Specify environment\nNODE_ENV=production npx postcss input.css -o output.css --no-map","lang":"javascript","description":"Installation and common CLI usage patterns: basic output, watch mode, config file, glob/dir, piping, and env variables.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}