A modern, configurable terminal application for managing SSH filesystem mounts. Built with Go, featuring both interactive TUI and CLI interfaces using Cobra, Bubble Tea, and Lip Gloss.
GoMount provides a flexible configuration system through JSON files, allowing you to define custom mount targets and easily manage remote filesystem connections with a beautiful, colorful interface.
- 🎨 Vibrant TUI - Beautiful, colorful terminal user interface with Bubble Tea
- ⌨️ CLI Commands - Traditional command-line interface for scripting and automation
- 📁 Mount Management - Mount/unmount SSH filesystems with ease using SSHFS
- 📋 Status Overview - List all mount targets with current status
- 🔧 JSON Configuration - Flexible configuration system via
gomount.json - 🎯 Interactive Mode - Navigate with keyboard shortcuts and selections
- 💾 Configurable Mountpoints - Define custom mount directories
- 🔒 SSH Key Support - Seamless authentication with SSH keys
- 📊 Multiple Targets - Manage multiple remote servers simultaneously
- 🎨 Custom Styling - Vibrant color scheme with Lip Gloss styling
- macOS 10.15 or later
- Go 1.19 or later (for building from source)
- SSHFS - SSH Filesystem client
- SSH access to remote servers
# Install SSHFS via Homebrew
brew install sshfs
# Verify installation
sshfs --versionFor seamless mounting without password prompts, set up SSH keys:
# Generate SSH key (if you don't have one)
ssh-keygen -t ed25519 -C "your_email@example.com"
# Copy public key to remote servers
ssh-copy-id username@hostname# Clone the repository
git clone https://github.com/stephan/gomount.git
cd gomount
# Build the application
./build.sh
# Optionally install to system PATH
sudo cp gomount /usr/local/bin/# Install directly with go (if repository is public)
go install github.com/stephan/gomount@latest# Build manually with go
go mod tidy
go build -o gomount .Important: Before using GoMount, you must configure your remote drives in the gomount.json file.
- Create or edit
gomount.jsonin your project directory (same location as the gomount executable) - Define your remote servers with connection details
- Set your preferred mountpoint directory
See the Configuration File section below for detailed examples.
Simply run gomount to enter the beautiful TUI:
gomountNavigate using:
- ↑/↓ or k/j - Move cursor up/down
- Enter - Select option
- Esc - Go back to previous menu
- q or Ctrl+C - Quit application
gomount listgomount mount server1
gomount mount demo-server-1
gomount mount production-servergomount unmount server1gomount unmount allGoMount requires a gomount.json configuration file to define your remote mount targets.
The configuration file should be located in:
- Same directory as the
gomountexecutable (default) - Custom location specified with
--configflag - Current working directory when running gomount
The gomount.json file includes:
- mountpoint: Base directory where all targets will be mounted
- viewer: Optional file viewer command (e.g., "open", "nautilus")
- targets: Array of your remote server configurations
{
"mountpoint": "/tmp/gomount",
"viewer": "open",
"targets": [
{
"name": "my-server",
"host": "192.168.1.100",
"user": "username",
"path": "/home/username",
"port": 22
},
{
"name": "web-server",
"host": "webserver.example.com",
"user": "webmaster",
"path": "/var/www/html",
"port": 22
}
]
}Home Directory Mount:
{
"mountpoint": "$HOME/RemoteServers",
"targets": [
{
"name": "home-nas",
"host": "nas.local",
"user": "admin",
"path": "/volume1/homes/admin",
"port": 22
}
]
}Multiple Server Types:
{
"mountpoint": "/mnt/remote",
"targets": [
{
"name": "development",
"host": "dev.company.com",
"user": "developer",
"path": "/var/www/dev",
"port": 2222
},
{
"name": "production",
"host": "prod.company.com",
"user": "deploy",
"path": "/var/www/html",
"port": 22
},
{
"name": "backup-server",
"host": "backup.company.com",
"user": "backup",
"path": "/backups",
"port": 22
}
]
}Each target is mounted to: {mountpoint}/{name}
Examples:
- Target "my-server" →
/tmp/gomount/my-server - Target "web-server" →
/tmp/gomount/web-server - With
$HOME/RemoteServers→/Users/yourname/RemoteServers/home-nas
GoMount supports several command-line options:
-c, --config: Path to config file (default:gomount.json)-m, --mountpoint: Override mountpoint directory from config-v, --viewer: Override viewer command from config
Examples:
# Use custom config file location
gomount --config /path/to/my-servers.json
# Override mountpoint from config file
gomount --mountpoint /custom/mount/location
# Override viewer command
gomount --viewer "code"
# Combine multiple options
gomount --config ~/my-config.json --mountpoint ~/MyMountsEach target in gomount.json supports these fields:
- name: Unique identifier for the mount target
- host: Remote server hostname or IP address
- user: SSH username for authentication
- path: Remote directory path to mount
- port: SSH port (typically 22)
You can use $HOME in the mountpoint path, which will be automatically expanded:
{
"mountpoint": "$HOME/Mountpoints"
}GoMount uses a vibrant color palette:
- Primary: Coral Red (#FF6B6B)
- Secondary: Turquoise (#4ECDC4)
- Accent: Golden Yellow (#FFE66D)
- Success: Mint Green (#95E1D3)
- Warning: Orange (#FFA726)
- Error: Red (#FF5252)
./build.sh./build.sh --skip-tests./build.sh v1.0.0The build script creates:
- Architecture-specific binaries
- Universal macOS binary
- Optional system installation
gomount/
├── main.go # Application entry point
├── cmd/ # Cobra CLI commands
│ ├── root.go
│ ├── mount.go
│ ├── unmount.go
│ └── list.go
├── internal/
│ ├── config/ # Mount configurations
│ ├── mount/ # Mount operations
│ └── tui/ # Bubble Tea TUI
│ ├── models.go
│ ├── view.go
│ ├── styles.go
│ └── tui.go
├── build.sh # Build script
└── README.md
- Cobra - CLI framework
- Bubble Tea - TUI framework
- Lip Gloss - Terminal styling
go test ./...brew install sshfs- Ensure SSH key authentication is set up
- Test manual SSH connection:
ssh username@hostname
- Force unmount:
diskutil unmount force ~/Mountpoints/target - Or restart the application
- Check SSH connection
- Verify remote path exists
- Ensure proper permissions
Enable verbose output by setting:
export DEBUG=1
gomount[Add your license here]
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Original
sshfsmount.shscript functionality - Charm for Bubble Tea and Lip Gloss
- Cobra CLI library
- The Go community
Made with ❤️ and lots of ☕
