Terminalden Vibe Coding DonemiTerminal’den Vibe Coding Dönemi

Bir gün VS Code’da kod yazıyorsunuz. Copilot öneri yapıyor, siz kabul edip geçiyorsunuz. Sonra Cursor’a geçtiniz, AI ile chat ediyorsunuz ama hâlâ mouse ile tıklıyor, tab’lar arasında geziyorsunuz. Güzel, ama…

Sonra Claude Code CLI’ı keşfettiniz. Terminal açtınız, claude "refactor this mess" yazdınız ve…

Her şey değişti.

10x
Daha hızlı context switching (mouse yok!)
Flow
Keyboard-only workflow = derin odak
Vibe
AI + Terminal = Pure coding bliss

Bu, sadece bir tool değil. Bu, yeni bir coding paradigm. “Vibe coding” diyoruz buna—terminal’de, AI ile, flow halinde, kesintisiz kod yazmak.

Bu rehber, tam olarak bunu öğretecek. Hiç Claude Code CLI kullanmadınız mı? Perfect. 15 dakikada productive olacaksınız.

Claude Code CLI Nedir? (60 Saniyede)

En basit tanımıyla: Terminal’den Claude ile konuşup, kod yazdırıp, dosyaları edit ettirebileceğiniz bir CLI tool.

Ama bu tanım, hikayenin sadece yarısı. Gerçek güç şurada:

Claude Code = Conversational Code Editor

IDE’lerde “kod yaz → AI öneri → kabul et” döngüsü vardı.

Claude Code’da ise: “Hedefe söyle → AI düşünsün → Kod otomatik yazılsın”

Fark ne? Intent vs Implementation.

Artık “nasıl” yerine “ne” söylüyorsunuz. Claude, implementation’ı hallediyor.

Geleneksel IDE + AI

  • Autocomplete odaklı
  • Line-by-line suggestions
  • Sen yazarsın, AI yardım eder
  • Mouse + keyboard karışık
  • Context switching çok

Claude Code CLI

  • Intent odaklı
  • File-level transformations
  • AI yazıyor, sen review ediyorsun
  • Sadece keyboard
  • Tek terminal, tek flow

İlk 5 Dakika: Başlangıç

Kurulum (1 Dakika)

$ npm install -g @anthropic-ai/claude-code # veya $ brew install claude-code $ claude auth # API key gir (Anthropic Console’dan al)

API Key Nereden?

1. console.anthropic.com → “API Keys” bölümü

2. “Create Key” → Kopyala

3. claude auth komutu ile yapıştır

Done! 🎉

İlk Komutun (30 Saniye)

$ cd my-project $ claude “add error handling to app.js” # Claude okur, düşünür, yapar: Reading app.js… Adding try-catch blocks… ✓ app.js updated

Bu kadar. Tek komut, job done.

İlk Başarı!

Tebrikler, Claude Code ile ilk kodunuzu yazdırdınız. Şimdi gerçek güce geçelim.


Temel Workflow: Chat → Code → Commit

Claude Code’un core loop’u üç adımdan oluşur. Bu loop’u master et, her şey kolay gelir.

  1. Chat: Hedefe Söyle

    “Add authentication”, “Fix this bug”, “Refactor for performance”—ne istediğini söyle.

    $ claude “add JWT authentication to the API”
  2. Code: Claude Yazsın

    Claude, codebase’i okur, context toplar, plan yapar, kod yazar.

    Reading api/routes.js, api/middleware/… Planning authentication flow… Creating auth.js, updating routes.js… ✓ 3 files changed
  3. Commit: Review & Ship

    Değişiklikleri review et, beğendiysen commit et.

    $ git diff # Review yap $ git add . $ git commit -m “Add JWT auth”

Bu loop, sonsuz tekrar edilir. Her iteration’da codebase ilerler, sen flow’dayken kalırsın.

Interaktif Mod: Continuous Conversation

Tek komut yerine, conversation başlatabilirsin:

$ claude # Interactive mode başlar Claude> Add a User model ✓ models/User.js created Claude> Now add validation ✓ User.js updated with validators Claude> Add unit tests ✓ tests/User.test.js created Claude> /exit

Her “Claude>” prompt’unda, bir önceki context’i hatırlıyor. Multi-turn conversation, continuous context.


4 Gerçek Scenario (Nasıl Kullanılır?)

Teoriyi bırak, pratiğe geçelim. İşte dört gerçek dünya scenario’su ve Claude Code ile nasıl halledilir.

Scenario 1: “Bu Bug’ı Çöz”

Durum: API endpoint 500 hatası veriyor, nerede hata bilmiyorsun.

$ claude “API /users endpoint crashes, find and fix” # Claude yapar: 1. Reads api/users.js 2. Detects undefined variable ‘userId’ 3. Fixes: req.body.userId || req.params.id 4. Adds null check ✓ api/users.js fixed

Sonuç: 2 dakika, bug fixed. Debug etmeden, console.log yazmadan.

Scenario 2: “Yeni Feature Ekle”

Durum: E-commerce app’ine “wishlist” özelliği eklenecek.

$ claude Claude> Add wishlist feature: users can save products ✓ models/Wishlist.js created ✓ api/wishlist.js created ✓ Updated User model with wishlist reference Claude> Add frontend button to add/remove from wishlist ✓ components/WishlistButton.jsx created ✓ Updated ProductCard to include button Claude> /exit

Sonuç: Full-stack feature, 5 dakikada. Model, API, UI—hepsi.

Scenario 3: “Refactor Legacy Code”

Durum: 2018’den kalma callback hell’i async/await’e çevir.

$ claude “refactor api/legacy.js to use async/await” # Claude yapar: Reading api/legacy.js (350 lines)… Converting callbacks to Promises… Replacing .then() chains with async/await… Adding error handling… ✓ api/legacy.js refactored (87% reduction in nesting)

Sonuç: 350 satır legacy code, modern syntax’a çevrildi. Manuel yapsan 2 saat.

Scenario 4: “Test Yaz”

Durum: Yeni yazdığın User service için unit test lazım.

$ claude “write unit tests for services/UserService.js” # Claude yapar: Reading services/UserService.js… Identifying methods: create, update, delete, find… Generating test cases… ✓ tests/UserService.test.js created (24 tests)

Sonuç: 24 test, tüm edge case’ler kapsanmış. Test coverage %95+.


7 Yeni Başlayanın Hatası (ve Çözümleri)

Herkes aynı hataları yapıyor. İşte 7’si ve nasıl önlenir:

Hata 1: Çok Vague İstek

YANLIŞ: claude "make it better"

DOĞRU: claude "optimize database queries by adding indexes and caching"

Neden: Claude, spesifik instruction’larla çok daha iyi çalışıyor. Vague request = vague result.

Hata 2: Review Yapmadan Commit

YANLIŞ: git add . && git commit -m "AI changes" (bakamadan)

DOĞRU: git diff yap, her satırı oku, sonra commit

Neden: Claude akıllı ama yanılabilir. Sen final authority’sin, always review.

Hata 3: Context Vermemek

YANLIŞ: claude "add auth" (hangi dosyaya? nasıl?)

DOĞRU: claude "add JWT authentication to api/routes.js using jsonwebtoken library"

Neden: Daha fazla context = daha iyi sonuç. Nerede, nasıl, hangi tech stack?

Hata 4: Tek Dev Env’de Kullanmak

YANLIŞ: Sadece local dev’de kullan, production’da hiç

DOĞRU: CI/CD script’leri, deployment automation, infrastructure code için de kullan

Neden: Claude, sadece app code değil, DevOps işlerinde de master.

Hata 5: İteratif Olmamak

YANLIŞ: Bir kez iste, çıkan ne ise kabul et

DOĞRU: İterative refine et: “Now add error handling”, “Optimize this part”, “Add tests”

Neden: En iyi sonuç, iterative refinement ile gelir. First draft nadiren perfect.

Hata 6: Her Şeyi AI’a Bırakmak

YANLIŞ: “Claude herşeyi yapsın, ben hiç düşünmeyeyim”

DOĞRU: Claude implementation yapar, sen architecture kararları al

Neden: AI, tactical execution’da mükemmel. Ama strategic decisions senin. AI ve insan işbirliği dengesi burada da kritik öneme sahiptir.

Hata 7: Git Ignore Etmemek

YANLIŞ: .env, node_modules, build/ ignore edilmemiş

DOĞRU: Proper .gitignore + Claude’a “don’t touch .env” demek

Neden: Claude, tüm dosyaları görebilir. Sensitive files’ı context’e katma.


CLI vs IDE: Decision Tree

Hangisini ne zaman kullanmalısın? İşte karar ağacı:

Claude Code CLI Kullan

  • File-level transformations
  • Refactoring (multi-file)
  • Bug fix (location belirsiz)
  • Test generation
  • Documentation
  • DevOps/infrastructure kod
  • Quick prototyping

IDE + Copilot Kullan

  • Line-by-line yazım
  • Precise editing
  • Visual debugging
  • UI development (live preview)
  • Autocomplete ihtiyacı
  • Syntax highlighting kritik

Pro Tip: Hybrid Workflow

En iyi sonuç: İkisini kombine et!

1. Claude CLI: Initial implementation (hızlı, broad strokes)

2. IDE: Fine-tuning, polishing, debugging

3. Claude CLI: Tests, documentation, refactoring


Next Level: Gücünü Açığa Çıkar

Basics’i öğrendin. Şimdi advanced tricks:

1. Custom Prompts (Templates)

Sık kullandığın pattern’ları template’e çevir. Coding agent design pattern’ları ile daha yapılandırılmış şablonlar oluşturabilirsiniz:

$ cat > .claude/templates/api-endpoint.txt Create a new API endpoint: – Path: {path} – Method: {method} – Validation with Joi – Error handling – Unit tests ^D $ claude template api-endpoint path=/users/profile method=GET

2. Multi-File Operations

Birden fazla dosyayı aynı anda transform et:

$ claude “add TypeScript types to all files in src/” # Claude tüm .js dosyalarını okur, .ts’e çevirir, types ekler ✓ 47 files converted to TypeScript

3. Git Integration

Claude ile commit message’ları bile oluştur:

$ git diff | claude “write a conventional commit message” feat(auth): Add JWT authentication to API – Implemented JWT token generation and validation – Added authentication middleware – Updated user routes to require auth – Added tests for auth flow

4. Codebase Understanding

Yeni bir projeye mi başladın? Claude’a sor:

$ claude “explain the architecture of this codebase” This is a microservices architecture with: – Frontend: React + Redux (src/client/) – Backend: Node.js + Express (src/server/) – Database: PostgreSQL with Sequelize ORM – Auth: JWT-based authentication – Key services: User, Product, Order, Payment …

5. Performance Analysis

Performance bottleneck’leri bul:

$ claude “analyze performance issues in api/products.js” Found 3 performance issues: 1. N+1 query problem (line 45): Use eager loading 2. Missing index on ‘category’ field 3. Inefficient loop (line 89): Replace with bulk operation Recommendations: – Add .include() to Sequelize query – Migration: add index on products.category – Use Promise.all() instead of sequential awaits

The Vibe Coding Mindset

Claude Code CLI sadece bir tool değil. Bu, yeni bir coding mindset.

Eski Paradigma:

  • Sen implementation detaylarıyla boğuşursun
  • Syntax hatalarıyla uğraşırsın
  • Boilerplate kod yazarsın
  • Stack Overflow’da arama yaparsın

Yeni Paradigma (Vibe Coding):

  • Sen high-level intent’i tanımlarsın
  • Claude implementation’ı halleder
  • Sen architecture kararları alırsın
  • Flow’dayken kalırsın, kesinti yok

Sonuç: Daha az context switching, daha derin odak, daha hızlı delivery.

Bu, “lazy coding” değil. Bu, intentional coding. Focus, gereksiz detaylardan çıkıp, asıl değer yaratan işe kayıyor.

Başlangıç Checklist

Bugün Claude Code CLI’a başlamak için:

  • Claude Code CLI kur (npm install -g @anthropic-ai/claude-code)
  • API key ayarla (claude auth)
  • Bir projeye git, ilk komutu çalıştır
  • Interactive mode’u dene (claude komutu)
  • Bir bug fix yaptır, review et, commit et
  • Multi-file refactoring dene
  • Kendi workflow’unu oluştur

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir