Skip to content

hravnx/mounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mounter

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:

  • mount mounts a drive, if it is not already mounted
  • unmount unmounts a one or more already mounted drives
  • list lists the currently known mounted drives and their mount status.
  • completions <shell> generates shell completion scripts.

Shell Completions

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/_mounter

Configuration

The 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`

License

This project is licensed under the MIT License.

About

A small utility that can mount remote SMB drives locally on macOS from the command line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages