CLI

One-command setup for PleaseAI code style — installs packages and writes config files.

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

The CLI will:

  1. Detect your package manager from the lockfile (bun → pnpm → yarn → npm, falling back to bun)
  2. Show a checkbox UI listing the available tools; already-installed ones are labelled (installed)
  3. Install the packages you select as dev dependencies
  4. 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

Toolnpm package(s)Config file
eslint-config@pleaseai/eslint-config, eslinteslint.config.mjs
prettier-config@pleaseai/prettier-config, prettierpackage.json#prettier
editorconfig@pleaseai/editorconfig.editorconfig
agents-mdAGENTS.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:

AGENTS.md
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

FlagDescription
--yes, -yAccept defaults and overwrite existing files without prompting
--lang <ko|en>Force the CLI locale (defaults to $LC_ALL / $LANG)
--help, -hPrint help
--version, -vPrint 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-style
  • please-style (short alias)

Both point to the same executable.

Copyright © 2026