chapar

chapar-restBSD-3-Clause活跃维护

用 Go 写的本地优先 API 调试客户端,支持 REST、gRPC、WebSocket 和 GraphQL,无需账号和云端,可作为 Postman 的轻量替代。

Fast, native API client for REST, gRPC, WebSocket and GraphQL. A local-first Postman alternative written in Go: no Electron, no account, no cloud.

v0.13.0发布于 2026-11-04 22:07 UTC730star +1 / 7 天44fork同步于 2026-11-10 17:56 UTC

怎么上手

由 README 提炼,执行前请确认
brew tap chapar-rest/chapar
brew install --cask chapar
硬件要求按 README 说明

README 未说明显存或 GPU 型号要求;构建需 CGO 和 C 编译器,UI 通过 GLFW 与 WebGPU 渲染,测试可用 go test -tags nogpu 无窗口运行。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 Go 写的本地优先 API 客户端,替代 Postman,支持 REST、gRPC、GraphQL 和 WebSocket

用 Go 写的本地优先 API 调试客户端,支持 REST、gRPC、WebSocket 和 GraphQL,无需账号和云端,可作为 Postman 的轻量替代。

核心能力

  • 用 Go 编写、WebGPU 渲染 UI,不依赖 Electron 或浏览器引擎
  • 内置 HTTP(S) 代理,可抓包并一键转成可编辑请求
  • 支持 REST、gRPC、GraphQL、WebSocket 四种协议调试
  • 环境变量标记为 secret 时用系统钥匙串加密,工作区可入 git
  • 测试用例可导出,用 chapar-cli 在 CI 中无界面运行

容易踩的坑

App Store 沙箱版与下载版数据目录不同,需手动复制或软链接 ~/.config/chapar;从源码构建需先装 Yoga CLI 和平台图形库依赖;更新依赖要用 make vendor 而非 go mod vendor,否则会漏掉 tree-sitter 的 C 源码。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.13.0
  1. v0.13.0最新正式版2026-11-04 · 2026-11-04 22:07 UTC

    Chapar v0.13.0

    A much stronger editor for bodies and scripts, and gRPC messages bigger than 4 MB.

    New

    gRPC message size

    Responses over 4 MB used to fail with ResourceExhausted, with no way around it. A gRPC request's Settings tab now has Max response size (MB) and Max request size (MB). Zero keeps gRPC's defaults: 4 MB for responses, no limit for requests. The limits apply to server reflection as well.

    Editor

    Body, script and response editors pick up a set of code-editor features:

    • Multiple cursors: ⌥-click adds a caret, ⌘D adds the next occurrence of the selection, ⌘⇧L selects every occurrence, ⌘⌥↑/↓ add a caret above or below, and ⌥⇧-drag selects a column. Typing, deleting, cut, copy and paste act on every cursor; Escape drops the extras.
    • Code folding: fold blocks by brackets or indentation from chevrons in the gutter, ⌥⌘[ / ⌥⌘] at the caret, or ⌘K ⌘0 / ⌘K ⌘J for everything. A folded block shows as { … }.
    • Find and replace: a redesigned find bar with match case, whole word, regex (with $1 groups), preserve case, find in selection and an "N of M" counter. Its fields are real text fields, so select all, copy, paste and undo work in them. Replace All is one undo step.
    • Line commands: duplicate (⇧⌥↑/↓), move (⌥↑/↓) and delete (⌘⇧K) lines, and toggle a line comment (⌘/).
    • Moving around: by word (⌥←/→), to line start and end, with Home switching between the first non-blank and column 0, and to the start and end of the file. ⇧-click extends the selection.
    • Undo brings back every cursor an edit had.
    • On Windows and Linux, the same shortcuts use Ctrl in place of ⌘ (word moves use Ctrl+←/→).

    Syntax colors

    Go, Python, Rust, JavaScript and TypeScript scripts color functions, methods, properties, parameters, constants and builtins apart. Protocol Buffers, Java, TOML, C, C++, C#, Lua, Ruby, PHP, Zig and Makefiles are now highlighted too.

  2. v0.12.02026-10-29 · 2026-10-29 21:45 UTC
    查看更新说明

    Chapar v0.12.0

    Git built in, workspaces that stay clean in git, in-app updates, and a waterfall timeline.

    New

    Git

    A workspace kept in a Git repository gets a Git page. Chapar uses the git on your computer; if it isn't installed, the page says so and links to the download.

    • Changes lists added, changed, renamed and deleted requests, collections, environments and proto files by name, not just by file. Pick what goes in the next commit, write a message and Commit, or Discard a change to put it back the way the last commit has it.
    • History shows the workspace's commits. Revert makes a new commit that undoes one.
    • Fetch, Pull and Push, Connect a remote or change it. For HTTPS remotes, sign in with a user name and an access token; Chapar saves the token in your system's secret store and uses it for every repository on that server.
    • Branches: create a branch, switch to one, or merge another branch in. When both sides changed the same item, Chapar shows the conflict field by field so you pick a version for each, then Finish merge (or Abort).
    • Clone on the Workspaces page clones a space from a Git repository.

    Workspaces that stay clean in git

    • Secrets stay on your machine. A secret's value now lives encrypted in the workspace's local state (.state/secrets, ignored by git); the environment file names the secret and leaves its value empty. Older files with inline ciphertext still load and move out on the next save.
    • After a clone, a secret with no value on this machine is marked unset: it isn't substituted into requests, the environment editor names it in a banner, and chapar test leaves it out with a warning.
    • No changes nobody made. Saving an environment no longer re-encrypts every secret or gives every value a new ID, and a collection's file no longer embeds copies of its requests, so saving an unchanged item leaves its file byte for byte as it was.

    Updates

    Once at startup Chapar checks for a newer release. When there is one, a notice in the bottom-right corner offers Install latest and See what's new.

    • macOS: downloads the DMG, checks the app's signature, Gatekeeper's verdict and that the same team signed it, swaps the app and offers a restart.
    • Windows: puts the new exe in place of the running one.
    • Homebrew: runs brew upgrade --cask chapar. Linux, or a copy that can't replace itself, gets a Download button.
    • Every release file is signed, and Chapar installs nothing without a valid signature.
    • Turn the check off in Settings › General › Check for updates.

    Timeline as a waterfall

    The Timeline tab lists each step in a table with a bar on one shared scale: when it ran in the request and how long it took. Bars are colored by kind (scripts, DNS, connect, TLS, sending, waiting, download) and turn red for a failed step. Durations under 10 ms show decimals instead of rounding to zero.

    Look and feel

    • Settings › Appearance adds density (tighter or roomier controls) and overlay scrollbars (thin, shown only while scrolling). Both apply live.
    • Each request bar is one joined control: method, URL and Send for HTTP; address, method and Invoke for gRPC; URL and Send or Connect for GraphQL and WebSocket.
    • HTTP methods have their own colors in the tree and the method picker, readable in every theme. The method menu fits its longest option, so CONNECT and OPTIONS show in full.
    • Wrapped lines in body, script and response editors hang one tab stop past their indent, so wrapped JSON keeps its shape. The line-number gutter is only as wide as the line numbers need.
    • Dialogs fit their content, and focus rings show only when you use the keyboard.

    Fixes

    • The proxy setup guide shows the certificate's path as ~/… and writes it as "$HOME/…" in commands, instead of spelling out your home folder.

    Notes

    • In-app updates start with the release after this one: v0.11.0 and earlier c
  3. v0.11.02026-10-18 · 2026-10-18 20:25 UTC
    查看更新说明

    Chapar v0.11.0

    A traffic capture proxy, and a fix for requests that showed Inherit auth while sending none.

    New

    Proxy

    A new Proxy page in the sidebar runs an HTTP(S) proxy, so you can see the requests an app, browser or phone makes and turn them into Chapar requests. It only runs after you click Start, and stops when Chapar quits. Chapar never changes your system proxy settings.

    • Captured requests are listed in a table with method, status, host, path, type, size, time and the app that sent them. Filter by app or domain in the sidebar, by protocol (HTTP, HTTPS, WS) and content type (JSON, XML, HTML, CSS, JS, images, media, fonts, forms) or errors, and search by URL, method, status or app.
    • Request and response sit side by side with Headers, Query, Body and Raw tabs. JSON is pretty-printed and highlighted.
    • Open in Chapar saves a captured request as a standalone request and opens it in a tab. Copy as cURL copies it as a curl command that pastes safely in a shell. Both are in the request's … menu and the command palette.
    • Export HAR saves the requests shown (after filters) as a HAR 1.2 file.
    • Pin apps and domains, don't decrypt domains that pin their certificates, Pause recording and Clear.
    • On macOS, apps on this computer are named by their process (e.g. Google Chrome); phones and other devices by their address.

    Certificate setup

    To show HTTPS, Chapar makes its own certificate authority on your computer. The Setup guide checks each step and says how to fix what isn't ready:

    • Trust it on this computer in one click on macOS (it asks for your password); Windows and Linux show the command to run.
    • Point apps at the proxy: steps for your system's proxy setting, plus a shell snippet that makes curl, Node and Python use the proxy and trust the certificate.
    • Phones and other devices: turn on Allow devices on local network, set the device's Wi-Fi proxy to the address Chapar shows, then open http://chapar.mitm on the device. That page offers the certificate with install steps for iOS, Android, macOS, Windows, Linux and Firefox.

    Settings › Proxy

    Port (default 9090), local network access (off by default), how many requests to keep (5000), a memory limit for captured bodies (256 MB), the largest body to capture (10 MB), and domains not to decrypt.

    Fixes

    • New requests showed Inherit auth while sending none. HTTP and GraphQL requests, including pasted curl commands, were saved with an auth type the Auth selector didn't recognize, so it showed Inherit. They now show None, and requests already saved this way show None too. What they send hasn't changed.

    Notes

    • Allow devices on local network lets anyone on your network send traffic through the proxy while it runs. Leave it off when you don't need it.
    • HTTPS to a bare IP address can't be decrypted, and WebSocket messages through the proxy aren't shown yet.
    • On Windows and Linux, trusting the certificate is a command you run, and apps are named from their User-Agent.
  4. v0.10.02026-10-14 · 2026-10-14 21:36 UTC
    查看更新说明

    Chapar v0.10.0

    WebSocket requests, and a fix for query params added in the Params table.

    New

    WebSocket requests

    A new WebSocket request type: Connect, send messages, watch everything that arrives, Disconnect.

    • Messages can be text, JSON or base64 binary. Save them with the request and send them again from the Saved tab.
    • Message log, newest first, with a filter, Clear, and a detail pane (indented JSON, hex dump for binary). Pings, pongs, open and close (with code and reason) are shown too.
    • Handshake headers, cookies and timeline have their own response tabs.
    • Settings: subprotocols, connect timeout, ping interval and permessage-deflate. Headers and auth work like HTTP requests, including the collection's, and use the same TLS setting, cookie jar and User-Agent.
    • Variables are filled when connecting, and in each message when it is sent.
    • Pre-request scripts run before every connect. A Python script sees the handshake as a GET with the draft message as its body.
    • ⌘↵ / Ctrl+↵ connects, or sends once connected. Closing the tab closes the connection.

    Try it against wss://mocks.chapar.rest/ws/echo.

    Fixes

    • Query params from the Params table are sent. Editing a key or value, toggling or deleting a row in Params → Query now updates the URL, so the params are sent and the Code dialog shows them. Before, only params typed into the URL were sent. (#183)
    • Long hints wrap to their pane's width instead of running past its edge in a narrow pane (settings, test cases, gRPC, environments, cookies and timeline tabs).
    • A test case card repaints when it switches to its compact layout.

    Notes

    • Post-request actions don't apply to a WebSocket connection and are not shown for it.
    • A request saved before this fix with params in the table but not in the URL is corrected the next time any of its query rows is edited.
  5. v0.9.12026-10-02 · 2026-10-02 21:02 UTC
    查看更新说明

    Chapar v0.9.1

    A fix for the response Cookies tab.

    Fixes

    • Cookie values in a narrow pane. With the request and response side by side, the response's Cookies tab lost its Value and Flags columns, and the Value header ran into Domain. Tables now keep their flexible columns readable by narrowing the other text columns, and column headers no longer spill into the next column. (Yoga v0.25.1)

    Docs

    • New Testing section: test cases in the app, assertions and captures, and chapar-cli in CI.
    • The README and the docs have new screenshots of the current UI.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Chapar - Native API Testing Tool

    Chapar is a fast, native API client for REST, gRPC, GraphQL and WebSocket, with a built-in proxy for inspecting the traffic of other apps. It is written in Go and draws its UI with Yoga, a GPU-rendered (WebGPU) UI toolkit, so it starts quickly, stays light, and runs the same on macOS, Linux and Windows without a browser engine. Your requests, environments and cookies are plain files on your machine: no account, no cloud sync, nothing sent anywhere you did not ask for.

    MQTT is next on the list.

    What Chapar means?

    Chapar was the institution of the royal mounted couriers in ancient Persia. The messengers, called Chapar, alternated in stations a day's ride apart along the Royal Road. The riders were exclusively in the service of the Great King and the network allowed for messages to be transported from Susa to Sardis (2699 km) in nine days; the journey took ninety days on foot.

    Herodus described the Chapar as follows:

    There is nothing in the world that travels faster than these Persian couriers. Neither snow, nor rain, nor heat, nor darkness of night prevents these couriers from completing their designated stages with utmost speed.

    Herodotus, about 440 BC

    Screenshots

    The screenshots use the Tokyo Night theme and the free Chapar mock server (mocks.chapar.rest), which you can use to try every feature below.

    Features

    Protocols

    • REST / HTTP: every method, query and path params, JSON, XML, text, form-data, URL-encoded and binary bodies, with syntax highlighting and formatting.
    • gRPC: server reflection or proto files, unary and server-streaming methods, metadata and trailers, TLS and client certificates, and a sample message for any method.
    • GraphQL: queries and variables, with the response data and errors split out.
    • WebSocket: connect, send text, JSON or binary messages and save them to resend, and watch everything that arrives in a filterable log. Subprotocols, pings, compression, headers and auth like HTTP requests.

    Proxy

    • Capture traffic from apps, browsers and phones through a built-in HTTP(S) proxy, and see each request and response side by side.
    • Filter by app or domain, by protocol and content type, or search; pin what you care about and skip domains you don't want decrypted.
    • Open in Chapar turns a captured request into a request you can edit and send. Copy as cURL and Export HAR take traffic elsewhere.
    • Easy certificate setup: Chapar makes its own certificate authority, trusts it in one click on macOS, and checks every step. Phones get the certificate and instructions from http://chapar.mitm.
    • Chapar never changes your system's proxy settings, and the proxy only runs while you have it started.

    Workflow

    • Workspaces keep separate collections, requests and environments; switch between them from the title bar.
    • Collections share headers, auth and notes with every request inside them.
    • Environments hold variables you use as {{name}} anywhere in a request. Values you mark secret are encrypted with a key kept in the OS keychain, and stored on your machine only: the environment file names a secret but leaves its value out, so a workspace can be shared (in git, say) without its secrets.
    • Cookie jar per environment: cookies from responses are stored and sent back automatically, and you can view, edit, add or clear them.
    • Auth: Basic, Bearer token and API key, set per request or inherited from the collection.
    • Pre and post-request actions: run another request first, extract values from the response body, headers or cookies into the environment, or write Python scripts with tests and logs.
    • Test cases send your requests in order, check their responses (status, headers, JSON paths, timing and more) and pass values from one step to the next, with setup, teardown and retries. Run them in the app, or in CI with chapar-cli.
    • Timeline of every request: DNS, connect, TLS, time to first byte, scripts.
    • Code generation for cURL, Python, Go, JavaScript (fetch, axios), Java and Kotlin (OkHttp), Ruby and .NET.
    • Import Postman collections, OpenAPI specs and proto files.
    • Command palette (⌘K / Ctrl+K) to open any request, collection or environment and run any command.

    Editor and app

    • Code editors with language-server completion and diagnostics (Python out of the box; JSON, XML, Go, JavaScript and more in Settings).
    • Themes, including Tokyo Night, Catppuccin, Dracula, Nord, Gruvbox, One, Solarized and GitHub.
    • Side-by-side or stacked request/response layout, a console panel and a notification history.
    • Everything is stored as YAML files, so a workspace can live in git.

    Roadmap

    • MQTT support.
    • Tunneling to servers and Kubernetes clusters as pre-request actions.

    Getting Started

    To Get started with Chapar, you can download the latest release from the releases page. There you can find the latest release for your operating system.

    Install on macOS

    On macOS, you can install Chapar via Homebrew, download the latest release, or install from Apple's App Store.

    Homebrew (recommended)

    brew tap chapar-rest/chapar
    brew install --cask chapar
    

    To upgrade to the latest version:

    brew upgrade --cask chapar
    

    App Store

    cp -r $HOME/.config/chapar $HOME/Library/Containers/rest.chapar.app/Data/.config
    

    or make a symlink to the sandbox environment:

    ln -s $HOME/.config/chapar $HOME/Library/Containers/rest.chapar.app/Data/.config
    
    Install From AUR

    On Arch-based distros, you can install Chapar from the AUR using your favorite AUR helper:

    yay -S chapar-bin
    

    Please note that AUR package is maintained by a community contributor. (@Monirzadeh ) may not be up to date with the latest release.

    Command-line runner (chapar-cli)

    chapar-cli runs test cases without the app, for CI or any machine without a screen. It is a single static binary for Linux, macOS and Windows.

    # Linux and macOS
    curl -fsSL https://github.com/chapar-rest/chapar/releases/latest/download/install-cli.sh | sh
    
    # or with Homebrew
    brew install chapar-rest/chapar/chapar-cli
    

    On Windows, download chapar-cli-windows-*.zip from the releases page. Pin a version with sh -s -- -v v0.8.0, or pick the install directory with -b DIR.

    Run a workspace committed to your repo, or a test case exported from the app (Export, in the test case's title row):

    chapar-cli test --workspace path/to/workspace --env staging --report junit=results.xml
    chapar-cli test smoke.chapar-test.yaml --os-env API_ --var base=https://staging.example.com
    

    In GitHub Actions:

    - name: Install chapar-cli
      run: curl -fsSL https://github.com/chapar-rest/chapar/releases/latest/download/install-cli.sh | sh -s -- -b "$HOME/.local/bin"
    - name: Run API tests
      run: chapar-cli test --workspace api-tests --env ci --report junit=results.xml
      env:
        API_TOKEN: ${{ secrets.API_TOKEN }}
    

    chapar-cli test -h lists every flag. It exits with 0 when all cases pass, 1 when one does not, and 2 for bad flags or files.

    Install From Source

    To install Chapar from source, clone the repository install the dependencies, and run the application using the following commands:

    git clone https://github.com/chapar-rest/chapar.git
    cd chapar
    go build -o chapar .
    go build -o chapar-cli ./cmd/chapar-cli   # the command-line runner
    

    To build the same packages the releases ship (DMG, tar.xz, zip), install the Yoga CLI with make install_deps (the version go.mod uses); yoga.toml holds the packaging config:

    yoga package -os darwin -arch arm64 -version v0.7.0   # dist/darwin/*.dmg
    yoga package -os linux -version v0.7.0                # dist/linux/*.tar.xz
    yoga package -os windows -version v0.7.0              # dist/windows/*.zip
    

    Dependencies are vendored. Update them with make vendor, not go mod vendor: the script also copies the tree-sitter C sources that go mod vendor leaves out.

    Dependencies

    Chapar is built with Yoga, which renders through GLFW and WebGPU, so building needs CGO and a C compiler:

    • macOS: Xcode Command Line Tools (xcode-select --install).
    • Linux (Debian/Ubuntu): sudo apt install gcc libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxxf86vm-dev libgl1-mesa-dev.
    • Windows: a MinGW-w64 GCC on PATH (for example from MSYS2).

    Tests run headless with go test -tags nogpu ./..., which needs no window system.

    Contributing

    Contributions are welcome! If you have ideas, feedback, or wish to contribute, please open an issue or submit a pull request.

    Support the Project

    You can support the development of Chapar by starring the repository, sharing it with your friends, and contributing to the project. Also you can support the project by donating to the project's wallet.

    "Buy Me A Coffee"

    Supporters

    JetBrains generously granted me a year of their open-source support licenses to work on this project.