Gurl is curl for the AI era. It gives AI agents a secure, observable, and easily configurable tool for making HTTP requests — with built-in credential isolation, request logging, auth handling, and scripting.
curl for the AI era.#
AI agents need to call APIs. Gurl makes that safe and auditable — credentials never touch agent context, every request is logged, and collections are trivially configurable. Works just as well for humans at the terminal.
Features#
21 CLI Commands#
Every command you need for API workflows: save, run, list, edit, delete, duplicate, export, import, and more.
8 Auth Handlers#
Programmatic credential injection for every auth scheme:
| Auth Type | Use Case |
|---|
| Basic | Username/password |
| Bearer | Token-based |
| Digest | Challenge-response |
| API Key | Header or query |
| OAuth 1.0 | Signature-based |
| OAuth 2.0 | Token flow |
| AWS SigV4 | AWS API Gateway |
| NTLM | Windows integrated |
5 Protocol Clients#
Support for modern API protocols:
- HTTP - Full request/response with multipart support
- GraphQL - Query, mutation, subscription
- gRPC - Proto-based RPC with reflection
- WebSocket - Real-time bidirectional
- SSE - Server-sent events
Scripting Engine#
Extend requests with JavaScript using the goja runtime. Modify headers, transform responses, or chain dependent requests with full access to the request and response objects.
Collection Runner#
Run collections with data-driven testing. Feed CSV or JSON test data, assert on response status, body, and headers.
Interactive TUI#
Built with bubbletea, the Gurl interface is a first-class terminal citizen. Navigate requests, inspect responses, and manage environments without losing your terminal workflow.
Plugin System#
Extend Gurl with middleware for request/response transformation and custom output formatters. Plugins hook into the request lifecycle.
Multi-language Code Generation#
Generate idiomatic client code from saved requests:
gurl codegen "my-request" --lang python
gurl codegen "my-request" --lang javascript
gurl codegen "my-request" --lang go
gurl codegen "my-request" --lang curl
Quick Start#
brew tap bsreeram08/gurl https://github.com/bsreeram08/gurl
brew install gurl
gurl save "my-api" https://api.example.com/users -H "Authorization: Bearer $TOKEN"
gurl run "my-api"
Save any request, run it instantly, generate code, and share with your team.
Built for AI Agents#
They never touch your credentials.
Gurl is designed for AI agent workflows where security matters. Credentials never appear in logs, never leak into prompts, and never get exposed to model providers.
Security model:
- Environment secrets encrypted at rest with AES-256-GCM
- Auth handlers inject credentials programmatically
- Header redaction in all log output
- No credentials in generated code without explicit flags
See the AI integration page for how Gurl works with AI agents.
Why Gurl#
- Local-first — no account, no cloud sync, no lock-in
- Git-friendly — collections are just data, export and version them
- Scriptable — JavaScript pre/post-request hooks, chain requests, CI-ready exit codes
- Open source — inspect and extend everything
gurl import Import requests from external formats including HAR, OpenAPI, and common collection formats.
Usage gurl import [flags] Description The import command converts requests from common API formats into gurl’s format. It supports HAR files, OpenAPI specifications, and several collection formats.
Flags Flag Short Default Description --force -f false Overwrite existing requests with the same name --format none Specify format explicitly (har, openapi, insomnia, postman, bruno) --list -l false List available collections/requests before importing Aliases imp Examples Import from file gurl import --format openapi ./api.yaml Imports all endpoints from an OpenAPI spec.
...
gurl list List all saved requests, optionally filtered by pattern, collection, or tag.
Usage gurl list [flags] Description The list command displays saved requests with their names, URLs, methods, and collections. Use filters to narrow down results when you have many requests.
Flags Flag Short Default Description --pattern -p none Filter by name pattern --collection -c none Filter by collection name --tag -t none Filter by tag --json -j false Output as JSON --format -f table Output format: table or list --limit -n none Limit number of results --sort -s name Sort by: name, updated, or collection Aliases ls l Examples List all requests gurl list Displays all saved requests in a table.
...
gurl paste Copy a saved request to the clipboard as a curl command.
Usage gurl paste [name] Description The paste command copies the specified request to your clipboard as a fully-formed curl command. This is useful for sharing requests or running them directly with curl.
Flags None.
Aliases clip copy Examples Copy request as curl gurl paste "my-request" Copies “my-request” as a curl command to the clipboard.
Paste and run gurl paste "my-request" | bash Copies the request and pipes it to bash for execution.
...
gurl rename Rename a saved request to a new name.
Usage gurl rename [old-name] [new-name] Description The rename command changes the name of a saved request. All references to the old name remain valid until you update them.
Flags None.
Aliases mv ren Examples Rename a request gurl rename "old-name" "new-name" Changes the request name from “old-name” to “new-name”.
See also gurl save - Save a new request gurl delete - Remove a request gurl edit - Edit a request
gurl run Execute a previously saved request by name.
Usage gurl run [name] [flags] Description The run command executes a request that was previously saved with gurl save. You can override variables, switch environments, set timeouts, and validate responses with assertions.
Flags Flag Short Default Description --env -e none Environment to use --var -v none Variable as key=value (can be specified multiple times) --format -f auto Output format: auto, json, or table --cache -c false Use cached response --output -o none Write response to file --force false Overwrite output file if it exists --timeout 30s Request timeout (e.g., 5s, 1m, 30s) --chain -ch false Enable request chaining --assert -a none Assertion to validate response --data -d none Data file for iteration Aliases r execute Examples Basic run gurl run "users" Executes the “users” request.
...
gurl save Save a curl request with a memorable name for later use.
Usage gurl [command] [arguments] [flags] gurl save [name] [url] [flags] Description The save command stores a curl request under a given name. You can specify the URL directly, pass a full curl command with --curl, or pipe curl output from another program.
After saving, use gurl run [name] to execute the request.
Flags Flag Short Default Description --collection -c none Assign request to a collection --folder -F none Assign request to a folder --tag -t none Add a tag (can be specified multiple times) --format -f auto Output format: auto, json, or table --description none Human-readable description --curl none Full curl command to parse --request -X GET HTTP method --header -H none HTTP header (can be specified multiple times) --data -d none Request body --body none Request body (alias for --data) Aliases s Examples Basic save gurl save "users" https://api.example.com/users Saves a GET request to fetch users.
...
gurl sequence Manage sequences for chaining multiple requests together.
Usage gurl sequence [subcommand] [flags] Description Sequences allow you to define an ordered list of requests that run in sequence. The output of one request can be used as input for the next, enabling complex workflows and data-driven testing.
Subcommands set Add a request to a sequence.
gurl sequence set [sequence-name] [request-names...] Aliases: s
list List all sequences.
gurl sequence list Aliases: ls, l
Examples Create a sequence gurl sequence set "user-workflow" "login" "get-profile" "get-orders" Creates a sequence called “user-workflow” that runs login, get-profile, and get-orders in order.
...
gurl show Display the full details of a saved request.
Usage gurl show [name] [flags] Description The show command prints all stored properties of a named request: URL, method, headers, body, variables, assertions, timeout, collection, folder, and tags. It is useful for inspecting what was saved before running or editing a request.
Flags Flag Short Default Description --format -f pretty Output format: pretty, json, or curl Aliases inspect view info Examples Pretty-print a request gurl show "users" Prints the request in a human-readable format with labeled fields.
...
gurl timeline Show a global timeline of all request executions across all requests.
Usage gurl timeline [flags] Description The timeline command displays executions from all requests in chronological order. Use it to get an overview of API activity or investigate issues across multiple endpoints.
Flags Flag Short Default Description --since -s none Show entries from this time ago (e.g., 24h, 7d) --filter -f none Filter by pattern --limit -n 50 Number of entries to show --limit -l 50 Number of entries to show Aliases tl log Examples View recent timeline gurl timeline Shows the last 50 executions across all requests.
...
gurl tui Launch the interactive terminal user interface for gurl.
Usage gurl tui Description The tui command opens an interactive terminal interface where you can browse, search, edit, and execute requests. The TUI provides a visual way to work with your saved requests.
Flags None.
Aliases ui Examples Launch TUI gurl tui Opens the interactive terminal interface.
See also gurl save - Save a new request gurl run - Execute a request gurl list - List saved requests