AI 코딩 도우미(CLI)
명령줄 AI 코딩 도우미를 사용하면 터미널에서 직접 대규모 언어 모델과 상호 작용하여 코드 작성, 디버그, 리팩터링, Git 작업 수행 등을 수행할 수 있습니다. 터미널 워크플로를 선호하는 개발자의 경우 이러한 도구를 사용하면 생산성을 크게 높일 수 있습니다.
클로드 코드
Claude Code는 Claude 모델을 기반으로 하는 Anthropic의 공식 CLI 코딩 도우미입니다. 전체 코드베이스를 이해하고, 명령을 실행하고, 파일을 편집할 수 있어 가장 강력한 터미널 AI 프로그래밍 도구 중 하나입니다.
클로드 코드 설치
# Ensure Node.js 18+ is installed
node --version
# If Node.js is not installed, install it first
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
# Install Claude Code globally via npm
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version기본 사용법
# Start Claude Code in your project directory
cd ~/my-project
claude
# Direct query mode (non-interactive)
claude "Explain this project's architecture"
# Pipe mode -- pass file contents to Claude
cat error.log | claude "Analyze this error log and find the root cause"
# Execute a single task and exit
claude --print "Generate a Python .gitignore file"대화형 세션
claude을 시작한 후 다음을 수행할 수 있는 대화형 세션에 들어갑니다.
> Read all Python files in the src/ directory and summarize the project structure
> Add a logging decorator function to utils.py
> Find all unhandled exceptions and fix them
> Run the tests and fix any failing cases
> Write a Dockerfile to containerize this project구성
# Set API key
export ANTHROPIC_API_KEY="sk-ant-xxxxx"
# Write to shell config for persistence
echo 'export ANTHROPIC_API_KEY="sk-ant-xxxxx"' >> ~/.bashrc
source ~/.bashrc프로젝트 수준 구성:
프로젝트 루트에 CLAUDE.md 파일을 생성하여 프로젝트 컨텍스트 및 AI 동작 규칙을 정의합니다.
cat > CLAUDE.md << 'EOF'
# Project Description
This is a Python Flask web application project.
## Tech Stack
- Python 3.12
- Flask 3.x
- PostgreSQL 16
- Redis
## Code Standards
- Use Black for code formatting
- Use mypy for type checking
- All functions must have docstrings
- Tests use pytest
## Project Structure
- `app/` -- Main application code
- `tests/` -- Test files
- `migrations/` -- Database migrations
EOF명령 빠른 참조
# Enter interactive mode
claude
# Resume last session
claude --continue
# Use a specific model
claude --model claude-sonnet-4-20250514
# Output as plain text (suitable for scripts)
claude --print "Generate a UUID"
# View help
claude --helpClaude Code는 자동으로 프로젝트 파일을 읽어 코드 컨텍스트를 이해합니다. 대규모 프로젝트에서 좋은 CLAUDE.md 파일을 작성하면 AI가 프로젝트 구조와 코딩 표준을 더 정확하게 이해하고 상호 작용 품질을 크게 향상시키는 데 도움이 됩니다.
에이더
Aider는 여러 모델(Claude, GPT-4, 로컬 모델 등)에 대한 연결을 지원하고 코드 파일을 직접 편집하고 Git 커밋을 자동으로 생성할 수 있는 오픈 소스 터미널 AI 쌍 프로그래밍 도구입니다.
에이더 설치
# Ensure Python 3.10+ is installed
python3 --version
# Method 1: Install via pipx (recommended)
sudo apt install -y pipx
pipx ensurepath
pipx install aider-chat
# Method 2: Install via pip inside a virtual environment (PEP 668: no pip into the system Python)
python3 -m venv ~/aider-env
source ~/aider-env/bin/activate
pip install aider-chat
# Method 3: Via official install script
curl -LsSf https://aider.chat/install.sh | bash
# Verify installation
aider --version모델에 연결
# Use Claude (set API key)
export ANTHROPIC_API_KEY="sk-ant-xxxxx"
aider --model claude-sonnet-4-20250514
# Use OpenAI GPT-4
export OPENAI_API_KEY="sk-xxxxx"
aider --model gpt-4o
# Use local Ollama model
aider --model ollama/qwen2.5-coder:14b
# Use DeepSeek
export DEEPSEEK_API_KEY="your-key"
aider --model deepseek/deepseek-chat기본 사용법
# Start Aider in a Git repository
cd ~/my-project
aider
# Specify files to edit
aider src/main.py src/utils.py
# Use architect mode (design first, then code)
aider --architectAider 대화형 인터페이스에서:
> Add command-line argument parsing to main.py
> /add tests/test_main.py # Add a file to the session
> /run pytest # Run a command
> /diff # View what AI changed
> /undo # Undo the last AI change
> /help # View all commands구성 파일
프로젝트 루트에 .aider.conf.yml을 생성합니다.
# .aider.conf.yml
model: claude-sonnet-4-20250514
auto-commits: true
dark-mode: true
stream: trueAider는 각 AI 변경에 대해 자동으로 Git 커밋을 생성합니다. 자동 커밋을 원하지 않으면 --no-auto-commits 플래그로 시작하세요.
GitHub 부조종사 CLI
GitHub Copilot CLI는 Copilot의 기능을 터미널에 제공하여 셸 명령을 생성하고 명령 의미를 설명하는 데 도움을 줍니다.
설치
이전 gh extension install github/gh-copilot 확장은 더 이상 사용되지 않습니다. 대신 npm을 통해 독립형 Copilot CLI를 설치하십시오.
# First ensure you have Node.js (if not installed)
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
# Install GitHub Copilot CLI via npm
npm install -g @github/copilot
# Verify installation
copilot --version기본 사용법
# Start an interactive session
copilot
# Pass a prompt directly (the prompt is a positional argument)
copilot "Find all files larger than 100MB in the current directory"대화형 세션에서는 자연어로 의도를 설명합니다. Copilot은 명령이나 설명을 제안하고 실행하기 전에 확인을 요청합니다.
GitHub Copilot CLI에는 유효한 GitHub Copilot 구독이 필요하며, 첫 번째 실행에서는 GitHub 계정에 로그인하는 과정을 안내합니다.
제미니 CLI
Gemini CLI는 Gemini 모델을 기반으로 하는 Google의 터미널 AI 도구로, 코드 이해, 파일 작업, 멀티모달 기능을 지원합니다.
설치
# First ensure you have Node.js (if not installed)
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
# Install Gemini CLI via npm
npm install -g @google/gemini-cli
# Verify installation
gemini --version구성 및 사용법
# Set API key
export GOOGLE_API_KEY="your-api-key"
# Or use Google Cloud authentication
# gcloud auth application-default login
# Start Gemini CLI
cd ~/my-project
gemini
# Direct query
gemini "Explain this project's directory structure"대화형 모드에서:
> Analyze code quality of all files under src/
> Help me refactor database.py to use connection pooling
> Check package.json and update outdated dependenciesGemini CLI 특수 기능
# Multimodal capabilities -- analyze images
gemini "Describe the UI layout in this screenshot" < screenshot.png
# Handle large codebases (Gemini supports very large context windows)
gemini "Summarize all API endpoints in this repository"오픈코드
OpenCode는 Claude, OpenAI, Google 및 로컬 모델 등을 지원하는 오픈 소스 터미널 AI 코딩 도우미(현재 프로젝트는 github.com/sst/opencode 에 있음)입니다.
설치
# Method 1 (recommended): official install script
curl -fsSL https://opencode.ai/install | bash
# Method 2: install via npm
npm install -g opencode-ai@latest
# Verify installation
opencode --version구성
프로젝트 디렉터리 또는 opencode.json에 구성 파일 ~/.config/opencode/을 만듭니다.
{
"provider": "anthropic",
"model": "claude-sonnet-4-20250514",
"mcpServers": {}
}기본 사용법
# Set API key
export ANTHROPIC_API_KEY="sk-ant-xxxxx"
# Start in your project
cd ~/my-project
opencodeOpenCode는 파일 트리, 대화 패널 및 터미널 출력이 포함된 IDE와 유사한 터미널 사용자 인터페이스(TUI)를 제공합니다.
CLI 도구 비교
| 특징 | 클로드 코드 | 에이더 | 코파일럿 CLI | 제미니 CLI | 오픈코드 |
|---|---|---|---|---|---|
| 개발자 | 인류학 | 오픈 소스 | GitHub | 오픈 소스 | |
| 기본 모델 | 클로드 | 다중 모델 | 부조종사 모델 | 쌍둥이자리 | 다중 모델 |
| 현지 모델 | 제한된 | 지원됨 | 지원되지 않음 | 지원되지 않음 | 지원됨 |
| 파일 편집 | 직접 편집 | 직접 편집 | 직접 편집 | 직접 편집 | 직접 편집 |
| Git 통합 | 지원됨 | 자동 커밋 | 지원됨 | 지원됨 | 지원됨 |
| 명령 실행 | 지원됨 | 지원됨 | 지원됨 | 지원됨 | 지원됨 |
| 인터페이스 | REPL | REPL | REPL | REPL | TUI |
| 가격 | API 청구 | API 청구 | 신청 | API 청구 | API 청구 |
환경 준비 요약
이러한 CLI 도구를 사용하기 전에 다음 환경을 준비하십시오.
# Install Node.js (required for Claude Code, Gemini CLI, Copilot CLI)
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs
# Install Python and pipx (pipx recommended for Aider)
sudo apt install -y python3 python3-pip python3-venv pipx
pipx ensurepath
# Create API key configuration file
cat >> ~/.bashrc << 'EOF'
# AI API Keys
export ANTHROPIC_API_KEY=""
export OPENAI_API_KEY=""
export GOOGLE_API_KEY=""
EOF
source ~/.bashrc모든 CLI 도구는 처리를 위해 코드를 클라우드 API로 보냅니다(로컬 모델을 사용하지 않는 경우). 민감한 코드나 비공개 코드로 작업할 때는 각 도구의 데이터 개인정보 보호정책을 이해해야 합니다. 로컬 모델을 사용하면(예: Aider + Ollama을 통해) 데이터를 외부로 보내는 것을 완전히 방지할 수 있습니다.