DH

danmartuszewski/hop

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

64 stars 5 forks 质量 80 趋势 34MIT

快速、优雅的SSH连接管理器,配备TUI仪表盘和MCP服务器

概览

别再打长长的SSH命令了。直接跳出生产点就能进去了。 使用Claude代码、Codex、光标或其他编码代理?把下面的模块粘贴到你的代理中,它会为你的机器选择正确的安装路径,注册Hop的MCP服务器,并验证安装。 - - 输入跳跃生产以连接 app-server-prod-03 - - 用键盘或鼠标浏览、添加、编辑、删除连接 - - 已经有服务器在 ~/.ssh/config 里吗?用一个命令导入 - - 将过滤连接导出为 YAML 用于共享或备份 - - 同时在多台服务器间运行命令 - - 按项目、环境或自定义标签组织 - - 支持堡垒服务器的代理跳跃 - - 直接插入连接的预定义工作目录 - - 让 AI 助手管理你的服务器 - 搜索连接、执行命令、检查项目间状态 - - 使用 mosh 代替 SSH 进行漫游和不稳定连接 - - 单一二进制,适用于任何位置 直接从Raycast启动连接。

概述(AI 翻译)

跳

别再打长长的SSH命令了。直接跳出生产点就能进去了。

为什么要跳?

安装

Homebrew(macOS/Linux)

走吧

来自源头

用AI代理安装

使用Claude代码、Codex、光标或其他编码代理?把下面的模块粘贴到你的代理中,它会为你的机器选择正确的安装路径,注册Hop的MCP服务器,并验证安装。

特色

  • 模糊匹配- 类型 hop prod 以连接 app-server-prod-03
  • TUI 仪表盘 - 用键盘或鼠标浏览、添加、编辑、删除连接
  • SSH 配置导入 - 服务器已经在 ~/.ssh/config 里了吗?用一个命令导入它们
  • 导出 - 将过滤连接导出给 YAML,用于共享或备份
  • 多执行 - 同时在多个服务器上执行命令
  • 组与标签 - 按项目、环境或自定义标签组织
  • 跳转主机 - 对堡垒服务器的代理跳跃支持
  • Landing 目录 - 直接插入连接上的预定义工作目录
  • MCP 服务器 - 让 AI 助手管理你的服务器 — 搜索连接、执行命令、检查项目间状态

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

hop

Stop typing long SSH commands. Just hop prod and you’re in.

Why hop?

# Before: remembering and typing this every time
ssh -i ~/.ssh/work_key [email protected] -p 2222

# After
hop prod
hop 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 everything

Install

Homebrew (macOS/Linux)

brew install danmartuszewski/tap/hop

Go

go install github.com/danmartuszewski/hop/cmd/hop@latest

From source

git clone https://github.com/danmartuszewski/hop.git && cd hop && make build
./bin/hop

Install 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.26+ 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 prod to connect to app-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
在 GitHub 查看完整 README

安装

docker run -it --rm hop
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "hop": { "command": "hop", "args": ["mcp"] } } }