A simple, elegant shell extension that adds a finder command to open Finder windows on macOS. Supports both Fish shell and Zsh.
- π Easy to use: Simple
findercommand to open Finder windows - π Multiple shells: Support for both Fish and Zsh
- π Smart path handling: Works with files, directories, relative paths, and tilde expansion
- π― File revealing: Automatically reveals files in Finder or opens directories
- π Multiple paths: Open multiple locations at once
- π‘οΈ Error handling: Comprehensive validation and helpful error messages
- π macOS native: Built specifically for macOS using native
opencommand - π Tab completion: Built-in shell completion support
# Install using Fisher
fisher install iamrajjoshi/finder# Clone to Oh My Zsh custom plugins directory
git clone https://github.com/iamrajjoshi/finder.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/finder
# Add to your ~/.zshrc plugins list
plugins=(... finder)
# Reload your shell
source ~/.zshrc# Open current directory in Finder
finder
# Open specific directory
finder ~/Desktop
# Open multiple directories
finder ~/Documents ~/Downloads
# Reveal a file in Finder
finder /path/to/file.txt
# Open parent directory
finder ..
# Get help
finder --help# Current directory
finder
# Home directory
finder ~
# Specific paths
finder /Applications
finder ~/Desktop ~/Documents
# Relative paths
finder .
finder ..
finder ./subfolder# Reveal any file type in Finder
finder ~/Documents/report.pdf
finder /path/to/image.jpg
finder ./README.md# Multiple mixed paths
finder ~/Desktop file.txt ../parent-dir
# With wildcards (shell expands them)
finder ~/Pictures/*.jpg
# Complex paths with spaces (automatically handled)
finder "~/My Documents/Project Files"Fisher is the recommended package manager for Fish shell:
-
Install Fisher
-
Install Finder:
fisher install iamrajjoshi/finder
-
Uninstall (if needed):
fisher remove iamrajjoshi/finder
Oh My Zsh is the recommended framework for Zsh:
-
Install Oh My Zsh:
-
Install Finder as a custom plugin:
git clone https://github.com/iamrajjoshi/finder.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/finder -
Add to plugins in
~/.zshrc:plugins=(git ... finder)
-
Reload your shell:
source ~/.zshrc
fisher remove iamrajjoshi/finder# Remove plugin directory
rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/finder
# Remove 'finder' from plugins list in ~/.zshrc
# Then reload: source ~/.zshrc- Operating System: macOS (any version with
opencommand) - Shell: Fish shell 3.0+ or Zsh 5.0+
- Dependencies: None (uses built-in macOS tools)
| Flag | Description |
|---|---|
-h, --help |
Show help message and usage examples |
--version |
Display version information |
| Argument | Description |
|---|---|
PATH |
File or directory path to open (optional, defaults to current directory) |
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error (invalid path, not macOS, etc.) |
Both Fish and Zsh versions include built-in tab completion:
- Fish: Completes directories and shows descriptions
- Zsh: Completes files and directories with Zsh's powerful completion system
For troubleshooting, you can manually inspect the shell functions:
# Fish: View the function
functions finder
# Zsh: Check if function is loaded
which finderThis project is licensed under the MIT License - see the LICENSE file for details.