CLI
CLI
@pleaseai/code-style is a zero-config CLI that wires PleaseAI's shared code style into any project. It installs the ESLint / Prettier / EditorConfig packages and manages an AGENTS.md rules block so AI coding assistants know how to write code that passes lint on the first try.
Inspired by ultracite and NaverPay's @naverpay/code-style-cli.
Quick Start
Run from the root of any project that has a package.json:
bunx @pleaseai/code-style
pnpm dlx @pleaseai/code-style
npx @pleaseai/code-style
The CLI will:
- Detect your package manager from the lockfile (bun → pnpm → yarn → npm, falling back to bun)
- Show a checkbox UI listing the available tools; already-installed ones are labelled
(installed) - Install the packages you select as dev dependencies
- Write or update the matching config files
Commands
init
Interactive setup — the default when no subcommand is given.
pleaseai-code-style init
pleaseai-code-style init --yes # non-interactive, accept defaults
update
Refresh only the AGENTS.md rules block without touching packages or other config files. Use this after bumping @pleaseai/code-style to pull in the latest rules.
pleaseai-code-style update
doctor
Report the current project configuration status — which packages are installed, which config files exist.
pleaseai-code-style doctor
Supported Tools
| Tool | npm package(s) | Config file |
|---|---|---|
| eslint-config | @pleaseai/eslint-config, eslint | eslint.config.mjs |
| prettier-config | @pleaseai/prettier-config, prettier | package.json#prettier |
| editorconfig | @pleaseai/editorconfig | .editorconfig |
| agents-md | — | AGENTS.md (marker-managed block) |
The AGENTS.md Rules Block
The CLI writes a marker-delimited block into AGENTS.md so you can mix your own content around it without losing edits on the next run:
My project notes live here.
<!-- pleaseai-code-style:start -->
# PleaseAI Code Style
These rules are managed by `@pleaseai/code-style`. Run
`pleaseai-code-style update` to refresh this block.
- Formatter: `@pleaseai/eslint-config` (wraps `@antfu/eslint-config`)
- No semicolons, single quotes, 2-space indent, trailing commas, LF line endings
- ESM only — never emit `require`/`module.exports`
- ...
<!-- pleaseai-code-style:end -->
My own content stays here untouched.
The CLI only owns the content between the two marker comments — everything else in AGENTS.md is preserved verbatim. Running update twice in a row is a no-op; the block never duplicates.
The full canonical rules list is shipped as node_modules/@pleaseai/code-style/rules.md for AI assistants that prefer to read the long version.
Options
| Flag | Description |
|---|---|
--yes, -y | Accept defaults and overwrite existing files without prompting |
--lang <ko|en> | Force the CLI locale (defaults to $LC_ALL / $LANG) |
--help, -h | Print help |
--version, -v | Print the CLI version |
Localisation
The CLI auto-detects your locale from LC_ALL, LANG, or LC_MESSAGES and currently ships Korean and English messages. Override with --lang ko or --lang en:
pleaseai-code-style --lang ko init
CI Usage
Combine --yes with a locale override for a fully non-interactive invocation suitable for CI or project templates:
pleaseai-code-style --yes --lang en init
This accepts defaults for every tool, overwrites any existing config files, and uses English output.
Binaries
The package exposes two bin entries — use whichever you prefer:
pleaseai-code-styleplease-style(short alias)
Both point to the same executable.