Claude Code can be used as a standalone CLI, but IDE integration provides a smoother experience. Official integrations support VS Code, JetBrains IDEs, and other editors.
Claude Code có thể được sử dụng như một CLI độc lập, nhưng tích hợp với IDE mang lại trải nghiệm mượt mà hơn. Các tích hợp chính thức hỗ trợ VS Code, JetBrains IDEs và các editor khác.
With IDE integration, you can invoke Claude directly from the editor, see results inline, and receive code suggestions right in your workflow.
Với tích hợp IDE, bạn có thể gọi Claude trực tiếp từ editor, xem kết quả inline, và nhận gợi ý code ngay trong luồng làm việc.
The VS Code extension for Claude Code is the most popular way to integrate. It provides a chat panel, inline suggestions, and quick actions.
Extension VS Code cho Claude Code là cách phổ biến nhất để tích hợp. Nó cung cấp panel chat, inline suggestions và quick actions.
1# From VS Code:2# 1. Open Extensions (Ctrl+Shift+X / Cmd+Shift+X)3# 2. Search for "Claude Code"4# 3. Click Install56# Or from command line:7code --install-extension anthropic.claude-code- Chat Panel: Integrated chat interface in the sidebar to interact with Claude.
Chat Panel: Giao diện chat tích hợp trong sidebar để tương tác với Claude.
- Inline Suggestions: Code suggestions directly in the editor as you type.
Inline Suggestions: Gợi ý code trực tiếp trong editor khi bạn gõ.
- Quick Actions: Right-click to access quick actions like explain, refactor, fix.
Quick Actions: Click phải để truy cập các action nhanh như explain, refactor, fix.
- File Context: Claude automatically understands the open file and surrounding codebase.
File Context: Claude tự động hiểu file đang mở và codebase xung quanh.
1# Open Claude Chat Panel2Ctrl+Shift+P → "Claude: Open Chat" # or Cmd+Shift+P on Mac34# Quick explain selected code5Select code → Ctrl+Shift+E # Explain selection67# Quick fix8Select code → Ctrl+Shift+F # Fix selection910# Inline completion11Alt+\ # Trigger inline suggestion1213# Accept suggestion14Tab # Accept inline suggestionClaude Code also has plugins for JetBrains IDEs like IntelliJ IDEA, PyCharm, WebStorm, and other IDEs in the JetBrains ecosystem.
Claude Code cũng có plugin cho các JetBrains IDE như IntelliJ IDEA, PyCharm, WebStorm, và các IDE khác trong hệ sinh thái JetBrains.
1# From JetBrains IDE:2# 1. Open Settings (Ctrl+Alt+S / Cmd+,)3# 2. Go to Plugins → Marketplace4# 3. Search for "Claude Code"5# 4. Click Install → Restart IDE- Tool Window: Claude panel appears in the right tool window.
Tool Window: Claude panel xuất hiện trong tool window bên phải.
- Context Menu: Right-click on code to see Claude actions.
Context Menu: Click phải trên code để thấy các action Claude.
- Intentions: Alt+Enter on code to see Claude suggestions.
Intentions: Alt+Enter trên code để thấy Claude suggestions.
If you prefer working in the terminal, Claude Code CLI can be integrated with many terminal emulators and multiplexers.
Nếu bạn thích làm việc trong terminal, Claude Code CLI có thể được tích hợp với nhiều terminal emulator và multiplexer.
1# Run Claude in a tmux pane2tmux split-window -h 'claude'34# Create a dedicated Claude session5tmux new-session -d -s claude 'claude'6tmux attach -t claude78# Quick access with alias in .bashrc/.zshrc9alias cc='tmux split-window -h "claude"'1# Split pane for Claude2zellij action new-pane -- claude34# Create layout with Claude pane5# In your layout.kdl:6layout {7 pane8 pane command="claude"9}Claude Code also has a web app version at claude.ai/code for those who want to use it in the browser without installing the CLI.
Claude Code cũng có phiên bản web app tại claude.ai/code cho những ai muốn sử dụng trong trình duyệt mà không cần cài đặt CLI.
Web app có một số giới hạn so với CLI: không thể thực thi lệnh local, không truy cập được filesystem trực tiếp. Tuy nhiên, nó vẫn có thể đọc/viết code thông qua giao diện.
Claude Code Desktop App is available for Mac and Windows, providing a native experience with full CLI features in a graphical interface.
Claude Code Desktop App có sẵn cho Mac và Windows, cung cấp trải nghiệm native với đầy đủ tính năng của CLI trong giao diện đồ họa.
1# Download from:2# Mac: claude.ai/download/mac3# Windows: claude.ai/download/windows45# Features:6# - Native window management7# - System tray integration8# - Notification support9# - Multi-project tabsYou can configure how Claude works in the IDE through settings.
Bạn có thể cấu hình cách Claude hoạt động trong IDE thông qua settings.
1// VS Code settings.json2{3 "claude.autoComplete": true,4 "claude.inlineHints": true,5 "claude.model": "opus",6 "claude.contextFiles": 10,7 "claude.theme": "dark"8}910// JetBrains settings11// Settings → Tools → Claude Code12// - Enable inline suggestions13// - Set preferred model14// - Configure keybindingsKey Takeaways
Điểm Chính
- VS Code extension provides chat panel, inline suggestions, and quick actionsVS Code extension cung cấp chat panel, inline suggestions và quick actions
- JetBrains IDEs have dedicated Claude Code pluginJetBrains IDE có plugin Claude Code riêng
- Terminal users can integrate with tmux or zellijNgười dùng terminal có thể tích hợp với tmux hoặc zellij
- Web and Desktop apps are available for browser/native useWeb và Desktop app có sẵn cho trình duyệt/native
Practice
Test your understanding of this chapter
What is the shortcut to open Claude chat in VS Code?
Phím tắt để mở Claude chat trong VS Code là gì?
The Claude Code web app can execute local shell commands.
Web app Claude Code có thể thực thi lệnh shell local.
Complete the VS Code CLI command to install Claude Code extension
Hoàn thành lệnh VS Code CLI để cài extension Claude Code
code --install-extension anthropic.Which terminal multiplexer integration is mentioned?
Trình terminal multiplexer nào được đề cập?