ai-startup
CHAPTER 20 / 100
읽기 약 2분
FUNCTION
Claude Code: 터미널에서 AI와 코딩
핵심 개념
CLI 도구·multi-step·자동화·실전 — 터미널에서 AI 협업.
본문
Claude Code — 차별점
[GUI vs CLI]
Cursor: VS Code 기반 GUI
Claude Code: 터미널 기반 CLI
[강점]
- 자동화 친화 (스크립트)
- 큰 코드베이스 효율
- 멀티 스텝 작업
- Hooks·MCP 통합
- 1M context (Opus 4.7)셋업
# 설치 (npm)
npm install -g @anthropic-ai/claude-code
# 실행
cd my-project
claude
# 첫 실행 — 인증
# Anthropic 콘솔에서 API key 발급
# 또는 Claude Pro/Max 계정 연결기본 사용
$ claude
> Add a new feature: cart with localStorage persistence
[Claude analyzes codebase]
[Suggests files to modify]
[Asks for confirmation]
> y
[Implements changes]
[Runs tests]
→ 자연어로 명령
→ 자동으로 파일 수정
→ Git diff 보여줌CLAUDE.md (프로젝트 규칙)
# CLAUDE.md
## Project Stack
- Next.js 16 + TypeScript strict
- Tailwind + shadcn
- Prisma + PostgreSQL
- Vitest + Testing Library
## Conventions
- Server Components by default
- 'use client' only for interactivity
- Repository pattern for DB access
- Zod for all input validation
## Testing
- Run tests: pnpm test
- Coverage 80%+ required
## Build
- pnpm build (must pass)
- pnpm typecheck (no errors)Hooks (자동화)
# .claude/settings.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "pnpm prettier --write $FILE" }
]
}
],
"Stop": [
{
"hooks": [
{ "type": "command", "command": "pnpm test" }
]
}
]
}
}
→ 파일 수정 후 자동 prettier
→ 작업 종료 시 자동 테스트MCP (Model Context Protocol)
[설치]
claude mcp add postgres
claude mcp add github
[활용]
"Show me all PRs from last week"
[Claude uses GitHub MCP to fetch]
"Query database for users created today"
[Claude uses Postgres MCP]
→ 외부 시스템 통합
→ 복잡한 워크플로우 자동멀티 스텝 작업 예시
$ claude
> Add a complete authentication flow:
> 1. Email/password signup with Zod validation
> 2. Email verification
> 3. JWT tokens (access + refresh)
> 4. Protected routes middleware
> 5. Login/logout/profile UI
> 6. Tests for all of the above
>
> Use Supabase Auth + Resend for emails.
[Claude breaks into todos]
[Implements each step]
[Asks for review at each phase]
[Final: tests pass, build clean]자동화 스크립트
# 매일 아침 — 의존성 업데이트
#!/bin/bash
cd ~/projects/myapp
claude --print "Update all minor and patch dependencies. Run tests. Show me what changed."
# 결과 확인 후 commitCursor vs Claude Code 사용
[Cursor 적합]
- 단일 파일 편집
- UI 개발 (실시간 보기)
- 학습 단계
[Claude Code 적합]
- 큰 리팩토링
- 멀티 파일·멀티 스텝
- 자동화 통합
- 큰 코드베이스 분석
→ 둘 다 사용 — 상황에 맞춰
→ Cursor + Claude Code = 시너지비용 관리
[Claude Pro $20/mo]
- Claude.ai + 한도 있음
- Claude Code 일부 사용
[Claude Max $100/mo]
- 더 많은 사용량
- Opus 4.7 무제한
[API Direct]
- 사용한 만큼만
- Sonnet $3/M input, $15/M output
- Opus $15/M input, $75/M output
→ 매일 사용 = Pro 또는 Max
→ 가끔 = APIClaude.md 활용 사례
# 추가 패턴
## Slash Commands
- /init - Initialize new project structure
- /test - Run all tests
- /deploy - Deploy to production
## Custom Subagents
- code-reviewer
- security-auditor
- performance-optimizer
→ 매번 같은 명세 반복 X
→ 한 단어로 복잡한 작업다음 챕터
CH.21 "v0.dev: AI로 UI 생성".
AI 프롬프트
🤖 AI에게 잘 물어보는 법 — 모델·전략별 프롬프트
무료
월 $0 — 검증·시작 단계
Claude Code을 무료 도구만으로 시작하는 방법을 알려줘.
소자본
월 $20~50 — MVP·초기 운영
월 $20~50 예산으로 Claude Code을 검증·MVP 단계까지 진행하는 전략은?
프로덕션
월 $200~500 — 성장 단계
Claude Code을 프로덕션 단계로 확장할 때 필요한 도구·운영 체계는?
스택
풀스택 — 도구 조합 분석
2026년 Claude Code 관련 도구 5개를 조합한 추천 스택을 알려줘.
⭐ 이것만 기억하세요
Claude Code: 터미널에서 AI와 코딩은 이 3가지만 확실히 잡으세요
1.Claude Code = 터미널 기반 — 자동화·큰 작업에 적합
2.CLAUDE.md + Hooks + MCP = 강력한 워크플로우
3.Cursor + Claude Code 조합 = 1인 개발자 효율 극대
공유하기
진행도 20 / 100