Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

License

NotificationsYou must be signed in to change notification settings

DeprecatedLuar/better-curl-saul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


Better Curl Saul is a way to simplify and organize api re-callability (if that's a word)


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'user@company.com: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

Better-Curl Demo


The nice features you've never seen before

  • Workspace-based - Each API gets its own organized folder (reusable)
  • Inline editor - theedit 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

macOSLinuxWindowsNix

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
Other Install Methods

Manual Install

  1. Download binary for your OS fromreleases
  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.gitcd better-curl-saul./other/install-local.sh# Local development build

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

saul tempset 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
Quick Start
# Create a test workspacesaul demoset url https://jsonplaceholder.typicode.com/posts/1saul demoset method GETsaul demo call# Try with variablessaul apiset url https://httpbin.org/postsaul apiset method POSTsaul apiset body name={@your_name} message="{?message}" --call# Change workspace on the fly:saul myapiset url https://api.example.comsaulset method POSTsaulset header Authorization="Bearer {@token}"saulset body user.name={?username} user.email=john@test.comsaul my_other_api call# Execute some other random request# View your configurationsaul get body --rawsaul gethistory# View response history

[!NOTE]Variable types:

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

For nesting: use dot notation likeobj.field=value


🗺️ Roadmap
  • 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.


About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp