• 请不要在回答技术问题时复制粘贴 AI 生成的内容
jdz
V2EX  ›  程序员

求教, claude code 可以不询问直接一直运行么

  •  
  •   jdz · Jun 27, 2025 · 7803 views
    This topic created in 378 days ago, the information mentioned may be changed or developed.

    每次都询问是不是要继续, 太麻烦了, 要盯着才行

    3 replies    2025-06-29 02:42:18 +08:00
    coolcoffee
        1
    coolcoffee  
       Jun 27, 2025   ❤️ 1
    claude --dangerously-skip-permissions



    官方又不是没给文档,https://docs.anthropic.com/en/docs/claude-code/cli-reference
    wynemo
        2
    wynemo  
       Jun 28, 2025   ❤️ 1
    啥? shift + tab 呀 auto accept ,打开就可以这样
    runze
        3
    runze  
       Jun 29, 2025   ❤️ 1
    1. claude --dangerously-skip-permissions
    直接给它所有权限,就不需要每次请求了
    2. 在命令中让它循环,并给出循环结束条件,比如:
    “自动循环执行 lint 、type-check 、build 、修复,直至成功 build”
    给出循环终止条件与明确让它循环一样重要,条件不满足会促使 Claude 继续尝试。
    3. claude config set --global preferredNotifChannel terminal_bell
    配合你终端模拟器的设置,在需要你参与的时候通知你,这样就不需要一直盯着
    https://docs.anthropic.com/en/docs/claude-code/setup#notification-setup
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   983 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 19:48 · PVG 03:48 · LAX 12:48 · JFK 15:48
    ♥ Do have faith in what you're doing.