claude code命令

Common Tasks:
• Ask questions about your codebase > How does foo.py work?
• Edit files > Update bar.ts to...
• Fix errors > cargo build
• Run commands > /help
• Run bash commands > !ls

Interactive Mode Commands:
/add-dir - Add a new working directory
/agents - Manage agent configurations
/bashes - List and manage background bash shells
/clear - Clear conversation history and free up context
/compact - Clear conversation history but keep a summary in context. Optional: /compact [instructions for
summarization]
/config - Open config panel
/cost - Show the total cost and duration of the current session
/doctor - Diagnose and verify your Claude Code installation and settings
/exit - Exit the REPL
/export - Export the current conversation to a file or clipboard
/help - Show help and available commands
/hooks - Manage hook configurations for tool events
/ide - Manage IDE integrations and show status
/init - Initialize a new CLAUDE.md file with codebase documentation
/install-github-app - Set up Claude GitHub Actions for a repository
/login - Switch Anthropic accounts
/logout - Sign out from your Anthropic account
/mcp - Manage MCP servers
/memory - Edit Claude memory files
/migrate-installer - Migrate from global npm installation to local installation
/model - Set the AI model for Claude Code
/output-style - Set the output style directly or from a selection menu
/output-style:new - Create a custom output style
/permissions - Manage allow & deny tool permission rules
/pr-comments - Get comments from a GitHub pull request
/release-notes - View release notes
/resume - Resume a conversation
/review - Review a pull request
/security-review - Complete a security review of the pending changes on the current branch
/status - Show Claude Code status including version, model, account, API connectivity, and tool statuses
/statusline - Set up Claude Code's status line UI
/upgrade - Upgrade to Max for higher rate limits and more Opus
/vim - Toggle between Vim and Normal editing modes

 

常用任务:
- 询问代码库问题 > foo.py 是如何工作的?
- 编辑文件 > 更新 bar.ts 来...
- 修复错误 > cargo build
- 运行命令 > /help
- 运行 bash 命令 > !ls

交互模式命令:
- /add-dir - 添加新的工作目录
- /agents - 管理代理配置
- /bashes - 列出和管理后台 bash 进程
- /clear - 清空对话历史并释放上下文
- /compact - 清空对话历史但保留摘要在上下文中
- /config - 打开配置面板
- /cost - 显示当前会话的总成本和持续时间
- /doctor - 诊断和验证 Claude Code 安装和设置
- /exit - 退出 REPL
- /export - 导出当前对话到文件或剪贴板
- /help - 显示帮助和可用命令
- /hooks - 管理工具事件的钩子配置
- /ide - 管理 IDE 集成并显示状态
- /init - 初始化新的 CLAUDE.md 文件与代码库文档
- /install-github-app - 为仓库设置 Claude GitHub Actions
- /login - 切换 Anthropic 账户
- /logout - 从 Anthropic 账户注销
- /mcp - 管理 MCP 服务器
- /memory - 编辑 Claude 记忆文件
- /migrate-installer - 从全局 npm 安装迁移到本地安装
- /model - 设置 Claude Code 的 AI 模型
- /output-style - 直接设置输出样式或从选择菜单设置
- /output-style:new - 创建自定义输出样式
- /permissions - 管理允许和拒绝工具权限规则
- /pr-comments - 获取 GitHub pull request 的评论
- /release-notes - 查看发布说明
- /resume - 恢复对话
- /review - 审查 pull request
- /security-review - 对当前分支的待定更改进行安全审查
- /status - 显示 Claude Code 状态(包括版本、模型、账户、API 连接和工具状态)
- /statusline - 设置 Claude Code 的状态栏 UI
- /upgrade - 升级到 Max 以获得更高的速率限制和更多 Opus
- /vim - 在 Vim 和普通编辑模式之间切换

posted @ 2025-08-25 03:20  量子我梦  阅读(57)  评论(0)    收藏  举报