Why hop?
# Before: remembering and typing this every time
ssh -i ~/.ssh/work_key deploy@app-server-prod-03.us-east-1.example.com -p 2222
# After
hop prodhop prod # fuzzy match any server
hop exec production "uptime" # run command on all prod servers
hop import # import your existing ~/.ssh/config
hop # launch the TUI, manage everythingInstall
Homebrew (macOS/Linux)
brew install danmartuszewski/tap/hopGo
go install github.com/danmartuszewski/hop/cmd/hop@latestFrom source
git clone https://github.com/danmartuszewski/hop.git && cd hop && make build
./bin/hopInstall with an AI agent
Using Claude Code, Codex, Cursor, or another coding agent? Paste the block below into your agent and it will pick the right install path for your machine, register hop's MCP server, and verify the install.
Install hop on this machine and register its MCP server. Do the steps in order;
stop and report on the first failure.
1. Pick ONE install method, in this priority:
a. Homebrew (macOS or Linux):
brew install danmartuszewski/tap/hop
b. Go 1.22+ available:
go install github.com/danmartuszewski/hop/cmd/hop@latest
c. From source (no brew, no Go on PATH):
git clone https://github.com/danmartuszewski/hop.git && cd hop && make install
2. Verify the binary is on PATH:
hop version
3. Register the MCP server with whichever agent the user is running. Skip
clients the user does not use:
- Claude Code: claude mcp add hop -- hop mcp
- Codex CLI: codex mcp add hop -- hop mcp
- Claude Desktop / Cursor / Windsurf — add to the client's MCP config:
{ "hop": { "command": "hop", "args": ["mcp"] } }
4. (Optional) Seed the config from the user's existing SSH config. Preview
first; --yes is required for a non-interactive run:
hop import --dry-run
hop import --yes
5. Confirm hop's MCP tools are reachable from the agent (e.g. list_connections).
Constraints:
- Do NOT run bare `hop` — it launches an interactive TUI and will hang a
non-interactive session. Use subcommands (`hop version`, `hop list`, …).
- Do NOT modify ~/.ssh/config. hop reads it via `hop import` only.
- Do NOT commit secrets or identity files.
After step 3, restart the agent so it picks up the new MCP server.Features
- Fuzzy matching - Type
hop prodto connect toapp-server-prod-03 - TUI dashboard - Browse, add, edit, delete connections with keyboard or mouse
- SSH config import - Already have servers in
~/.ssh/config? Import them in one command - Export - Export filtered connections to YAML for sharing or backup
- Multi-exec - Run commands across multiple servers at once
- Groups & tags - Organize by project, environment, or custom tags
- Jump hosts - ProxyJump support for bastion servers
- Landing directory - Drop straight into a predefined working directory on connect
- MCP server - Let AI assistants manage your servers — search connections, run commands, check status across projects
- Mosh support - Use mosh instead of SSH for roaming and unreliable connections
- Zero dependencies - Single binary, works anywhere
See all features in action: Demo recordings
Raycast Extension
Launch connections directly from Raycast. Fuzzy search, tags, environments - all at your fingertips.
<p align="center"> <img src="assets/hop1.png" width="32%"> <img src="assets/hop2.png" width="32%"> <img src="assets/hop3.png" width="32%"> </p>Configuration
Config file location: ~/.config/hop/config.yaml
version: 1
defaults:
user: admin
port: 22
# use_mosh: true # Uncomment to use mosh for all connections
connections:
- id: prod-web
host: web.example.com
user: deploy
identity_file: ~/.ssh/work_key # Private key for this connection
remote_dir: /var/www/myapp # Land in this directory on connect
project: myapp
env: production
tags: [web, prod]
- id: prod-db
host: db.example.com
user: dbadmin
port: 5432
project: myapp
env: production
tags: [database, prod]
- id: staging
host: staging.example.com
user: deploy
project: myapp
env: staging
- id: private-server
host: 10.0.1.50
user: admin
proxy_jump: bastion # Connect via jump host
forward_agent: true # Forward SSH agent
- id: remote-dev
host: dev.example.com
user: dan
use_mosh: true # Use mosh instead of SSH
groups:
production: [prod-web, prod-db]
web-servers: [prod-web, staging]Security note:
forward_agent: trueexposes your SSH keys to anyone with root access on the remote server. Only enable this for servers you fully trust. Consider usingproxy_jumpinstead when you just need to reach internal hosts through a bastion.
Mosh Support
Mosh (mobile shell) is useful for connections over unreliable networks — it handles roaming, intermittent connectivity, and high latency gracefully.
Global default — enable mosh for all connections:
defaults:
use_mosh: true
connections:
- id: remote-dev
host: dev.example.com
- id: legacy-server
host: old.example.com
use_mosh: false # Override: use SSH for this onePer-connection — enable mosh for specific connections:
connections:
- id: remote-dev
host: dev.example.com
user: dan
use_mosh: trueOne-off — use the --mosh flag without changing config:
hop connect myserver --mosh
hop myserver --moshPer-connection use_mosh: false overrides the global default. SSH options (port, identity file, proxy jump, agent forwarding) are automatically passed to mosh via its --ssh flag. Mosh requires both the local mosh-client and mosh-server on the remote host.
Note:
hop execalways uses SSH regardless ofuse_mosh, since mosh is designed for interactive sessions.
Landing Directory
Set remote_dir to have a connection drop you straight into a specific directory instead of $HOME:
connections:
- id: prod-web
host: web.example.com
user: deploy
remote_dir: /var/www/myapp # cd here on connect
- id: my-dev
host: dev.example.com
remote_dir: ~/projects/api # ~ is expanded on the remote hostOn connect, hop runs cd into the directory and then hands you a normal interactive login shell, so the session behaves exactly like a regular SSH login — just somewhere else. A few details worth knowing:
- Absolute paths and
~both work.~and~userare expanded by the remote shell. - Forgiving by design. If the directory is missing or inaccessible, you still land in a shell (in
$HOME) rather than getting bounced off the host. - Works in new tabs too.
hop opencarries the landing directory into every terminal it launches.
Note:
remote_diris ignored when you pass an explicit command (e.g.hop connect web -- uptimeorhop exec), since those aren't interactive sessions.
TUI Dashboard
Launch with hop or hop dashboard.
When you connect to a server from the dashboard (by pressing Enter), the SSH session starts, and the dashboard automatically returns after the session ends. This lets you quickly hop between servers without restarting the TUI each time.
For one-shot connections that exit to your terminal, use:
hop <query> # fuzzy match and connect
hop connect <id> # connect by exact IDKeyboard Shortcuts
| Key | Action |
|---|---|
↑/k | Move up |
↓/j | Move down |
PgUp/PgDn | Move by page |
g | Go to top |
G | Go to bottom |
/ | Filter connections (supports multi-keyword AND search) |
t | Filter by tags |
r | Toggle sort by recent |
Enter | Connect to selected |
a | Add new connection |
i | Import from SSH config |
p | Paste SSH string (quick add) |
e | Edit selected |
c | Duplicate selected (opens a prefilled copy) |
d | Delete selected |
x | Export connections to YAML |
y | Copy SSH command |
T | Open theme picker |
? | Show help |
q | Quit |
Filtering Connections
Press / to filter connections by typing keywords. The filter supports multi-keyword AND logic - separate keywords with spaces to find connections matching all terms.
Examples:
prod- matches connections containing "prod"prod web- matches connections containing both "production" AND "web"kaf staging- matches connections with both "kafka" AND "staging"
The filter searches across connection IDs, hosts, projects, environments, and tags.
Quick Add with Paste
Press p and paste any of these formats:
user@host.com
user@host.com:2222
ssh user@host.com -p 2222
ssh://user@host:portThe connection form opens with fields pre-filled.
Duplicating a Connection
Press c on any connection to create a copy. The add form opens with every
field pre-filled from the original — including options that aren't shown in
the form, like proxy jump and mosh — and a collision-free ID suggestion (e.g.
web-prod → web-prod-copy). Adjust whatever you need and save. If you pick an
ID that already exists, the form stays open with your edits intact so you can
fix it.
Importing from SSH Config
Import existing connections from your ~/.ssh/config file:
From the dashboard: Press i to open the import modal, select which connections to import, and press Enter.
From the CLI:
hop import # Import from ~/.ssh/config
hop import --dry-run # Preview what would be imported
hop import --file ~/.ssh/config.d/work # Import from custom pathWhat gets imported:
- Host alias becomes the connection ID
- HostName, User, Port, IdentityFile
- ProxyJump for jump host connections
- ForwardAgent setting
What gets skipped:
- Wildcard patterns (
Host *,Host *.example.com) - Entries without a HostName (alias is used as hostname)
Conflict handling: If a connection ID already exists, the imported connection is renamed with -imported suffix (e.g., myserver → myserver-imported).
Exporting Connections
Export a subset of connections to a YAML file for sharing, backup, or transferring to another machine.
From the dashboard: Press x to open the export modal. Only currently filtered connections are shown — apply text or tag filters first to narrow the selection. Toggle items with Space, then press Enter to save.
From the CLI:
hop export --all # Export all to stdout
hop export --all -o backup.yaml # Export all to a file
hop export --project myapp -o myapp.yaml # Export by project
hop export --tag database # Export by tag
hop export --env production # Export by environment
hop export --id web-1,web-2 # Export specific connectionsAt least one filter flag or --all is required. Filters combine with AND logic.
Theming
The dashboard ships with sixteen color presets — each popular theme has both a dark and a light variant, listed separately so you can pick whichever you want regardless of your terminal background. Press T to browse them with live preview: ↑/↓ to navigate, Enter to save the choice into your config, Esc to revert.
| Family | Dark | Light |
|---|---|---|
| Built-in hop | default-dark | `defa |
…