https://github.com/superzazu/open-terminal-at-folder
Quickly opens the macOS Terminal at current folder (macOS 11+)
https://github.com/superzazu/open-terminal-at-folder
macos shortcut terminal
Last synced: 2 months ago
JSON representation
Quickly opens the macOS Terminal at current folder (macOS 11+)
- Host: GitHub
- URL: https://github.com/superzazu/open-terminal-at-folder
- Owner: superzazu
- License: zlib
- Created: 2025-01-18T17:24:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-22T08:02:28.000Z (over 1 year ago)
- Last Synced: 2025-02-22T08:30:12.582Z (over 1 year ago)
- Topics: macos, shortcut, terminal
- Language: Swift
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# open-terminal-at-folder
Quickly opens the macOS Terminal at "current folder", which is:
- either the Finder's "insertion location" (the location where a new folder would be created if "New folder" was selected) if the Finder is the frontmost app
- or the active window's document path (if possible). Works with Sublime Text, VSCode, Terminal, and most document-based native apps.
Run with `swift run`, build & install with:
```sh
swift build -c release && sudo cp .build/release/open-terminal-at-folder /usr/local/bin
```
## Why ?
For years, I've had an AppleScript that did the same thing — which was triggered by a keyboard shortcut (using tools such as Hammerspoon or Raycast).
This project allows for a faster execution: ~0.32s -> ~0.0278sec (almost _12 times faster_).
## Development
During development, if there is a need to add more props to `FinderApplication.swift`, here is how the SDEF/header files can be generated:
```sh
sdef /System/Library/CoreServices/Finder.app > Finder.sdef
sdp -fh --basename Finder Finder.sdef
```