A small utility that can mount remote SMB drives locally on macOS from the command line.
The program wraps underlying commands line mount and umount in a friendlier
interface, by allowing the user to configure named drives that allows simple
logical names to be mapped to drive urls, mount points, and options.
It implements a number of commands to do this:
mountmounts a drive, if it is not already mountedunmountunmounts a one or more already mounted driveslistlists the currently known mounted drives and their mount status.completions <shell>generates shell completion scripts.
Generate and install completions for your shell:
# fish
mounter completions fish > ~/.config/fish/completions/mounter.fish
# bash
mounter completions bash > ~/.bash_completion.d/mounter
# zsh
mounter completions zsh > ~/.zsh/completions/_mounterThe drive mappings are stored in a toml configuration file, that is read at
startup.
Pass --config /path/to/config.toml to load a specific file. If omitted,
mounter searches the standard per-user configuration locations for
config.toml using the directories crate.
The root table in configuration file contains app wide settings, and a table that maps name (keys) to options for individual drives.
The configuration file looks like this:
# ... general options
[drives.backup]
url = "smb://user@network-name.local/backup-dir"
path = "~/mnt/backup"
# ... more options for drive mapping named `backup`
[drives.music]
# ... mapping config for a drive mapping named `music`
This project is licensed under the MIT License.