最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

一文詳解如何使用腳本清理Claude Code緩存信息

  發(fā)布時(shí)間:2026-06-12 15:22:25   作者:佚名   我要評(píng)論
我每天使用Claude Code大約一個(gè)月,注意到我的~/.claude目錄占了1.3GB,沒(méi)有自動(dòng)清理,會(huì)議數(shù)據(jù)不斷堆積,下面小編就和大家分享一下如何使用腳本清理Claude Code緩存信息吧

我每天使用Claude Code大約一個(gè)月,注意到我的 ~/.claude 目錄占了1.3GB。沒(méi)有自動(dòng)清理,會(huì)議數(shù)據(jù)不斷堆積。

空間去哪兒了?

du -sh ~/.claude/*/ | sort -rh
目錄大小存儲(chǔ)內(nèi)容
projects/1.0 GB會(huì)話日志(UUID.jsonl + UUID目錄) 會(huì)話日志(UUID.jsonl + UUID 目錄)
debug/145 MB調(diào)試日志
shell-snapshots/83 MBShell環(huán)境快照
file-history/23 MB文件編輯歷史(撤消)
todos/8.6 MB每會(huì)話TODO文件
plans/1.3 MB計(jì)劃模式輸出
其他~800 KB任務(wù)、粘貼緩存、圖片緩存、安全警告狀態(tài)_*.json

最大的罪魁禍?zhǔn)资?nbsp;projects/。每次會(huì)話創(chuàng)建一個(gè) UUID.jsonl (完整對(duì)話日志)和一個(gè) UUID/ 目錄(子代理輸出,計(jì)劃文件)。這些用于 claude --resume <session-id> ,但你很少會(huì)重新啟動(dòng)超過(guò)一周的會(huì)話。

重要:不要碰 memory/

在每個(gè)項(xiàng)目目錄中,有一個(gè) memory/ 文件夾,包含 MEMORY.md ——這是Claude Code在會(huì)話間的持久記憶。刪除它你將失去該項(xiàng)目的所有學(xué)習(xí)上下文。

腳本

我寫了一個(gè)清理腳本,帶有以下安全功能:

  • 默認(rèn)干運(yùn)行——除非你傳遞 --execute,否則不會(huì)刪除任何內(nèi)容
  • 雙重保護(hù)——檢查目錄名稱和UUID模式
  • 可配置年齡——默認(rèn)為7天,傳遞任何數(shù)字以更改

保存到 ~/.claude/scripts/cleanup-sessions.sh

#!/bin/bash
set -euo pipefail

CLAUDE_DIR="$HOME/.claude"
PROJECTS_DIR="$CLAUDE_DIR/projects"
MAX_AGE_DAYS=7
DRY_RUN=true

numfmt_bytes() {
  local bytes=$1
  if [ "$bytes" -ge 1073741824 ]; then
    printf "%.1f GB" "$(echo "$bytes / 1073741824" | bc -l)"
  elif [ "$bytes" -ge 1048576 ]; then
    printf "%.1f MB" "$(echo "$bytes / 1048576" | bc -l)"
  elif [ "$bytes" -ge 1024 ]; then
    printf "%.1f KB" "$(echo "$bytes / 1024" | bc -l)"
  else
    printf "%d B" "$bytes"
  fi
}

cleanup_files() {
  local dir="$1" pattern="$2" label="$3"
  local count=0 bytes=0
  [ -d "$dir" ] || return 0
  while IFS= read -r -d '' file; do
    local size
    size=$(stat -f%z "$file" 2&gt;/dev/null || echo 0)
    bytes=$((bytes + size))
    count=$((count + 1))
    $DRY_RUN || rm -f "$file"
  done &lt; &lt;(find "$dir" -maxdepth 1 -name "$pattern" -type f -mtime +"$MAX_AGE_DAYS" -print0)
  if [ "$count" -gt 0 ]; then
    echo "  $label: ${count} 個(gè)文件 ($(numfmt_bytes "$bytes"))"
    total_files=$((total_files + count))
    total_bytes=$((total_bytes + bytes))
  fi
}

cleanup_dir_contents() {
  local dir="$1" label="$2"
  local count=0 bytes=0
  [ -d "$dir" ] || return 0
  while IFS= read -r -d '' file; do
    local size
    size=$(stat -f%z "$file" 2&gt;/dev/null || echo 0)
    bytes=$((bytes + size))
    count=$((count + 1))
    $DRY_RUN || rm -f "$file"
  done &lt; &lt;(find "$dir" -type f -mtime +"$MAX_AGE_DAYS" -print0)
  if [ "$count" -gt 0 ]; then
    echo "  $label: ${count} 個(gè)文件 ($(numfmt_bytes "$bytes"))"
    total_files=$((total_files + count))
    total_bytes=$((total_bytes + bytes))
  fi
}

for arg in "$@"; do
  [[ "$arg" == "--execute" ]] &amp;&amp; DRY_RUN=false
  [[ "$arg" =~ ^[0-9]+$ ]] &amp;&amp; MAX_AGE_DAYS="$arg"
done

$DRY_RUN &amp;&amp; echo "=== 干運(yùn)行(添加 --execute 以實(shí)際刪除) ===" \
         || echo "=== 執(zhí)行模式 ==="
echo "目標(biāo):超過(guò)${MAX_AGE_DAYS}天的文件"
echo ""

total_files=0
total_dirs=0
total_bytes=0

echo "[項(xiàng)目/會(huì)話日志]"
for project_dir in "$PROJECTS_DIR"/*/; do
  [ -d "$project_dir" ] || continue
  project_name=$(basename "$project_dir")
  project_files=0 project_dirs=0 project_bytes=0

  while IFS= read -r -d '' file; do
    size=$(stat -f%z "$file" 2&gt;/dev/null || echo 0)
    project_bytes=$((project_bytes + size))
    project_files=$((project_files + 1))
    $DRY_RUN || rm -f "$file"
  done &lt; &lt;(find "$project_dir" -maxdepth 1 -name "*.jsonl" -type f -mtime +"$MAX_AGE_DAYS" -print0)

  while IFS= read -r -d '' dir; do
    dirname=$(basename "$dir")
    [[ "$dirname" == "memory" ]] &amp;&amp; continue
    if [[ "$dirname" =~ ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ ]]; then
      size=$(du -sk "$dir" 2&gt;/dev/null | cut -f1)
      project_bytes=$((project_bytes + size * 1024))
      project_dirs=$((project_dirs + 1))
      $DRY_RUN || rm -rf "$dir"
    fi
  done &lt; &lt;(find "$project_dir" -maxdepth 1 -type d -mtime +"$MAX_AGE_DAYS" -not -path "$project_dir" -print0)

  if [ $((project_files + project_dirs)) -gt 0 ]; then
    echo "  $project_name: ${project_files} 個(gè)文件, ${project_dirs} 個(gè)目錄 ($(numfmt_bytes $project_bytes))"
    total_files=$((total_files + project_files))
    total_dirs=$((total_dirs + project_dirs))
    total_bytes=$((total_bytes + project_bytes))
  fi
done
echo ""

echo "[其他臨時(shí)數(shù)據(jù)]"
cleanup_dir_contents "$CLAUDE_DIR/debug" "調(diào)試/"
cleanup_dir_contents "$CLAUDE_DIR/shell-snapshots" "shell快照/"
cleanup_dir_contents "$CLAUDE_DIR/file-history" "文件歷史/"
cleanup_dir_contents "$CLAUDE_DIR/todos" "待辦事項(xiàng)/"
cleanup_dir_contents "$CLAUDE_DIR/plans" "計(jì)劃/"
cleanup_dir_contents "$CLAUDE_DIR/tasks" "任務(wù)/"
cleanup_dir_contents "$CLAUDE_DIR/paste-cache" "粘貼緩存/"
cleanup_dir_contents "$CLAUDE_DIR/image-cache" "圖片緩存/"
cleanup_files "$CLAUDE_DIR" "security_warnings_state_*.json" "安全警告狀態(tài)"

echo ""
echo "--- 摘要 ---"
echo "文件: ${total_files}"
echo "目錄: ${total_dirs} (UUID會(huì)話)"
echo "節(jié)省空間: $(numfmt_bytes $total_bytes)"
$DRY_RUN &amp;&amp; [ $((total_files + total_dirs)) -gt 0 ] &amp;&amp; echo "" &amp;&amp; echo "要?jiǎng)h除: $0 ${MAX_AGE_DAYS} --execute"

用法

chmod +x ~/.claude/scripts/cleanup-sessions.sh
# 干運(yùn)行(默認(rèn),不刪除任何東西)
~/.claude/scripts/cleanup-sessions.sh
# 將年齡閾值更改為14天
~/.claude/scripts/cleanup-sessions.sh 14
# 實(shí)際刪除
~/.claude/scripts/cleanup-sessions.sh 7 --execute

我在4周后的結(jié)果

文件: 6,806
目錄: 246 (UUID會(huì)話)
節(jié)省空間: 1.3 GB

你絕對(duì)不應(yīng)該清理的文件

路徑原因
projects/*/memory/持久記憶(MEMORY.md)
CLAUDE.md全局指令
settings.json用戶設(shè)置
commands/自定義斜杠命令
plugins/已安裝的插件
history.jsonl命令歷史

Linux用戶注意

這個(gè)腳本使用macOS stat -f%z。在Linux上,替換為 stat --format=%s 或使用 wc -c < "$file" 以實(shí)現(xiàn)跨平臺(tái)兼容性。

知識(shí)擴(kuò)展

清理 Claude Code 緩存信息腳本

#!/usr/bin/env bash
#
# clean-claude-cache.sh — Clean Claude Code cache files
#
# Usage:
#   ./clean-claude-cache.sh              # Dry-run (preview only, no deletion)
#   ./clean-claude-cache.sh -f           # Actually delete
#   ./clean-claude-cache.sh -f --aggressive  # Delete everything including sessions & history
#   ./clean-claude-cache.sh -f --project-only # Only clean current project's .claude/
#   ./clean-claude-cache.sh -f --global-only  # Only clean ~/.claude/ (not project-level)
#
# Safety: Default mode is dry-run. Use -f to actually perform deletion.
#
set -euo pipefail
# ─── Colors ───────────────────────────────────────────────────────────────────
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
BOLD='\033[1m'
DIM='\033[2m'
NC='\033[0m' # No Color
# ─── Defaults ─────────────────────────────────────────────────────────────────
FORCE=false
AGGRESSIVE=false
PROJECT_ONLY=false
GLOBAL_ONLY=false
VERBOSE=false
CLAude_DIR="$HOME/.claude"
TOTAL_FREED=0
# ─── Help ─────────────────────────────────────────────────────────────────────
usage() {
    cat <<EOF
${BOLD}clean-claude-cache.sh${NC} — Clean Claude Code cache files
${BOLD}USAGE${NC}
    $(basename "$0") [OPTIONS]
${BOLD}OPTIONS${NC}
    -f, --force          Actually delete files (default: dry-run)
    -a, --aggressive     Also clean sessions, history, and usage data
    -p, --project-only   Only clean project-level .claude/ directory
    -g, --global-only    Only clean global ~/.claude/ directory
    -v, --verbose        Show detailed file listing
    -h, --help           Show this help message
${BOLD}EXAMPLES${NC}
    $(basename "$0")                     # Preview what would be cleaned
    $(basename "$0") -f                  # Clean safe items only
    $(basename "$0") -f --aggressive     # Deep clean everything
    $(basename "$0") -f --project-only   # Clean only current project cache
${BOLD}SAFE CLEANUP${NC} (default -f mode)
    ? Cache files, debug logs, paste cache, downloads, stats cache
    ? File edit history, shell snapshots, session environments (>3 days old)
    ? Stale task files (>3 days), plan files (>7 days), backups (>3 days)
    ? Empty project directories (only sessions-index.json, no real data)
${BOLD}AGGRESSIVE CLEANUP${NC} (--aggressive, adds)
    ? Session metadata (>7 days old)
    ? Command history (history.jsonl — full delete)
    ? Usage data (>7 days old)
    ? Scheduled tasks
${BOLD}PRESERVED${NC} (never deleted)
    ? Settings (settings.json, settings.local.json)
    ? Skills and agents
    ? Project memories (*/memory/)
    ? IDE configuration
    ? Harness rules
EOF
    exit 0
}
# ─── Parse Arguments ──────────────────────────────────────────────────────────
while [[ $# -gt 0 ]]; do
    case "$1" in
        -f|--force)       FORCE=true; shift ;;
        -a|--aggressive)  AGGRESSIVE=true; shift ;;
        -p|--project-only) PROJECT_ONLY=true; shift ;;
        -g|--global-only)  GLOBAL_ONLY=true; shift ;;
        -v|--verbose)     VERBOSE=true; shift ;;
        -h|--help)        usage ;;
        *) echo -e "${RED}Unknown option: $1${NC}"; usage ;;
    esac
done
if [[ "$PROJECT_ONLY" == true && "$GLOBAL_ONLY" == true ]]; then
    echo -e "${RED}Error: --project-only and --global-only are mutually exclusive${NC}"
    exit 1
fi
# ─── Helper Functions ─────────────────────────────────────────────────────────
# Calculate directory size in bytes
dir_size() {
    local path="$1"
    if [[ -e "$path" ]]; then
        du -sk "$path" 2>/dev/null | cut -f1
    else
        echo 0
    fi
}
# Format bytes to human-readable
human_size() {
    local kb="$1"
    if [[ "$kb" -ge 1048576 ]]; then
        echo "$(echo "scale=1; $kb / 1048576" | bc)G"
    elif [[ "$kb" -ge 1024 ]]; then
        echo "$(echo "scale=1; $kb / 1024" | bc)M"
    else
        echo "${kb}K"
    fi
}
# Clean a directory or file
clean_item() {
    local path="$1"
    local label="$2"
    local category="$3"  # "safe" or "aggressive"
    # Skip if aggressive-only item but not in aggressive mode
    if [[ "$category" == "aggressive" && "$AGGRESSIVE" != true ]]; then
        return 0
    fi
    if [[ ! -e "$path" ]]; then
        return 0
    fi
    local size_kb
    size_kb=$(dir_size "$path")
    local size_hr
    size_hr=$(human_size "$size_kb")
    if [[ "$FORCE" == true ]]; then
        rm -rf "$path"
        echo -e "  ${GREEN}? Deleted${NC}  ${DIM}${label}${NC} (${size_hr})"
    else
        echo -e "  ${YELLOW}? Would delete${NC}  ${DIM}${label}${NC} (${size_hr})"
    fi
    TOTAL_FREED=$((TOTAL_FREED + size_kb))
}
# Clean old files in a directory (older than N days)
clean_old_files() {
    local dir="$1"
    local label="$2"
    local days="$3"
    local category="$4"
    if [[ "$category" == "aggressive" && "$AGGRESSIVE" != true ]]; then
        return 0
    fi
    if [[ ! -d "$dir" ]]; then
        return 0
    fi
    local count
    count=$(find "$dir" -mindepth 1 -maxdepth 1 -mtime +"$days" 2>/dev/null | wc -l | tr -d ' ')
    if [[ "$count" -eq 0 ]]; then
        return 0
    fi
    local size_kb=0
    while IFS= read -r f; do
        local fsize
        fsize=$(dir_size "$f")
        size_kb=$((size_kb + fsize))
    done < <(find "$dir" -mindepth 1 -maxdepth 1 -mtime +"$days" 2>/dev/null)
    local size_hr
    size_hr=$(human_size "$size_kb")
    if [[ "$FORCE" == true ]]; then
        find "$dir" -mindepth 1 -maxdepth 1 -mtime +"$days" -exec rm -rf {} +
        echo -e "  ${GREEN}? Deleted ${count} old items${NC}  ${DIM}${label} (>${days}d)${NC} (${size_hr})"
    else
        echo -e "  ${YELLOW}? Would delete ${count} old items${NC}  ${DIM}${label} (>${days}d)${NC} (${size_hr})"
    fi
    TOTAL_FREED=$((TOTAL_FREED + size_kb))
}
# ─── Header ───────────────────────────────────────────────────────────────────
echo ""
echo -e "${BOLD}${CYAN}╔══════════════════════════════════════════════════╗${NC}"
echo -e "${BOLD}${CYAN}║     Claude Code Cache Cleaner                   ║${NC}"
echo -e "${BOLD}${CYAN}╚══════════════════════════════════════════════════╝${NC}"
echo ""
if [[ "$FORCE" != true ]]; then
    echo -e "${YELLOW}?  DRY-RUN MODE — No files will be deleted. Use -f to apply.${NC}"
else
    echo -e "${RED}?  FORCE MODE — Files WILL be deleted!${NC}"
fi
if [[ "$AGGRESSIVE" == true ]]; then
    echo -e "${RED}?  AGGRESSIVE — Including sessions, history, and usage data.${NC}"
fi
echo ""
# ─── Global Cleanup ───────────────────────────────────────────────────────────
if [[ "$PROJECT_ONLY" != true ]]; then
    echo -e "${BOLD}?? Global Cache: ${CLAude_DIR}${NC}"
    echo -e "${DIM}─────────────────────────────────────────────────${NC}"
    # ── Safe to delete entirely ──
    clean_item "$CLAude_DIR/cache"                 "Cache files"                "safe"
    clean_item "$CLAude_DIR/debug"                 "Debug logs"                 "safe"
    clean_item "$CLAude_DIR/paste-cache"           "Paste cache"                "safe"
    clean_item "$CLAude_DIR/downloads"             "Downloads"                  "safe"
    clean_item "$CLAude_DIR/stats-cache.json"      "Stats cache"                "safe"
    # ── Clean contents (preserve directory) — only files older than 3 days ──
    # Using time-based cleanup to avoid deleting files from active sessions
    clean_old_files "$CLAude_DIR/file-history"  "File edit history"    3   "safe"
    clean_old_files "$CLAude_DIR/shell-snapshots" "Shell snapshots"    3   "safe"
    clean_old_files "$CLAude_DIR/session-env"   "Session environments" 3   "safe"
    clean_old_files "$CLAude_DIR/backups"       "Backup files"         3   "safe"
    clean_old_files "$CLAude_DIR/tasks"         "Task history"         3   "safe"
    clean_old_files "$CLAude_DIR/plans"         "Plan files"           7   "safe"
    # ── Aggressive-only — also time-limited to protect active sessions ──
    clean_old_files "$CLAude_DIR/sessions"      "Session metadata"      7   "aggressive"
    clean_item "$CLAude_DIR/history.jsonl"         "Command history"            "aggressive"
    clean_old_files "$CLAude_DIR/usage-data"    "Usage data"            7   "aggressive"
    # ── Clean stale projects ──
    # NOTE: Claude Code encodes project paths with a complex scheme that doesn't
    # simply map "/" to "-". Paths with CJK characters, spaces, or dots produce
    # encoding patterns like "----" that cannot be reliably reversed.
    # Instead, we only clean project dirs that have ONLY a sessions-index.json
    # (meaning no real session data was ever written — just an empty index).
    echo ""
    echo -e "${DIM}  Checking for empty/unused project directories...${NC}"
    if [[ -d "$CLAude_DIR/projects" ]]; then
        while IFS= read -r proj_dir; do
            # Count total files in the project directory
            file_count=$(find "$proj_dir" -type f 2>/dev/null | wc -l | tr -d ' ')
            # If only 1 file and it's sessions-index.json → never had real sessions
            if [[ "$file_count" -le 1 ]]; then
                has_only_index=$([[ -f "${proj_dir}/sessions-index.json" ]] && echo "yes" || echo "no")
                if [[ "$has_only_index" == "yes" ]]; then
                    clean_item "$proj_dir" "Empty project: $(basename "$proj_dir")" "safe"
                fi
            fi
        done < <(find "$CLAude_DIR/projects" -mindepth 1 -maxdepth 1 -type d 2>/dev/null)
    fi
    # ── Clean old files in large directories ──
    echo ""
    echo -e "${DIM}  Checking for old files (>${STALE_DAYS:-30} days)...${NC}"
    # Clean stale scheduled tasks (not from current session)
    if [[ -f "$CLAude_DIR/scheduled_tasks.json" ]]; then
        clean_item "$CLAude_DIR/scheduled_tasks.json" "Scheduled tasks" "aggressive"
    fi
    echo ""
fi
# ─── Project-Level Cleanup ────────────────────────────────────────────────────
if [[ "$GLOBAL_ONLY" != true ]]; then
    # Find all project-level .claude directories
    echo -e "${BOLD}?? Project-Level Cache${NC}"
    echo -e "${DIM}─────────────────────────────────────────────────${NC}"
    # Current project
    if [[ -d ".claude" ]]; then
        echo -e "  ${CYAN}Current project:${NC} $(pwd)/.claude/"
        # Clean worktrees
        if [[ -d ".claude/worktrees" ]]; then
            worktree_count=$(find .claude/worktrees -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l | tr -d ' ')
            if [[ "$worktree_count" -gt 0 ]]; then
                # Check if any worktrees are still registered in git
                stale_worktrees=0
                while IFS= read -r wt_dir; do
                    if ! git worktree list 2>/dev/null | grep -q "$(basename "$wt_dir")"; then
                        stale_worktrees=$((stale_worktrees + 1))
                    fi
                done < <(find .claude/worktrees -mindepth 1 -maxdepth 1 -type d 2>/dev/null)
                if [[ "$stale_worktrees" -gt 0 ]]; then
                    echo -e "  ${DIM}  Found ${stale_worktrees} stale worktree(s) (not registered in git)${NC}"
                    # Only clean stale worktrees in force mode
                    if [[ "$FORCE" == true ]]; then
                        while IFS= read -r wt_dir; do
                            if ! git worktree list 2>/dev/null | grep -q "$(basename "$wt_dir")"; then
                                rm -rf "$wt_dir"
                                echo -e "  ${GREEN}? Deleted stale worktree${NC}  ${DIM}$(basename "$wt_dir")${NC}"
                            fi
                        done < <(find .claude/worktrees -mindepth 1 -maxdepth 1 -type d 2>/dev/null)
                    else
                        echo -e "  ${YELLOW}? Would clean stale worktrees${NC}"
                    fi
                fi
            fi
        fi
        # Clean project-level scheduled tasks
        clean_item ".claude/scheduled_tasks.json" "Project scheduled tasks" "aggressive"
        # Clean project-level session/task artifacts (but preserve memory/ and skills/)
        for subdir in .claude/tasks .claude/plans .claude/session-env; do
            if [[ -d "$subdir" ]]; then
                clean_old_files "$subdir" "$(basename "$subdir")" 3 "safe"
            fi
        done
    else
        echo -e "  ${DIM}No .claude/ directory in current project${NC}"
    fi
    echo ""
fi
# ─── Summary ──────────────────────────────────────────────────────────────────
echo -e "${BOLD}══════════════════════════════════════════════════${NC}"
total_hr=$(human_size "$TOTAL_FREED")
if [[ "$FORCE" == true ]]; then
    echo -e "${GREEN}${BOLD}  Freed: ${total_hr}${NC}"
else
    echo -e "${YELLOW}${BOLD}  Would free: ${total_hr}${NC}"
    echo -e ""
    echo -e "  Run with ${BOLD}-f${NC} to apply:  $(basename "$0") -f"
    if [[ "$AGGRESSIVE" != true ]]; then
        echo -e "  Add ${BOLD}--aggressive${NC} for deeper clean:  $(basename "$0") -f --aggressive"
    fi
fi
echo -e "${BOLD}══════════════════════════════════════════════════${NC}"
echo ""
# ─── Preserved Items Info ─────────────────────────────────────────────────────
echo -e "${DIM}Preserved (not deleted):${NC}"
echo -e "${DIM}  ? Settings files (settings.json, settings.local.json)${NC}"
echo -e "${DIM}  ? Skills, agents, and plugins${NC}"
echo -e "${DIM}  ? Project memories (*/memory/)${NC}"
echo -e "${DIM}  ? IDE configuration${NC}"
echo -e "${DIM}  ? Harness rules${NC}"
echo ""

到此這篇關(guān)于一文詳解如何使用腳本清理Claude Code緩存信息的文章就介紹到這了,更多相關(guān)Claude Code緩存信息清理內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!

相關(guān)文章

  • Claude Code CLI完整命令參考手冊(cè)(值得收藏)

    這篇文章主要為大家詳細(xì)介紹了Claude Code CLI的完整命令參考手冊(cè),涵蓋了交互式斜杠命令,鍵盤快捷鍵,配置文件系統(tǒng),Hooks 系統(tǒng),常用工作流等內(nèi)容,有需要的小伙伴可以
    2026-06-12
  • 小白也能照著做:Claude Code 在 macOS 上的安裝與 API配置全流程分析

    這篇文章給大家介紹小白也能照著做:Claude Code 在 macOS 上的安裝與 API配置全流程分析,本文結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友一起看看吧
    2026-06-12
  • Claude Code常用快捷鍵、命令與最佳實(shí)踐

    在使用 Claude Code 進(jìn)行日常開(kāi)發(fā)工作時(shí),你是否遇到過(guò)這些困擾的場(chǎng)景:長(zhǎng)對(duì)話中的 Token 消耗焦慮,頻繁重復(fù)相同命令的疲憊以及命令功能的遺忘等問(wèn)題,所以本文將詳細(xì)梳理
    2026-06-11
  • Claude Code接入DeepSeek的保姆級(jí)教程

    本文詳細(xì)介紹了將Claudede切換至DeepSeek的的優(yōu)勢(shì)與操作方法,包括費(fèi)用對(duì)比、配置步驟及避坑指南,幫助DeepSeek為更經(jīng)濟(jì)高效的AI編程工具,需要的朋友可以參考下
    2026-06-10
  • Claude Code設(shè)置默認(rèn)中文輸出的完整指南

    Claude Code 作為 Anthropic 推出的 AI 編程助手,憑借強(qiáng)大的代碼理解與生成能力成為了很多開(kāi)發(fā)者的效率工具,但默認(rèn)情況下,它的交互語(yǔ)言是英文,對(duì)于習(xí)慣中文的用戶來(lái)說(shuō),
    2026-06-10
  • 2026年最全Claude Code使用命令指南

    Claude Code 是 Anthropic 推出的 AI 編程命令行工具,它內(nèi)置了豐富的命令體系,本文將全面整理 Claude Code 的所有官方命令,按功能分類呈現(xiàn),同時(shí)涵蓋 CLI 啟動(dòng)參數(shù)、鍵
    2026-06-10
  • Windows 安裝 Claude Code CLI 完整指南

    本文詳細(xì)介紹了在 Windows 系統(tǒng)上安裝 Claude Code CLI 的完整步驟,包括官方腳本安裝和 npm 安裝兩種方式,解決了 PowerShell 執(zhí)行權(quán)限問(wèn)題,具有一定的參考價(jià)值,感興趣
    2026-06-10
  • Claude Code 初學(xué)者入門必看指南

    ClaudeCode是一款A(yù)I執(zhí)行助手,能直接幫你寫代碼、改文件、整理資料、分析數(shù)據(jù),本文給大家介紹Claude Code 初學(xué)者必看指南,感興趣的朋友一起看看吧
    2026-06-09
  • 不登錄的情況下Claude Code桌面端連接第三方API詳細(xì)教程

    本文介紹了如何在不登錄的情況下,為Claude Code桌面端配置第三方API接入的詳細(xì)教程,教程包含四個(gè)主要步驟:1開(kāi)啟開(kāi)發(fā)者模式;2打開(kāi)設(shè)置界面;3選擇API提供商并填寫B(tài)ase UR
    2026-06-08

最新評(píng)論

乌恰县| 扶绥县| 且末县| 云龙县| 玉山县| 中牟县| 专栏| 保德县| 林甸县| 桐庐县| 曲阳县| 奉节县| 平原县| 固原市| 临武县| 长垣县| 柏乡县| 淳化县| 班戈县| 嘉荫县| 宁都县| 乳源| 山阳县| 武威市| 偃师市| 平武县| 正镶白旗| 丰顺县| 恩施市| 八宿县| 汶川县| 玉林市| 始兴县| 宾阳县| 新龙县| 通州区| 循化| 松潘县| 揭东县| 襄城县| 刚察县|