MAC 电脑快速打开claude code 终端

实现效果

我们直接在文件夹上右键,直接打开claude

实现路径

选择快捷操作

选择文件或文件夹 位于选择 访达

拖动运行applescript到中间的窗口

添加下面的脚本

这个脚本访是使用iterm打开,如果使用其他终端打开,可以询问豆包改代码

复制代码
on run {input, parameters}
	set targetPath to POSIX path of (item 1 of input)
	-- 用 iTerm2 打开目录并执行 claude 命令
	tell application "iTerm"
		create window with default profile
		tell current window
			tell current session
				write text "cd " & quoted form of targetPath
				write text "claude"
			end tell
		end tell
	end tell
	
	return input
end run

如果需要添加claude 无需确认权限的模式可是使用下面的脚本

复制代码
on run {input, parameters}
	set targetPath to POSIX path of (item 1 of input)
	-- 用 iTerm2 打开目录并执行 claude 命令
	tell application "iTerm"
		create window with default profile
		tell current window
			tell current session
				write text "cd " & quoted form of targetPath
				write text "claude --dangerously-skip-permissions"
			end tell
		end tell
	end tell
	
	return input
end run
相关推荐
张3蜂26 分钟前
Flutter macOS 安装文档
flutter·macos
Rabbit_QL41 分钟前
【find的用法】macOS/Linux 下高效查找文件
linux·macos
大熊猫侯佩1 天前
升级到 macOS26.5 后看视频会自动息屏的解决
macos·操作系统
磊 子1 天前
C++ IO 流
macos·objective-c·cocoa
real_haha1 天前
我做了一个仅有 1.3 MB 的 macOS 原生 AI 助手:AskNow
人工智能·macos
June bug1 天前
(Mac)macOS x86_64上onnxruntime==1.24.4 安装失败
macos
ACP广源盛139246256732 天前
iOS 27 开放 AI 生态@ACP#小型化扩展黄金风口,IX8008全面超越 ASM2806,铸就嵌入式 AI 扩展核心
人工智能·嵌入式硬件·macos·ios·计算机外设·objective-c·cocoa
海的辽阔2 天前
如何在MAC下安装EcomGpt模型
macos·大模型·ecomgpt
zandy10112 天前
hermes agent 安装教程 3.0:Win / Mac / Linux 全平台指南
linux·运维·macos
花开·莫之弃2 天前
Mac安装多版本jdk(jenv)
java·开发语言·macos