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
相关推荐
雨声不在5 小时前
mac-intel安装git-lfs
git·elasticsearch·macos
Cho1yon1 天前
【第15期:车机CarPlay使用中语音唤醒失效问题分析与解决方案】
macos·车载系统·objective-c·cocoa
星辰即远方1 天前
Masonry
macos·objective-c·cocoa
一只AI打工虾的自我修养1 天前
Mac mini 本地AI工作站配置指南(2026实战):从零打造 M4 Mac mini AI 开发环境
人工智能·macos
allanGold1 天前
figma sketch 平替工具有哪些
macos·figma·sketch·pencil·penbot
Java陈序员1 天前
牛马效率可视化!一款键鼠统计菜单栏应用!
windows·macos
2501_915106321 天前
在Mac上搭建iOS开发环境的详细步骤与注意事项
ide·vscode·macos·ios·个人开发·swift·敏捷流程
想个名字想老半天1 天前
uni 离线打包 ios,适用于自定义 ios系统最低适配 保姆级教程
macos·ios·cocoa
zzzb1234561 天前
CC-Switch 全平台下载、安装与使用全指南(Windows/macOS/Linux)
linux·windows·macos·ai编程·cc-switch