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
相关推荐
2501_916007471 小时前
iOS和macOS应用程序性能分析和优化工具使用综合指南
android·macos·ios·小程序·uni-app·iphone·webview
寒水馨21 小时前
macOS下载、安装openclaw-v2026.7.1(附安装包OpenClaw-2026.7.1.dmg)
macos·大模型·github·开源软件·ai助手·openclaw·gpt-5.6
白玉cfc1 天前
【iOS】MRC和ARC
macos·ios·cocoa
飞雪金灵1 天前
mac电脑 Maven下载安装和配置环境变量
macos·maven·maven下载安装·mac电脑环境
雨声不在1 天前
macos 12使用docker
macos·docker·容器
一叶龙洲1 天前
ubuntu26.04 xfce美化成mac
服务器·ubuntu·macos
李小白杂货铺1 天前
Oh My Zsh 简记
macos·macbook·zsh·主题·插件·oh my zsh·omz
fukai77222 天前
macOS防止休眠的菜单栏小工具
macos
web守墓人2 天前
【go语言】gotar:使用go语言复刻tar命令,并加入7z支持,可独立运行在windows、linux、macos上
linux·macos·golang
之歆3 天前
从 Mac 回到 Windows:用 PowerToys + AutoHotkey 找回熟悉手感
windows·macos