Registry / devops / be-pretty

be-pretty

JSON →
library1.1.8jsnpmunverified

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.

npm install be-pretty
INSTALL
IMPORT
SIG · BE-PRETTY
B
be-pretty
devopsjavascriptv1.1.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
npx be-pretty
require('be-pretty')
CLI tool, no programmatic API
run
npx be-pretty run
be-pretty
run is the default command
setDefault
npx be-pretty setDefault -p ./path
be-pretty setDefault (no flag)
requires -p flag or .prettierrc in CWD

Shows typical usage: run setup, skip formatting, set custom config, format all.

npx be-pretty # or with skip formatting npx be-pretty --skipFormatting # customize default .prettierrc npx be-pretty setDefault -p /path/to/.prettierrc # format all files in repo npx be-pretty formatAll
be-pretty --version
Debug
Known issues
gotchabe-pretty defaults to npm unless yarn.lock is present. May cause unexpected package manager switches.
fix
Ensure lockfile matches intended package manager or manually specify.
affects: all
gotchaThe --skipFormatting flag must be used before the command, e.g., npx be-pretty --skipFormatting, not after.
fix
Use npx be-pretty --skipFormatting run.
affects: all
gotchasetDefault command with no -p flag uses .prettierrc in CWD; if absent, command fails silently.
fix
Ensure a .prettierrc file exists or provide -p flag.
affects: all
deprecatedOlder versions may use lint-staged instead of pretty-quick. Current version uses pretty-quick.
fix
Update to latest version via npm i -g be-pretty@latest.
affects: <1.0
gotchaThe package requires npx to be globally available; otherwise command fails.
fix
Install npx via npm i -g npx or use npm/yarn/pnpm directly.
affects: all
Errors
Common errors & fixes
be-pretty: command not found
Package not installed globally or not using npx
fix
Use npx be-pretty or install globally: npm i -g be-pretty
Error: Cannot find module 'prettier'
Missing dependency after be-pretty install
fix
Run npm install inside the project to ensure all deps are present
be-pretty setDefault: No .prettierrc found in CWD
Missing file when no -p flag provided
fix
Create a .prettierrc file or use -p flag with path
be-pretty: Unsupported package manager
Lockfile type not recognized
fix
Ensure lockfile (.yarn.lock, package-lock.json, pnpm-lock.yaml) is present
Upgrade
Version history
1.1.8latest on npm
Audit
Dependencies
prettierrequiredcore formatting engine
huskyrequiredgit hooks manager for pre-commit
pretty-quickrequiredformat only changed files on commit
Agent activity
5 hits · last 30 days
node
4
Resources
be-pretty — npm install be-pretty · libregistry