{"library":"prettier_d_slim","title":"prettier_d_slim","description":"A daemon wrapper for Prettier that dramatically reduces formatting time by running a background server, eliminating Node.js startup and module loading overhead. Current stable version is 1.2.0, with infrequent releases. Compared to alternatives like prettier_d, prettier_d_slim is minimal and stable, with a smaller footprint. It automatically picks a free port, stores credentials in ~/.prettier_d_slim, and supports per-directory Prettier versions via a nanolru cache. Ideal for editor save-time formatting where sub-150ms latency is desired.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier_d_slim"],"cli":{"name":"prettier_d_slim","version":null}},"imports":["npx prettier_d_slim --stdin-filepath file.js < file.js","prettier_d_slim start","const core_d = require('core_d');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// Install globally\n$ npm install -g prettier_d_slim\n\n# Format a file via stdin (first time starts server, ~130ms)\n$ cat file.js | prettier_d_slim --stdin --stdin-filepath file.js\n\n# Format with text argument\n$ prettier_d_slim --stdin-filepath file.js --text 'const foo = {}'\n\n# Control server\n$ prettier_d_slim start\n$ prettier_d_slim status\n$ prettier_d_slim restart\n$ prettier_d_slim stop\n\n# Super fast with netcat (<50ms after server running)\n$ PORT=$(cat ~/.prettier_d_slim | cut -d\" \" -f1)\n$ TOKEN=$(cat ~/.prettier_d_slim | cut -d\" \" -f2)\n$ echo \"$TOKEN $PWD file.js\" | nc localhost $PORT","lang":"bash","description":"Demonstrates installation, basic stdin formatting, server control commands, and netcat usage for sub-50ms formatting.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}