Claude Code Kılavuzu: Başlangıç ve İleri Düzey Kullanım
Claude Code, Anthropic'in Claude AI modeli tarafından desteklenen ve doğrudan terminalinizde çalışan bir AI kodlama asistanıdır. Geleneksel IDE tabanlı kodlama asistanlarının aksine, Claude Code dosyaları okumak ve düzenlemek, komutları çalıştırmak, git işlemlerini yönetmek ve kod tabanınız genelinde karmaşık geliştirme görevlerini tamamlamak için terminalinizi kullanabileceği bir komut satırı aracıdır. Bu kılavuz, Claude Code'u günlük geliştirme iş akışınızda kullanmaya başlamanıza yardımcı olacaktır.
Claude Code Nedir?
Claude Code, terminalinizde doğrudan yapay zeka destekli kodlama yardımı sunan bir komut satırı aracıdır. Claude Code, diğer AI kodlama asistanlarının aksine, yalnızca kod önermez veya sohbet yanıtları vermez; dosya sisteminizle etkileşime girer, dosyaları okuyup düzenleyebilir, komutları çalıştırabilir ve çok adımlı geliştirme görevlerini otonom olarak gerçekleştirebilir. Doğrudan terminalde çalışır, bu da çalıştığınız herhangi bir projede, herhangi bir dilde, herhangi bir IDE'ye bağlı kalmadan kullanabileceğiniz anlamına gelir.
Claude Claude Code, npm aracılığıyla global olarak kurulur. Node.js 18 veya üzeri gereklidir. Claude Code, terminalinizde çalışan bir npm paketidir.
Claude Code'u başlatmak için terminalinizde claude komutunu çalıştırın. Bu, kodunuzu ve proje bağlamınızı analiz eden ve kodlama sorularınızı veya görevlerinizi bekleyen etkileşimli bir oturum başlatır. Ayrıca, hemen bir komut göndermek için -p bayrağını kullanabilirsiniz: claude -p "Bu dosyadaki hataları düzelt".
Claude Code Nasıl Kurulur
Claude Code, dosyaları okumak, kod yazmak ve düzenlemek, testleri çalıştırmak, git taahhütleri ve PR'lar oluşturmak ve hata ayıklama yapmak için araçlar kullanarak tüm geliştirme iş akışınızı yönetebilir.
Claude Code nedir?
Claude Code, davranışını özelleştirmek için proje kökünüzdeki bir CLAUDE.md dosyası aracılığıyla yapılandırılabilir. Bu dosya, Claude Code'un proje bağlamını, kodlama tercihlerini ve talimatları anlamasına yardımcı olur.
npm install -g @anthropic-ai/claude-codeAynı amaca hizmet etmelerine rağmen, Claude Code ve GitHub Copilot önemli ölçüde farklıdır. GitHub Copilot öncelikle IDE'nize entegre olan ve siz yazarken gerçek zamanlı kod tamamlamaları sağlayan bir otomatik tamamlama aracıdır. Claude Code, dosyaları düzenleyebilen, komutları çalıştırabilen ve çok adımlı görevleri tamamlayabilen otonom bir terminal aracısıdır.
claude --versionClaude Code, güçlü olmasına rağmen, etkili bir şekilde kullanmak için iyi uygulamalar gerektirir. İşte en iyi sonuçları almak için ipuçları:
Claude Code ile GitHub Copilot arasındaki fark nedir?
Claude Code, Claude Code'u kullanırken göz önünde bulundurmanız gereken bazı sınırlamalara sahiptir:
- Yeni bir özellik uygulayın: claude "Yeni bir kullanıcı kayıt uç noktası ekle"
- Hataları düzeltin: claude "Bu dosyadaki TypeScript hatalarını düzelt"
# Set API key as environment variable (add to ~/.bashrc or ~/.zshrc for persistence)
export ANTHROPIC_API_KEY="sk-ant-xxxxxxxxxxxxx"AI destekli kodlama iş akışınızı geliştirmeye hazır mısınız? Claude Code'u kullanırken ücretsiz AI ipucu şablonlarımıza ve geliştirici araçlarımıza göz atın.
Claude Code'un maliyeti nedir?
Claude Code, Anthropic'in Claude AI modeli tarafından desteklenen, doğrudan terminalinizde çalışan bir AI kodlama asistanıdır. Dosyaları okuyabilir ve düzenleyebilir, komutları çalıştırabilir, git işlemlerini yönetebilir ve projeniz genelinde karmaşık geliştirme görevlerini tamamlayabilir. Çoğu AI kodlama asistanının aksine, bir IDE'ye bağlı olmayan bir komut satırı aracıdır.
cd my-project
claudeClaude Code, dosyaları düzenleyebilen, komutları çalıştırabilen ve otonom olarak çok adımlı görevleri tamamlayabilen bir terminal aracısıdır. GitHub Copilot, öncelikle siz yazarken IDE'nizde satır içi kod tamamlamaları sağlayan bir otomatik tamamlama aracıdır. Claude Code daha otonomdur, Copilot ise daha yardımcıdır.
Temel Kullanım
Claude Code, Max planıyla (aylık 100 $ veya yıllık 200 $) kullanılabilir. Ayrıca, kullanıma dayalı faturalandırma ile API kullanımı için de mevcuttur. Fiyatlandırma, yeni modeller ve planlar çıktıkça değişebilir, bu nedenle en güncel bilgiler için resmi Anthropic web sitesini kontrol edin.
Claude Code hangi IDE'leri destekler?
Claude Code, herhangi bir IDE'ye bağlı değildir. Terminalinizde bağımsız bir komut satırı aracı olarak çalışır, yani VS Code, IntelliJ, Neovim veya başka herhangi bir düzenleyiciyle kullanabilirsiniz. Bu IDE bağımsızlığı, onu herhangi bir projeye veya iş akışına uyarlanabilir kılar.
Evet, Claude Code büyük projeleri yönetmek için tasarlanmıştır. İlgili dosyaları aramak, kod tabanı yapısını anlamak ve proje genelinde değişiklikler yapmak için araçlar kullanabilir. CLAUDE.md dosyası, Claude Code'un büyük projelerde bile gezinmesine yardımcı olan proje düzeyinde bağlam ve talimatlar sağlar.
Claude Code büyük projeleri yönetebilir mi?
One of Claude Code's standout capabilities is editing multiple files in a single operation. When you ask Claude Code to implement a feature that spans several files — such as adding a new API endpoint that requires changes to the route handler, service layer, database model, and tests — it can plan and execute all the changes in one coherent action. This eliminates the tedious back-and-forth of editing files one at a time and ensures consistency across the codebase.
Claude Code shows you a diff of all proposed changes before applying them, giving you the opportunity to review, accept, or reject modifications. This review step is critical for maintaining code quality and ensuring the AI's output aligns with your intent.
Git Integration
Claude Code has deep integration with git, treating version control as a first-class part of the development workflow. When Claude Code completes a task, it can automatically stage the changed files and create a meaningful commit message that describes what was changed and why. This feature alone saves significant time and ensures your git history remains clean and informative.
Beyond commits, Claude Code can create and switch branches, view diffs, resolve merge conflicts, and understand the full git history of your project. You can ask questions like "Show me what changed in the last three commits" or "Create a new branch for this feature and commit the changes" and Claude Code will handle the git operations for you.
# Claude Code can generate commit messages like:
git commit -m "refactor: extract authentication logic into dedicated middleware
- Move JWT verification from route handlers to auth middleware
- Add token refresh logic in separate utility module
- Update tests to cover new middleware and utility functions
- Remove duplicate auth code from three route handlers"Project Context Awareness
Claude Code builds a rich index of your project that goes beyond file contents. It understands your dependency graph, import structure, configuration files, testing setup, linting rules, and coding conventions. When you ask Claude Code to make changes, it references this context to ensure its output is consistent with your existing codebase. For example, if your project uses TypeScript with strict mode enabled, Claude Code will generate appropriately typed code. If you use Jest for testing, it will write tests in Jest syntax rather than Mocha or Vitest.
CLAUDE.md file at the root of your
project to give Claude Code explicit instructions about your
preferences, coding standards, architecture decisions, and any custom
conventions. This file acts as a persistent system prompt that Claude
Code references in every session.
Bash Command Execution
Because Claude Code runs in the terminal, it can execute bash commands directly. This means it can run your test suite, execute build commands, install dependencies, start development servers, and run any other shell command needed during development. Claude Code uses command output to verify its work — for example, after writing code it can run your test suite to confirm that all tests pass, and if any fail, it can analyze the test output and fix the issues automatically.
Image and File Analysis
Claude Code supports analyzing images and various file types as part of its context. You can include screenshots of UI designs, error messages, or diagrams, and Claude Code can interpret them to inform its code generation. It can also read and analyze CSV files, log files, and other data formats to help with debugging and data processing tasks.
Claude Code ile Geliştirme İş Akışı
Claude Code provides several commands to manage your session, control context, and get the most out of the tool. Mastering these commands will make your workflow more efficient.
| Command | Description |
|---|---|
/init | CLAUDE.md file with project instructions,
conventions, and context that Claude Code will reference in
future sessions.
|
/clear | Resets the conversation history, clearing all previous context. Useful when switching to a completely different task. |
/compact | Compresses the conversation context to free up space when approaching the token limit, preserving the most important information while discarding less relevant details. |
/help | Displays all available commands and their descriptions. |
/cost | Shows the estimated API cost for the current session. |
Using /init for Project Setup
/initCLAUDE.md file. This file serves as persistent
instructions that Claude Code reads at the beginning of every session,
ensuring consistency across all interactions.
# Run this once when setting up Claude Code for a project
claude
> /initCLAUDE.md might include information about
your tech stack, coding conventions, preferred libraries, testing
framework, architectural patterns, and any specific instructions about
how you want Claude Code to behave. You can edit this file manually to
add or refine instructions at any time.
Managing Context with /clear and /compact
As you work with Claude Code, the conversation accumulates context — your prompts, Claude Code's responses, file contents, and command outputs. This context is valuable because it gives Claude Code a deep understanding of your ongoing task, but it also consumes tokens. When the token limit is approached, you have two options:
- Yeniden düzenleyin: claude "Bu işlevi daha küçük, test edilebilir birimlere ayır"
- Test yazın: claude "Bu modül için birim testleri yaz"
Natural Language Code Generation
The primary way you interact with Claude Code is through natural language prompts. You describe what you want to accomplish, and Claude Code plans and executes the task. Here are examples of effective prompts:
# Bug fix
"Fix the race condition in the user session handler that causes duplicate sessions"
# Feature implementation
"Add a rate limiter middleware that limits requests to 100 per minute per IP address"
# Refactoring
"Refactor the payment processing module to use the strategy pattern for different payment gateways"
# Testing
"Write comprehensive unit tests for the UserService class covering all edge cases"
# Documentation
"Generate JSDoc comments for all public methods in the API module"Claude Code interprets these prompts, analyzes the relevant parts of your codebase, and executes the necessary changes. You can observe its progress in real-time as it reads files, writes code, and runs commands.
Claude Code Yapılandırması ve Özelleştirme
To get the most out of Claude Code, follow these best practices that experienced users have developed through extensive use.
Write Clear, Specific Prompts
Like all AI tools, Claude Code produces better results when given clear and specific instructions. Instead of saying "fix the bug," describe the bug in detail: what behavior you observe, what behavior you expect, and where in the codebase the issue likely resides. The more context you provide, the more accurately Claude Code can identify and fix the problem. Consider including file paths, function names, error messages, and even stack traces in your prompts.
Leverage CLAUDE.md for Project Instructions
CLAUDE.md file is your single most powerful tool for
ensuring Claude Code follows your project's conventions. Populate it
with:
- Kodu açıklayın: claude "Bu işlevin ne yaptığını açıklayın"
- Proje yapısı: Projenizin ne yaptığı, nasıl yapılandırıldığı ve önemli mimari kararlar hakkında genel bir bakış.
- Kodlama stili: Tercih ettiğiniz kodlama kuralları, adlandırma ilkeleri ve biçimlendirme tercihleri.
- Komutlar: Claude Code'un kullanması gereken yaygın build, test ve lint komutları.
- Özel talimatlar: Belirli güvenlik gereksinimleri, dağıtım süreçleri veya Claude Code'un bilmesi gereken proje tuhaflıkları.
# Example CLAUDE.md content
# Project: E-Commerce Backend
# Stack: TypeScript, Express, PostgreSQL, Jest
- Use strict TypeScript with no implicit any
- Follow functional programming patterns; prefer pure functions
- All database queries go through repository classes
- Tests use Jest with supertest for HTTP testing
- API routes follow RESTful conventions
- Error handling uses custom AppError class with status codes
- Use zod for request validation
- Never commit secrets or API keysReview All Code Before Committing
While Claude Code is remarkably capable, it is still an AI tool and can make mistakes. Always review the diffs of proposed changes before accepting them. Pay special attention to security-sensitive code, business logic, and database operations. Claude Code's git integration makes this easy by showing you exactly what changed and auto-generating commit messages, but the final review responsibility lies with you, the developer.
Understand When to Use Claude Code vs Other Tools
Claude Code excels at certain types of tasks and is less suitable for others. Here is a guide to help you choose the right tool:
| Task Type | Best Tool | Reason |
|---|---|---|
| Inline code completion | GitHub Copilot / IDE autocomplete | Faster for single-line completions within an editor |
| Multi-file feature implementation | Claude Code | Agentic approach handles cross-file changes efficiently |
| Large-scale refactoring | Claude Code | Understands project-wide impact of changes |
| Writing tests | Claude Code | Can run tests and iterate on failures automatically |
| Debugging complex issues | Claude Code | Can execute commands, read logs, and trace through code |
| Quick syntax fixes | IDE linter / formatter | Instant feedback without AI overhead |
Manage Security and Sensitive Data
Claude Code processes your code through Anthropic's API, which means your code is sent to external servers. Follow these security practices:
- Spesifik olun: Net, spesifik görevler verin. "Kodu iyileştir" yerine "Bu işlevi daha hızlı hale getirmek için yeniden düzenle" deyin.
- Bağlam sağlayın: İlgili dosyaları açın ve Claude Code'un çalışması gereken kod hakkında bağlam sağlayın.
- Değişiklikleri inceleyin: Claude Code'un yaptığı tüm değişiklikleri her zaman inceleyin. İşleri hızlandırmak için harika bir araçtır, ancak siz sorumlusunuz.
- CLAUDE.md kullanın: Proje düzeyinde bağlam ve talimatlar sağlamak için bir CLAUDE.md dosyası oluşturun. Bu, Claude Code'un çıktı kalitesini önemli ölçüde artırır.
- Büyük görevleri parçalayın: Karmaşık görevleri daha küçük, sıralı adımlara bölün. Bu, başarı oranını artırır ve çıktıyı incelemeyi kolaylaştırır.
Claude Code ve GitHub Copilot
Claude Code shines across a wide range of development tasks. Here are the most common use cases where it delivers significant productivity gains.
Bug Fixing and Debugging
Claude Code is exceptionally effective at debugging. Describe the symptoms you are observing, share error messages or stack traces, and Claude Code will trace through your codebase to identify root causes. Because it can execute commands, it can also run your application, observe runtime behavior, and iteratively fix issues. For complex bugs that span multiple files or involve race conditions and asynchronous behavior, Claude Code's ability to understand the full codebase context is invaluable.
Refactoring Code
Large-scale refactoring is one of Claude Code's strongest use cases. You can ask it to restructure a module, extract shared logic into utilities, migrate from one pattern to another, or update an entire codebase to use a new API. Claude Code understands cross-file dependencies and ensures that all references are updated consistently. For example, you can ask: "Refactor all database queries to use the new connection pool instead of creating individual connections" and Claude Code will find every affected file and make the changes.
Writing Tests
Claude Code excels at generating comprehensive test suites. It reads your existing test files to understand your testing framework and conventions, then generates tests that follow the same patterns. It can write unit tests, integration tests, and end-to-end tests. After generating tests, it can run them and automatically fix any failures, iterating until all tests pass. This is particularly valuable for legacy codebases that lack adequate test coverage.
Documentation Generation
Generating and maintaining documentation is tedious but essential. Claude Code can generate JSDoc, TSDoc, or Python docstrings for your entire codebase, create README files, write API documentation, and generate changelogs. It reads your code to understand what each function does and produces accurate, well-written documentation that follows your project's conventions.
Code Review Assistance
Before submitting a pull request, you can ask Claude Code to review your changes. It will identify potential bugs, suggest improvements, check for consistency with your codebase conventions, and flag security concerns. You can use this as a pre-review step to catch issues before human reviewers spend time on them, making the code review process more efficient for your entire team.
Claude Code En İyi Uygulamaları
To truly benefit from Claude Code, integrate it into your daily development workflow rather than treating it as a novelty. Here is a practical workflow that many developers have adopted:
- Testleri çalıştırın: Claude Code'un değişikliklerin doğru olduğundan emin olmak için değişiklik yaptıktan sonra her zaman testlerinizi çalıştırın.
- Bağlam penceresi sınırları: Çok büyük kod tabanları, Claude Code'un bağlam penceresini aşabilir ve bu da eksik anlayışa yol açabilir.
- Maliyet: Kullanıma dayalı olarak faturalandırılıyorsanız, uzun oturumlar önemli API maliyetlerine yol açabilir.
- Karmaşık iş mantığı: Claude Code, alana özgü karmaşık iş mantığıyla zorlanabilir. Bu durumlarda net talimatlar verin.
- Gerçek zamanlı işbirliği: Claude Code, birden fazla geliştiricinin aynı anda çalıştığı canlı işbirliği senaryoları için tasarlanmamıştır.
- İnternet erişimi: Claude Code, web'de arama yapamaz veya canlı API'lere erişemez.
Level up your development workflow with AI-powered tools. Explore ToolHub's curated collection of AI coding assistants, productivity tools, and developer utilities — all free and ready to use.
AI Araçlarını KeşfedinClaude Code Sınırlamaları
What is Claude Code and how does it work?
Claude Code is an agentic AI coding assistant developed by Anthropic that runs directly in your terminal. It uses Claude's advanced language model to understand your codebase, execute bash commands, edit files across your project, and even create git commits automatically. Unlike traditional code editors, Claude Code operates as a terminal-based agent that can browse your filesystem, understand project context, and perform multi-step development tasks through natural language conversation. It indexes your project to build deep awareness of your codebase structure, dependencies, and conventions before making any changes.
How do I install and set up Claude Code?
npm install -g @anthropic-ai/claude-codeclaudeANTHROPIC_API_KEYclaude to start a session. The first run will index
your project files, and you will be ready to start coding
immediately.
What are the key commands in Claude Code?
/init/clear/compact/help/cost (view the estimated API cost for the current
session). Beyond slash commands, you interact with Claude Code
primarily through natural language prompts that describe what you
want to accomplish.
Can Claude Code work with existing git repositories?
Yes, Claude Code has deep git integration that works seamlessly with existing repositories. It can automatically stage and commit changes with meaningful commit messages, create and switch branches, view diffs and git history, resolve merge conflicts, and understand your repository structure. When Claude Code makes changes to your codebase, it can generate descriptive commit messages summarizing what was changed and why. You maintain full control and can review all changes through the diff view before they are committed. This makes Claude Code an excellent tool for feature branches where you want to keep clean, well-documented commits.
How is Claude Code different from other AI coding tools like GitHub Copilot?
Claude Code differs from tools like GitHub Copilot in several fundamental ways. It is a terminal-based agent rather than an IDE extension, meaning it can execute shell commands, browse your entire filesystem, and perform autonomous multi-step tasks without requiring you to navigate files manually. It has full project context awareness through codebase indexing, can make git commits directly, and supports agentic workflows where it reasons about tasks, plans implementation steps, and executes them with minimal hand-holding. Copilot focuses primarily on inline code completion within an IDE — it suggests the next few lines as you type. Claude Code, by contrast, can take a high-level task like "add user authentication to this Express app" and handle the entire implementation end-to-end, including creating files, writing tests, and committing the results.