better-curl-saul

DeprecatedLuarMIT更新放缓

用 Go 写的命令行 HTTP 客户端,把常用 API 请求保存成可复用配置,省去反复手写 curl 命令的麻烦。

Did you know you have rights? The FOSS says you do... Better Curl Saul is my homemade CLI 'http client' to make api reusability simple.

v0.3.4发布于 2025-10-09 19:09 UTC322star8fork同步于 2026-11-07 07:32 UTC

怎么上手

由 README 提炼,执行前请确认
curl -sSL https://raw.githubusercontent.com/DeprecatedLuar/better-curl-saul/main/install.sh | bash
硬件要求按 README 说明

README 未说明,仅列出 macOS、Linux、Windows、NixOS 平台支持

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

项目说明

由 README 自动翻译提炼

把 curl 请求按工作区组织成可复用预设的 CLI HTTP 客户端

用 Go 写的命令行 HTTP 客户端,把常用 API 请求保存成可复用配置,省去反复手写 curl 命令的麻烦。

核心能力

  • 每个 API 独立工作区目录,配置可提交到 git
  • 支持 {@token} 持久变量与 {?name} 每次调用时提示
  • 用 --raw 导入导出 curl 命令与原始 JSON
  • 按 body、header、status 过滤响应并保留调用历史
  • 支持 --dry-run 预览请求、$EDITOR 内联编辑字段

容易踩的坑

Windows 用户需自备 bash,作者未提供 PowerShell 支持;从源码构建需先 git clone 再运行 ./other/install-local.sh;README 标注 v1.0.0 尚未发布,当前为 v0.3.0

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

最近发版

5 个版本v0.3.4
  1. v0.3.4最新正式版2025-10-09 · 2025-10-09 19:09 UTC
  2. v0.3.02025-09-29 · 2025-09-29 20:25 UTC
    查看更新说明
  3. v0.2.12025-09-26 · 2025-09-26 11:48 UTC
    查看更新说明

    fix - enhanced auto-release │ │ workflow to include build and GitHub │ │ release creation

    Binaries

    • Linux: saul-linux-amd64, saul-linux-arm64
    • macOS: saul-darwin-amd64, saul-darwin-arm64
    • Windows: saul-windows-amd64.exe, saul-windows-arm64.exe

    Full Changelog: https://github.com/DeprecatedLuar/better-curl-saul/compare/v0.2.0...v0.2.1

  4. v0.1.72025-09-24 · 2025-09-24 22:30 UTC
    查看更新说明
  5. v0.1.62025-09-24 · 2025-09-24 13:21 UTC
    查看更新说明

用户点评

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

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

    README 原文

    未翻译

    v0.3.0 Try out the new curl import/exporting: saul myapi set --raw and saul myapi get --raw



    In a nutshell, this is... not my favorite UX:

    curl -X POST "https://company.atlassian.net/rest/api/3/issue" \
      -H "Authorization: Basic $(echo -n '[email protected]:api-token-here' | base64)" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -H "X-Atlassian-Token: no-check" \
      -d '{
        "fields": {
          "project": {"key": "PROJ"},
          "summary": "API Bug: Users can'\''t login after deployment",
          "description": "Steps:\n1. Deploy v2.1.0\n2. Try login\n3. Gets 500 error\n\nExpected: Login works\nActual: Server error",
          "issuetype": {"name": "Bug"},
          "priority": {"name": "High"},
          "assignee": {"accountId": "123456:abcd-efgh-ijkl"},
          "labels": ["api", "login", "production"],
          "customfield_10001": "2024-01-15",
          "customfield_10002": {"value": "Backend Team"}
        }
      }'
    

    Try this instead


    The nice features you've never seen before

    • Workspace-based - Each API gets its own organized folder (reusable)
    • Inline editor - the edit command for any given field also supports $EDITOR
    • Smart variables - {@token} persists,{?name} prompts every time
    • Response filtering - Show only the fields you care about
    • Git-friendly - Store the preset workspaces on git
    • Unix composable - Script it, pipe it, shell it
    • TOML converter - JSON gets reorganized into TOML for readability
    • Saul Goodman - It has Saul Goodman on it.

    Installation

    macOS Linux Windows Nix

    Universal

    curl -sSL https://raw.githubusercontent.com/DeprecatedLuar/better-curl-saul/main/install.sh | bash
    

    Homebrew

    brew install deprecatedluar/tap/better-curl-saul
    

    NixOS

    nix profile install github:DeprecatedLuar/better-curl-saul?dir=nix-saul
    

    Manual Install

    1. Download binary for your OS from releases
    2. Make executable: chmod +x saul-*
    3. Move to PATH: sudo mv saul-* /usr/local/bin/saul

    From Source (for try-harders)

    git clone https://github.com/DeprecatedLuar/better-curl-saul.git
    cd better-curl-saul
    ./other/install-local.sh  # Local development build
    

    In case you already have Saul (basically gambling at this point)

    saul temp set url https://raw.githubusercontent.com/DeprecatedLuar/better-curl-saul/main/install.sh && saul temp call --raw | bash
    

    [!NOTE] Quick install auto-detects your system and downloads binaries or builds from source as fallback. Windows users: I don't know powershell I expect you to have bash 👍


    Commands

    ActionTargetsDescriptionExample
    seturl, method, timeout, body, header, query, variablesConfigure request settings and datasaul api set url https://...
    editbody, header, queryEdit inline or open in $EDITORsaul edit body user.name / saul edit body
    rmbody, header, queryRemove specific fieldssaul rm body user.email
    call-Execute the configured requestsaul call --dry-run
    geturl, body, header, query, request, response, historyView configuration or response datasaul get body --raw

    Flags

    FlagDescriptionExample
    --rawInput/output raw format (curl/JSON)saul set --raw
    --body-onlyShow only response bodysaul get response --body-only
    --header-onlyShow only response headerssaul get response --header-only
    --status-onlyShow only response statussaul get response --status-only
    --dry-runPreview request without executingsaul call --dry-run
    --callExecute request immediately after setsaul set body user=john --call
    -vPrompt for specific variables on callsaul call -v token name email
    # Create a test workspace
    saul demo set url https://jsonplaceholder.typicode.com/posts/1
    saul demo set method GET
    saul demo call
    
    # Try with variables
    saul api set url https://httpbin.org/post
    saul api set method POST
    saul api set body name={@your_name} message="{?message}" --call
    
    # Change workspace on the fly:
    saul myapi set url https://api.example.com
    saul set method POST
    saul set header Authorization="Bearer {@token}"
    saul set body user.name={?username} [email protected]
    saul my_other_api call # Execute some other random request
    
    # View your configuration
    saul get body --raw
    saul get history # View response history
    

    [!NOTE] Variable types:

    • soft-variables {?} prompt you at EVERY call
    • hard-variables {@} require manual update via -v flag or saul set variables name value

    For nesting: use dot notation like obj.field=value


    • Start watching Better Call Saul
    • Think of a bad joke
    • Workspace-based configuration
    • Smart variable system ({@} / {?})
    • In line terminal field editing
    • Response filtering
    • Response history
    • Terminal session memory
    • Bulk operations
    • Fix history response parsing and filtering
    • Flags (--raw, --body-only, --header-only, --status-only, --dry-run, --call)
    • GET specific response stuff from history (aka Headers/Body...)
    • 'Proper' Windows support
    • curl command exportation/generation feature
    • Support pasting raw JSON template
    • Stateless command support with HttPie syntax
    • Homebrew and Scoop releases
    • User config system using github.com/DeprecatedLuar/toml-vars-letsgooo library
    • Add the eastereggs
    • Forward responses to another workspace
    • Polish code
    • Actual Documentation
    • Touch Grass (not a priority)
    • Think of more features
    • Think of even more features

    Little Note

    v1.0.0 Comming Soon - Production ready, minor QOL improvements otw.

    Bug or feedback? I will be very happy if you let me know your thoughts.