{"id":24985,"library":"be-pretty","title":"be-pretty","description":"CLI tool that automates adding Prettier to an existing project with full setup including Husky and pretty-quick for pre-commit hooks. v1.1.8 released as needed, no fixed cadence. Key differentiator: single command legacy codebase installation vs manual multi-step configuration. Requires Node.js and npm/yarn/pnpm/bun. Ships TypeScript declarations.","status":"active","version":"1.1.8","language":"javascript","source_language":"en","source_url":"https://github.com/capaj/be-pretty","tags":["javascript","prettier","formatter","boilerplate","typescript"],"install":[{"cmd":"npm install be-pretty","lang":"bash","label":"npm"},{"cmd":"yarn add be-pretty","lang":"bash","label":"yarn"},{"cmd":"pnpm add be-pretty","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core formatting engine","package":"prettier","optional":false},{"reason":"git hooks manager for pre-commit","package":"husky","optional":false},{"reason":"format only changed files on commit","package":"pretty-quick","optional":false}],"imports":[{"note":"CLI tool, no programmatic API","wrong":"require('be-pretty')","symbol":"default","correct":"npx be-pretty"},{"note":"run is the default command","wrong":"be-pretty","symbol":"run","correct":"npx be-pretty run"},{"note":"requires -p flag or .prettierrc in CWD","wrong":"be-pretty setDefault (no flag)","symbol":"setDefault","correct":"npx be-pretty setDefault -p ./path"}],"quickstart":{"code":"npx be-pretty\n\n# or with skip formatting\nnpx be-pretty --skipFormatting\n\n# customize default .prettierrc\nnpx be-pretty setDefault -p /path/to/.prettierrc\n\n# format all files in repo\nnpx be-pretty formatAll","lang":"javascript","description":"Shows typical usage: run setup, skip formatting, set custom config, format all."},"warnings":[{"fix":"Ensure lockfile matches intended package manager or manually specify.","message":"be-pretty defaults to npm unless yarn.lock is present. May cause unexpected package manager switches.","severity":"gotcha","affected_versions":"all"},{"fix":"Use npx be-pretty --skipFormatting run.","message":"The --skipFormatting flag must be used before the command, e.g., npx be-pretty --skipFormatting, not after.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure a .prettierrc file exists or provide -p flag.","message":"setDefault command with no -p flag uses .prettierrc in CWD; if absent, command fails silently.","severity":"gotcha","affected_versions":"all"},{"fix":"Update to latest version via npm i -g be-pretty@latest.","message":"Older versions may use lint-staged instead of pretty-quick. Current version uses pretty-quick.","severity":"deprecated","affected_versions":"<1.0"},{"fix":"Install npx via npm i -g npx or use npm/yarn/pnpm directly.","message":"The package requires npx to be globally available; otherwise command fails.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use npx be-pretty or install globally: npm i -g be-pretty","cause":"Package not installed globally or not using npx","error":"be-pretty: command not found"},{"fix":"Run npm install inside the project to ensure all deps are present","cause":"Missing dependency after be-pretty install","error":"Error: Cannot find module 'prettier'"},{"fix":"Create a .prettierrc file or use -p flag with path","cause":"Missing file when no -p flag provided","error":"be-pretty setDefault: No .prettierrc found in CWD"},{"fix":"Ensure lockfile (.yarn.lock, package-lock.json, pnpm-lock.yaml) is present","cause":"Lockfile type not recognized","error":"be-pretty: Unsupported package manager"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}