+ 요구 스택과 실제 변환 흐름을 가장 구체적으로 연결했다.
- 이름 충돌을 검사하지만 발견해도 링크를 막지는 않는다.
CLI 프로젝트를 만들 때 패키지 매니저, 언어, 빌드·테스트 도구, 명령 구조, 배너와 플래그 관례를 따르게 합니다.
| 분류 | 개발 › 코딩 |
|---|---|
| 태그 | 검토개발자코드체크리스트 |
# Cli taste of AA
- Use pnpm as the package manager for CLI projects. Confidence: 1.00
- Use TypeScript for CLI projects. Confidence: 0.95
- Use tsup as the build tool for CLI projects. Confidence: 0.95
- Use vitest for testing CLI projects. Confidence: 0.95
- Use Commander.js for CLI command handling. Confidence: 0.95
- Use clack for interactive user input in CLI projects. Confidence: 0.95
- Check for existing CLI name conflicts before running npm link. Confidence: 0.95
- Organize CLI commands in a dedicated commands folder with each module separated. Confidence: 0.95
- Include a small 150px ASCII art welcome banner displaying the CLI name. Confidence: 0.95
- Use lowercase flags for version and help commands (-v, --version, -h, --help). Confidence: 0.85
- Start projects with version 0.0.1 instead of 1.0.0. Confidence: 0.85
- Version command should output only the version number with no ASCII art, banner, or additional information. Confidence: 0.90
- Read CLI version from package.json instead of hardcoding it in the source code. Confidence: 0.75
- Always use ora for loading spinners in CLI projects. Confidence: 0.95
- Use picocolors for terminal string coloring in CLI projects. Confidence: 0.90
- Use Ink for building interactive CLI UIs in CommandCode projects. Confidence: 0.80
- Use ink-spinner for loading animations in Ink-based CLIs. Confidence: 0.70
- Hide internal flags from help: .addOption(new Option('--local').hideHelp()). Confidence: 0.90
- Use pnpm.onlyBuiltDependencies in package.json to pre-approve native binary builds. Confidence: 0.60
- Use ANSI Shadow font for ASCII art at large terminal widths and ANSI Compact for small widths. Confidence: 0.85
- Use minimal white, gray, and black colors for ASCII art banners. Confidence: 0.85
- Check if package is publishable using `npx can-i-publish` before building or publishing. Confidence: 0.85TypeScript CLI 프로젝트의 선호 스택과 규칙 모음이다. 각 항목에 confidence가 붙어 있으며 pnpm, tsup, vitest, Commander.js 등을 권장한다.
Claude가 요구사항 반영과 실무 구체성에서 가장 우수하다. Gemini는 구현 모순과 근거 없는 절감치가 있고, ChatGPT는 핵심 취향 일부가 선언 수준에 머문다.
+ 요구 스택과 실제 변환 흐름을 가장 구체적으로 연결했다.
- 이름 충돌을 검사하지만 발견해도 링크를 막지는 않는다.
+ 폴더 구조와 변환 처리 단계를 읽기 쉽게 정리했다.
- 단축 버전 플래그와 대화형 clack 설계가 구체적이지 않다.
+ 패키지 설정과 배너·숨김 옵션 구현 예시가 명확하다.
- 기본 실행 배너 조건과 옵션 설명·구현이 서로 어긋난다.
| 기준 | ChatGPT | Claude | Gemini | 앞선 모델 |
|---|---|---|---|---|
| 지시 준수 | 7 | 9 | 8 | Claude +13% |
| 정확성 | 7 | 8 | 6 | Claude +14% |
| 구체성 | 8 | 10 | 8 | Claude +25% |
| 구성·가독성 | 8 | 9 | 8 | Claude +13% |
| 분량 적정성 | 7 | 8 | 7 | Claude +14% |
gpt-5.6-sol가 모델 이름을 가린 채 1~10점으로 채점했습니다 (2026-09-24). 측정값이 아니라 AI 심사 결과입니다.
같은 입력을 세 모델에 넣어 받은 답을 그대로 옮겼습니다. 각 CLI(에이전트 하네스)에서 실행했습니다. ChatGPT·Claude 앱이나 웹에서는 답이 다를 수 있습니다.
[붙여 넣은 자료] 위 취향 기준 그대로, 여러 폴더에 흩어진 이미지 파일을 한 번에 WebP로 변환해주는 `imgshrink`라는 CLI 도구를 새로 설계해줘. package.json, 폴더 구조, 커맨드 목록(옵션 포함)까지 정리해줘.
imgshrink CLI 설계안여러 폴더의 이미지 파일을 재귀적으로 찾아 WebP로 변환하고, 원본 보존·덮어쓰기·품질·출력 디렉터리 등을 제어하는 CLI입니다.
pnpm dlx imgshrink ./images
imgshrink ./public ./assets \
--output ./dist \
--quality 82 \
--recursive \
--keep
| 커맨드 | 설명 |
|---|---|
imgshrink convert <paths...> |
이미지 검색 및 WebP 변환 |
imgshrink config |
기본 설정 확인 및 변경 |
imgshrink doctor |
이미지 처리 환경과 의존성 점검 |
imgshrink --version |
버전만 출력 |
imgshrink --help |
도움말 출력 |
기본 커맨드는 편의를 위해 convert로 동작하게 설계할 수 있습니다.
imgshrink ./images
convertimgshrink convert <paths...> [options]
| 옵션 | 기본값 | 설명 |
|---|---|---|
-o, --output <dir> |
입력 폴더 옆 | 변환 결과 출력 폴더 |
-q, --quality <number> |
82 |
WebP 품질, 1~100 |
-r, --recursive |
true |
하위 폴더 재귀 탐색 |
--no-recursive |
- | 하위 폴더 탐색 안 함 |
--keep |
false |
원본 파일 보존 |
--overwrite |
false |
기존 WebP 덮어쓰기 |
--suffix <text> |
없음 | 파일명 접미사 추가 |
--format <formats> |
jpg,jpeg,png |
대상 확장자 목록 |
--dry-run |
false |
실제 변환 없이 대상만 표시 |
--delete-originals |
false |
변환 성공 후 원본 삭제 |
--concurrency <number> |
CPU 기반 | 동시 처리 개수 |
--silent |
false |
진행 출력 최소화 |
--json |
false |
결과를 JSON으로 출력 |
--local |
숨김 | 내부 개발용 로컬 설정 사용 |
예시:
imgshrink convert ./src ./static \
--output ./dist \
--quality 85 \
--keep \
--overwrite
imgshrink ./images --dry-run
configimgshrink config [options]
| 옵션 | 설명 |
|---|---|
--show |
현재 설정 출력 |
--quality <number> |
기본 품질 설정 |
--output <dir> |
기본 출력 경로 설정 |
--reset |
설정 초기화 |
doctorimgshrink doctor
확인 항목:
imgshrink 버전터미널 너비에 따라 ANSI Shadow 또는 ANSI Compact 스타일을 사용합니다.
_ _ _ _
(_)___ _ __ ___ | |__ _ __ _ _| |__ (_)___| |__
| / __| '_ \ / __|| '_ \| '__|| | | | '_ \ | / __| '_ \
| \__ \ | | | (__ | | | | | | |_| | | | | | \__ \ | | |
|_|___/_| |_|\___||_| |_|_| \__,_|_| |_| |_|___/_| |_|
--version 실행 시 배너 없이 버전만 출력$ imgshrink --version
0.0.1
imgshrink/
├── .gitignore
├── README.md
├── package.json
├── pnpm-lock.yaml
├── tsconfig.json
├── tsup.config.ts
├── vitest.config.ts
├── src/
│ ├── index.ts
│ ├── cli.ts
│ ├── constants.ts
│ ├── banner/
│ │ ├── index.ts
│ │ ├── shadow.ts
│ │ └── compact.ts
│ ├── commands/
│ │ ├── convert.ts
│ │ ├── config.ts
│ │ └── doctor.ts
│ ├── core/
│ │ ├── discover-images.ts
│ │ ├── convert-image.ts
│ │ ├── convert-batch.ts
│ │ └── result.ts
│ ├── config/
│ │ ├── config-store.ts
│ │ └── config-schema.ts
│ ├── ui/
│ │ ├── logger.ts
│ │ ├── progress.ts
│ │ └── prompts.ts
│ └── utils/
│ ├── paths.ts
│ ├── file-size.ts
│ └── package-version.ts
└── tests/
├── discover-images.test.ts
├── convert-image.test.ts
├── config.test.ts
└── cli.test.ts
package.json{
"name": "imgshrink",
"version": "0.0.1",
"description": "Batch-convert images from multiple folders to WebP",
"type": "module",
"bin": {
"imgshrink": "./dist/index.js"
},
"files": [
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"dev": "tsx src/index.ts",
"build": "tsup",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit",
"check:publish": "npx can-i-publish",
"prepublishOnly": "pnpm check:publish && pnpm build"
},
"dependencies": {
"@clack/prompts": "^0.10.0",
"commander": "^14.0.0",
"ora": "^8.2.0",
"picocolors": "^1.1.1",
"sharp": "^0.34.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"tsx": "^4.0.0",
"tsup": "^8.0.0",
"typescript": "^5.0.0",
"vitest": "^3.0.0"
},
"engines": {
"node": ">=20"
},
"pnpm": {
"onlyBuiltDependencies": [
"sharp"
]
}
}
tsup.config.tsimport { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["esm"],
dts: false,
clean: true,
sourcemap: true,
banner: {
js: "#!/usr/bin/env node"
}
});
// src/commands/convert.ts
import { Command, Option } from "commander";
export function createConvertCommand() {
return new Command("convert")
.argument("<paths...>", "이미지 또는 폴더 경로")
.option("-o, --output <dir>", "출력 폴더")
.option("-q, --quality <number>", "WebP 품질", "82")
.option("-r, --recursive", "하위 폴더 재귀 탐색", true)
.option("--no-recursive", "하위 폴더 탐색 안 함")
.option("--keep", "원본 파일 보존")
.option("--overwrite", "기존 WebP 덮어쓰기")
.option("--dry-run", "실제 변환 없이 대상만 표시")
.option("--json", "JSON 결과 출력")
.addOption(
new Option("--local", "내부 개발용 로컬 설정 사용").hideHelp()
)
.action(async (paths, options) => {
// discover → validate → convert → report
});
}
입력 경로 수집
↓
지원 이미지 필터링
↓
중복 경로 제거
↓
출력 경로 계산
↓
변환 가능 여부 검증
↓
ora 스피너로 진행 상태 표시
↓
Sharp로 WebP 변환
↓
성공·실패·절감 용량 요약
완료 메시지 예시:
✓ 24개 이미지 변환 완료
✓ 18.4 MB → 7.2 MB
✓ 61% 용량 절감
@clack/prompts 사용ora 사용picocolors 사용package.json에서 읽음--version은 버전 번호만 출력.hideHelp()로 숨김sharp는 pnpm.onlyBuiltDependencies로 사전 승인npx can-i-publish 실행npm link 전에는 기존 imgshrink 명령 충돌 여부 확인command -v imgshrink || true
pnpm check:publish
pnpm build
pnpm link --global
| 방산 CV 12개월 로드맵 프롬프트 | |
| 2046 퍼즐 게임 제작 프롬프트 | |
| React 컴포넌트 통합 프롬프트 | |
| 3D 아바타 팩토리 요구 프롬프트 | |
| 3D FPS 게임 개발 프롬프트 |