macos-open
Open files, URLs, and applications on macOS using the open command. The universal entry point for launching anything.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
macOS 打开
使用 macOS open 命令打开文件、URL、应用、文件夹。
使用场景
- 用户说「帮我打开这个文件」「打开浏览器到某个网址」
- 任务完成后打开生成的文件让用户查看
- 需要启动某个应用
命令参考
打开文件(用默认应用)
open "/path/to/document.pdf"
open ~/Downloads/report.xlsx
打开文件(指定应用)
# 用 VS Code 打开
open -a "Visual Studio Code" /path/to/project
# 用 Preview 打开图片
open -a "Preview" /path/to/image.png
# 用 Pages 打开文档
open -a "Pages" /path/to/document.docx
打开 URL
open "https://www.google.com"
open "https://notion.so"
打开应用
open -a "Safari"
open -a "Finder"
open -a "System Preferences"
# macOS Ventura+
open -a "System Settings"
打开文件夹
# 在 Finder 中打开
open ~/Documents
open ~/Downloads
# 在终端中打开(新窗口)
open -a "Terminal" ~/Projects
显示文件在 Finder 中的位置
open -R "/path/to/file.txt"
打开多个文件
open file1.pdf file2.pdf file3.pdf
输出规范
- 打开后告知用户「已打开 XXX」
- 如果文件不存在,说明原因并帮助查找
- 打开 URL 时直接打开,不需要确认
- 打开应用时如果应用不存在,推荐替代或安装方式
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-03-11
- Mise à jour de l’index
- 2026-03-11
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!