Show HN: Ghostman – 一个快速、键盘驱动的 TUI API 客户端和 webhook 检查器
Show HN: Ghostman – A fast, keyboard-driven TUI API client and webhook inspector

原始链接: https://github.com/4yk5/Ghostman

Ghostman 是一个快速、基于终端、本地优先的 API 客户端和 webhook 检查工具。与笨重的云依赖客户端不同,它启动迅速,将集合存储为 .ghostman/collections.yaml 中的 YAML 以供 Git 共享,并完全本地运行。它支持带请求头和 JSON 请求体的 GET/POST/PUT/DELETE/PATCH 请求,显示延迟、状态、负载指标和格式化 JSON。内置在 9090 端口的 webhook 接收器让开发者无需外部工具即可捕获、检查和重放传入的 HTTP 回调。它提供 Vim/键盘导航、集合和深色 TUI。通过 pip 安装,运行 python main.py,并使用 Ctrl+S 发送、Ctrl+W 切换 webhook、Tab 循环焦点、Ctrl+Q 退出等快捷键。MIT 许可。

一篇 Show HN 帖子介绍了 Ghostman,一款快速、键盘驱动的 TUI API 客户端和 webhook 检查器。讨论主要围绕项目的成熟度和来源:一些评论者批评其只有单个提交并怀疑是最近 vibe-coded 的,而另一些人则认为可能是压缩了提交历史或在发布前进行过本地开发。用户将其与 Posting、Hurl 和 curl 等现有工具比较,并请求支持 OpenAPI/Swagger 导入。还有关于 TUI 与 Electron/UI 工具、LLM 辅助项目可维护性,以及 Postman、Insomnia 和 Bruno 变化后对新 FOSS API 客户端需求的争论。作者表示 OpenAPI 导入计划在 v0.2.0 中实现。总体反应不一,不过有些人欣赏又一个轻量、本地优先的选项。
相关文章

原文
   ____ _               _                          
  / ___| |__   ___  ___| |_ _ __ ___   __ _ _ __   
 | |  _| '_ \ / _ \/ __| __| '_ ` _ \ / _` | '_ \  
 | |_| | | | | (_) \__ \ |_| | | | | | (_| | | | | 
  \____|_| |_|\___/|___/\__|_| |_| |_|\__,_|_| |_| 
                                                   

A fast, keyboard-driven API client and webhook inspector right in your terminal.
No cloud accounts. No 1GB Electron bloat. 100% Local-first.

License: MIT Python: 3.10+ UI: Textual

Ghostman Main Studio


Modern API clients like Postman and Insomnia started as lightweight developer utilities, but evolved into heavy enterprise platforms:

  • ❌ Force cloud logins, team workspaces, and telemetry
  • ❌ Consume 800MB - 1.5GB of RAM just idling in the background
  • ❌ Sluggish startup times
  • ❌ Require external tunnels (ngrok, webhook.site) just to inspect a local webhook callback

Ghostman is built from scratch for developers who want raw speed, terminal workflows, and complete local privacy:

  • ⚡ Instant Startup: Launches in under 200ms directly in your terminal.
  • 🔒 100% Local-First: All collections and requests live as plain YAML in .ghostman/collections.yaml. Check them into Git alongside your codebase.
  • 🛰️ Built-in Webhook Receiver: Hit Ctrl + W to spin up an ephemeral server on http://127.0.0.1:9090 to catch, inspect, and replay webhooks live on screen.
  • ⌨️ Vim & Keyboard-First: Full keyboard navigation — switch collections, compose JSON bodies, and fire requests without touching the mouse.

1. High-Speed Response & Telemetry

Instant latency tracking in milliseconds, HTTP status badges, payload size metrics, and auto-formatted JSON syntax highlighting: Ghostman Response

Catch incoming HTTP callbacks from Stripe, GitHub, Shopify, or local microservices in real-time: Ghostman Webhooks


  • Full HTTP Method Suite: Seamlessly compose GET, POST, PUT, DELETE, and PATCH requests with custom headers and raw JSON payloads.
  • Performance Telemetry: Measure DNS + TTFB latency in real-time to monitor API endpoint bottlenecks.
  • Embedded Webhook Server: No need to configure third-party reverse proxies during development; catch incoming webhooks locally.
  • Pretty JSON Formatting: Automatically indents, formats, and colorizes JSON payloads with Pygments and Rich.
  • Collection Explorer: Organize API endpoints into collections, persistent across sessions.
  • Cyberpunk Dark TUI: Optimized contrast for developer eyes with high-DPI terminal support.

# 1. Clone the repository
git clone https://github.com/4yk5/ghostman.git
cd ghostman

# 2. Install dependencies
pip install -r requirements.txt

# 3. Launch Ghostman
python main.py

Windows tip: You can also simply double-click run.bat in the project root!


⌨️ Keybindings & Controls

Shortcut Description
Ctrl + S Send HTTP Request (Executes call and switches to Response view)
Ctrl + W Toggle Webhook Server (Starts / Stops receiver on port 9090)
Tab / Shift+Tab Cycle focus between inputs, method selector, and tabs
Enter Select collection item from sidebar
Ctrl + Q Quit Ghostman

🛠️ Testing Webhooks Locally

  1. Press Ctrl + W inside Ghostman to start the receiver on port 9090.
  2. Point your webhook provider (or fire a test curl from another terminal) to:
    curl -X POST http://127.0.0.1:9090/api/webhooks/stripe \
         -H "Content-Type: application/json" \
         -d '{"event": "payment_intent.succeeded", "amount": 4900}'
  3. Ghostman immediately captures the incoming request, displays the headers, and parses the payload live in the Live Webhooks tab.

📁 Git-Friendly Collections

Ghostman stores all your requests inside .ghostman/collections.yaml in clean, human-readable YAML:

- name: "Authentication API"
  requests:
    - name: "Login User"
      method: "POST"
      url: "https://api.example.com/v1/auth/login"
      headers:
        Content-Type: "application/json"
      body: '{\n  "email": "[email protected]",\n  "password": "secretpassword"\n}'

Commit .ghostman/ directly to your repository so your entire team can share the same API collections without needing cloud sync accounts.



This project is licensed under the MIT License - see the LICENSE file for details.
Copyright © 2026 4yk5. All rights reserved.

联系我们 contact @ memedata.com