When HTTP gets complicated...
In a nutshell, this is disgusting:
curl -X POST https://api.github.com/repos/owner/repo/issues \ -H " Authorization: Bearer ghp_token123 " \ -H " Content-Type: application/json " \ -H " Accept: application/vnd.github.v3+json " \ -d ' { "title": "Bug Report", "body": "Something is broken", "labels": ["bug", "priority-high"], "assignees": ["developer1", "developer2"] } '
─── Try this instead ───
The cool stuff you've never seen before
Workspace-based - Each API gets its own organized folder
- Each API gets its own organized folder Smart variables - {@token} persists, {?name} prompts every time
- persists, prompts every time Response filtering - Show only the fields you care about
- Show only the fields you care about Git-friendly - TOML files version control beautifully
- TOML files version control beautifully Unix composable - Script it, pipe it, shell it
─── Installation ───
Supports: Linux, macOS, Windows (I hope)
curl -sSL https://raw.githubusercontent.com/DeprecatedLuar/better-curl-saul/main/install.sh | bash
Other Install Methods
Manual Install (boring) Download binary for your OS from releases Make executable: chmod +x saul-* 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 (hardcore) saul set url https://raw.githubusercontent.com/DeprecatedLuar/better-curl-saul/main/install.sh && saul call --raw | bash # (maybe works, who knows) [!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, just have bash 👍
Tutorials
Quick Start # 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= " Hello from Saul " saul api call # Oh... yeah, for nesting just use dot notation like obj.field=idk
Core Commands
Alright so you can: set , get , edit , rm
your
body , header , query , request , history or maybe even response
also
url , method , timeout , history
Example
# Configure your API workspace (or preset, same thing) saul [workspace] set url https://api.example.com saul set method POST saul set header Authorization= " Bearer {@token} " saul set body user.name={ ? username} [email protected] # Execute the request saul call # Check your configuration, note that preset/workspace name keeps # stored in memory after first mention on syntax saul [anoter_workspace] check url saul check body # View response history saul check history
Note There are 2 variable types soft variables {?} prompt you at EVERY call
hard variables {@} require manual update by running the flag -v or running saul set variable varname value
🗺️ Roadmap
Start watchin Better Call Saul
Start watchin Better Call Saul Think of a bad joke
Think of a bad joke Workspace-based configuration
Workspace-based configuration Smart variable system ( {@} / {?} )
Smart variable system ( / ) In line terminal field editing
In line terminal field editing Response filtering
Response filtering Response history
Response history Terminal session memory
Terminal session memory Bulk operations
Bulk operations Fix history response parsing and filtering
Fix history response parsing and filtering GET specific response stuff from history (aka Headers/Body...)
GET specific response stuff from history (aka Headers/Body...) Flags, we've got none basically
Flags, we've got none basically Stateless command support
Stateless command support Support pasting raw JSON template
Support pasting raw JSON template User config system using the super cool github.com/DeprecatedLuar/toml-vars-letsgooo library
User config system using the super cool github.com/DeprecatedLuar/toml-vars-letsgooo library Add the eastereggs
Add the eastereggs Polish code
Polish code Actual Documentation
Actual Documentation Touch Grass (not a priority)
Touch Grass (not a priority) Think of more features
Think of more features Think of even more features
Little Note
Beta software - Core features work, documentation in progress.
Bug or feedback? I will be very, very, very happy if you let me know your thoughts.