{"id":29643705,"url":"https://github.com/votline/gurl-cli","last_synced_at":"2026-02-03T05:23:55.123Z","repository":{"id":305296736,"uuid":"1022456960","full_name":"Votline/Gurl-cli","owner":"Votline","description":"CLI for curl/grpcurl with query chains via configs (.json). You no longer need to memorize complex commands.","archived":false,"fork":false,"pushed_at":"2025-07-19T08:00:47.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-19T13:17:49.103Z","etag":null,"topics":["cli","command-line-tool","curl","curl-wrapper","developer-tools","go-project","grpc","grpc-client","grpcurl","grpcurl-wrapper","http-client","json-config","open-source"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Votline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-19T05:41:47.000Z","updated_at":"2025-07-19T08:06:14.000Z","dependencies_parsed_at":"2025-07-19T13:18:00.730Z","dependency_job_id":null,"html_url":"https://github.com/Votline/Gurl-cli","commit_stats":null,"previous_names":["votline/gurl-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Votline/Gurl-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Votline%2FGurl-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Votline%2FGurl-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Votline%2FGurl-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Votline%2FGurl-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Votline","download_url":"https://codeload.github.com/Votline/Gurl-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Votline%2FGurl-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266404492,"owners_count":23923447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-tool","curl","curl-wrapper","developer-tools","go-project","grpc","grpc-client","grpcurl","grpcurl-wrapper","http-client","json-config","open-source"],"created_at":"2025-07-22T00:00:52.738Z","updated_at":"2026-02-03T05:23:55.117Z","avatar_url":"https://github.com/Votline.png","language":null,"readme":"# Gurl-cli\n\n**Gurl-cli** is a high-performance, stateful HTTP \u0026 gRPC client for the command line.\n\nUnlike standard tools (curl, postman), `gurl-cli` is designed for **request chaining**. It allows you to execute a sequence of requests where the output of one (e.g., Auth Token, Cookies) automatically feeds into the next, all defined in a single, readable file.\n\nIt runs on top of [Gurlf](https://github.com/Votline/Gurlf) — a custom zero-allocation configuration format that eliminates JSON escaping hell.\n\n---\n\n## 🚀 Key Features\n\n* **Hybrid Transport:** First-class support for both **HTTP/1.1** and **gRPC** (via Reflection or Proto files).\n* **Stateful Flows:** Automatically carries cookies between requests (like a browser jar).\n* **Dynamic Chaining:** Inject responses from previous requests into headers or bodies using macro instructions (`{RESPONSE id=...}`).\n* **Interactive Configs:** The tool writes responses **back into the configuration file**, making debugging and prototyping instant.\n* **Zero-Allocation Parsing:** Custom parser optimized for low latency and minimal GC pressure.\n\n---\n\n## ⚡ Performance\n\nBuilt for speed. The internal architecture utilizes **Ring Buffers** with spinlocks and aggressive object pooling to keep heap allocations near zero during hot paths.\n\n**Parser Benchmarks (AMD Ryzen 7 5800U):**\n\n| Operation | Time (ns/op) | Allocations |\n| --- | --- | --- |\n| **ParseStream** | **311.7 ns/op** | **0 allocs/op** |\n| HandleInstructions | 40.29 ns/op | 0 allocs/op |\n| ParseHeaders | 12.01 ns/op | 0 allocs/op |\n| ParseCookies | 64.68 ns/op | 0 allocs/op |\n| ParseBody | 18.55 ns/op | 0 allocs/op |\n\n*\u003e The parser handles complex instruction injection and multiline extraction without generating garbage.*\n\n---\n\n## 🛠 Installation\n\n```bash\ngo install github.com/Votline/Gurl-cli@latest\n\n```\n\n---\n\n## 📖 Configuration \u0026 Syntax\n\nConfigs are written in `.gurlf` format. It supports multiline strings (JSON/XML) natively without escaping.\n\n### 1. HTTP Request with Embedded JSON\n\n```bash\n[http_config]\nURL: http://localhost:8080/api/users\nMethod: POST\nHeaders: Content-Type: application/json\nBody: `\n    {\n        \"username\": \"admin\",\n        \"role\": \"superuser\"\n    }\n`\n# The CLI will auto-fill the response here after execution\nResponse:\n[\\http_config]\n\n```\n\n### 2. Request Chaining (The Power Move)\n\nExtract a token from Request #1 and use it in Request #2.\n\n```bash\n# Request 1: Login\n[login_req]\nURL: http://localhost:8080/auth/login\nMethod: POST\nBody: `{ \"user\": \"admin\", \"pass\": \"12345\" }`\nType: http\n# Response contains: {\"token\": \"eyJh...\"}\nResponse: `{\"token\": \"eyJh...\"}`\n[\\login_req]\n\n# Request 2: Protected Resource\n[get_data]\nURL: http://localhost:8080/api/protected\nMethod: GET\nHeaders: `\n    {\n        Content-Type: application/json\n        # Inject token from Request #1 (index 0)\n        Authorization: Bearer {RESPONSE id=0 json:token}\n    }\n`\nType: http\n[\\get_data]\n\n```\n\n### 3. gRPC Support\n\nSupports both `proto` file parsing and Server Reflection.\n\n```bash\n[grpc_config]\nTarget: localhost:50052\nEndpoint: users.UserService/RegUser\n# Point to your local proto file\nProtoPath: ../protos/user-service.proto\nImportPaths: /path/to/dependencies/\nData: `\n    {\n        \"name\": \"John Doe\",\n        \"email\": \"john@example.com\"\n    }\n`\nType: grpc\n[\\grpc_config]\n\n```\n\n### 4. Smart Cookie Management\n\nControl how cookies are shared between requests using the `{COOKIES}` instruction.\n\n* **Default:** Cookies are stored in an in-memory jar and passed sequentially.\n* **Explicit:** Import cookies from a specific request or file.\n\n```bash\n[auth_request]\n# ... generates cookies ...\n[\\auth_request]\n\n[next_step]\n# Option A: Inherit from specific request ID\nCookieIn: `{COOKIES id=0}`\n\n# Option B: Load from external cookie jar file\nCookieIn: `{COOKIES id=file}` \n[\\next_step]\n\n```\n\n### 5. Config Templates (Repeat)\n\nDon't rewrite huge payloads. Use `[repeat]` to inherit a config and patch specific fields.\n\n```bash\n[base_req]\nID: 0\nURL: http://api.com/v1/data\nBody: `{ \"large\": \"payload\" }`\n[\\base_req]\n\n[repeat]\nTarget_ID: 0\n# Patch just the name field in the body\nReplace: `\n    [patch]\n    Body: `{ \"large\": \"payload\", \"patched\": true }`\n    [\\patch]\n`\nType: repeat\n[\\repeat]\n\n```\n\n---\n\n## 🏗 Architecture\n\nFor the curious engineers, `gurl-cli` is built on a custom concurrency model:\n\n1. **Transport Layer:** Uses a custom `http.Transport` and `grpc.ClientConn` wrapped in an atomic worker pool.\n2. **Memory Management:** Heavy use of pooling for byte buffers and context objects.\n3. **Ring Buffers:** Internal communication between the Parser, Executor, and File Writer uses lock-free inspired Ring Buffers (`internal/buffer`) with atomic cursors to maximize throughput.\n4. **In-Place IO:** The file writer uses a sophisticated seek/flush mechanism to update your config file with responses in real-time without corrupting the syntax.\n\n---\n\n## License\n\n- **License:** This project is licensed under  [MIT](LICENSE)\n- **Third-party Licenses:** The full license texts are available in the  [licenses/](licenses/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvotline%2Fgurl-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvotline%2Fgurl-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvotline%2Fgurl-cli/lists"}