{"id":37178816,"url":"https://github.com/im-varun/sareq","last_synced_at":"2026-01-14T20:50:11.523Z","repository":{"id":330748737,"uuid":"998070676","full_name":"im-varun/sareq","owner":"im-varun","description":"SAReq: A modern, open-source HTTP client for the command line","archived":false,"fork":false,"pushed_at":"2026-01-03T22:48:29.000Z","size":816,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-07T11:36:00.599Z","etag":null,"topics":["cli","command-line","developer-tools","go","http","http-client"],"latest_commit_sha":null,"homepage":"https://sareq.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/im-varun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-07T19:57:59.000Z","updated_at":"2026-01-03T22:48:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/im-varun/sareq","commit_stats":null,"previous_names":["im-varun/sareq"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/im-varun/sareq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-varun%2Fsareq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-varun%2Fsareq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-varun%2Fsareq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-varun%2Fsareq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/im-varun","download_url":"https://codeload.github.com/im-varun/sareq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/im-varun%2Fsareq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","developer-tools","go","http","http-client"],"created_at":"2026-01-14T20:50:10.729Z","updated_at":"2026-01-14T20:50:11.496Z","avatar_url":"https://github.com/im-varun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SAReq /\u003e\u003e/\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"img/logo.png\" width=\"100\" height=\"100\" alt=\"SAReq Logo\"\u003e\n\u003c/p\u003e\n\nSAReq, short for \"Send A Request\", is a command-line HTTP client to help developers and testers send HTTP requests and analyze responses directly from the terminal. It aims to provide a lightweight yet powerful and intuitive environment that minimizes overhead and complexity of the application while maintaining essential developer functionality.\n\nSAReq is built for:\n- Developers who are just getting started and want to experiment with HTTP requests in a straightforward way.\n- Developers who prefer command-line tools for quick testing and debugging of APIs.\n\n## Features\n\n- **⚡ Lightweight \u0026 Fast:** A small, fast Go-based CLI tool designed to make sending HTTP requests simple and efficient without any extra dependencies or setup.\n- **💻 Simple CLI Requests:** Quickly send HTTP requests directly from your terminal using intuitive commands that let you test APIs in seconds.\n- **🎨 Prettified Colorful Output:** Response data is displayed in a readable, color-coded format that highlights JSON structure, headers, and status codes for easy inspection.\n\n## Installation\n\nSAReq can be installed via the command line or by downloading the official binary from GitHub Releases.\n\n### Using `go install`\n\nTo install SAReq using this method, ensure you have a latest version of [Go](https://go.dev/) installed on your system. Then, run the following command in your terminal:\n```sh\ngo install github.com/im-varun/sareq@latest\n```\n\nTo verify the installation, you can run:\n```sh\nsareq --version\n# or sareq version\n```\nThis should display the installed version of SAReq. If running the above command results in a \"command not found\" error, ensure that your Go binary directory (usually `$GOPATH/bin` or `$HOME/go/bin`) is included in your system's PATH environment variable. This should fix the \"command not found\" issue in most cases.\n\n### Downloading Pre-built Binaries\n\nPre-built binaries for SAReq are available for various operating systems (Windows, Linux, macOS) and architectures (amd64, arm64), and can be downloaded directly from the [GitHub Releases](https://github.com/im-varun/sareq/releases) page.\n\nFollow these steps to ensure a successful installation:\n\n1. Navigate to the [GitHub Releases](https://github.com/im-varun/sareq/releases) page of SAReq.\n\n2. Download the appropriate archive file for your operating system and architecture along with its corresponding `.sha256` checksum file.\n\n3. Verify the integrity of the downloaded archive using the SHA256 checksum provided in the `.sha256` file.\n\n    ```sh\n    # compute the SHA256 checksum of the downloaded archive\n    # compare it with the value in the .sha256 file\n\n    # to compute the SHA256 checksum on Windows\n    Get-FileHash -Algorithm SHA256 NAME_OF_DOWNLOADED_ARCHIVE.zip\n\n    # to compute the SHA256 checksum on Linux\n    sha256sum NAME_OF_DOWNLOADED_ARCHIVE.tar.gz\n\n    # to compute the SHA256 checksum on macOS\n    shasum -a 256 NAME_OF_DOWNLOADED_ARCHIVE.tar.gz\n    ```\n\n4. Once the checksum is verified, extract the contents of the downloaded archive to a directory of your choice.\n\n5. Add the directory containing the extracted `sareq` executable to your system's PATH environment variable. This allows you to run SAReq from any terminal window.\n\n6. To verify the installation, open a new terminal window and run:\n    \n    ```sh\n    sareq --version\n    # or sareq version\n    ```\n    This should display the installed version of SAReq indicating that the installation was successful.\n\n### Other Installation Methods\n\nSupport for additional installation methods, such as package managers like Scoop and Homebrew, is currently under development. Stay tuned for updates in future releases!\n\n## Quickstart\n\nThis quickstart guide covers how to quickly get started using SAReq.\n\n### Introduction\n\nSAReq, short for \"Send A Request\", is a CLI-based HTTP client that allows you to make HTTP requests directly from your terminal. It is designed to be simple, fast, and easy to use. It provides a straightforward way to interact with APIs without the need for a graphical interface.\n\n### Understanding the Basics\n\nSAReq is built around the concept of commands and flags (also known as options) that you can use to perform various actions. The basic syntax for using SAReq is as follows:\n```sh\nsareq [command] [flags]\n```\nThe command may also require additional arguments, such as a URL.\n\n### Making Your First Request\n\n#### Request Semantics\n\nSAReq supports several HTTP methods (also known as verbs) that you can use to make requests. The most commonly used methods are:\n- `GET`: Retrieve data from a specified resource.\n- `POST`: Send data to a server to create a new resource.\n- `PUT`: Update an existing resource with new data.\n- `PATCH`: Partially update an existing resource.\n- `DELETE`: Remove a specified resource.\n\nEach of these methods corresponds to a command of the same name in SAReq. For example, to make a GET request, you would use the `get` command, and to make a POST request, you would use the `post` command.\n\nA request typically consists of the following components:\n- **URL**: The endpoint to which the request is sent.\n- **Headers**: Additional information sent with the request (e.g., authentication tokens, content type).\n- **Body**: The data sent with the request (mainly used with POST, PUT, PATCH requests).\n\nEach HTTP request command in SAReq requires at least a URL as an argument. Additional components such as headers and body can be specified using the `-H/--header` and `-B/--body` flags, respectively.\n\n#### A simple GET request\n\nLet's start by making a simple GET request to fetch data from a hypothetical API endpoint.\n```sh\nsareq get https://api.example.com/users\n```\nIn this example, we are using the `get` command to retrieve a list of users from the specified URL. SAReq will send the request and display the response in your terminal like this:\n```\nHTTP/1.1 200 OK\n\nContent-Type: application/json; charset=utf-8\n\n[\n    {\n        \"id\": 1,\n        \"name\": \"John Doe\",\n        \"email\": \"john@doe.com\"\n    },\n    {\n        \"id\": 2,\n        \"name\": \"Jane Smith\",\n        \"email\": \"jane@smith.com\"\n    }\n]\n```\n\n#### A simple POST request\n\nNow, let's make a simple POST request to create a new user.\n```sh\nsareq post https://api.example.com/users --body '{\"name\": \"Jane Doe\", \"email\": \"jane@doe.com\"}'\n```\nIn this example, we used the `post` command to send a request to create a new user with the specified name and email. The `--body` flag was used to define the request body containing the user data in JSON format.\n\n### Using flags\n\nSAReq provides several flags that you can use to customize the behavior of the commands. Flags are generally used to customize requests and responses, such as adding headers, specifying request bodies, or changing output formats.\n\nHere are some commonly used flags:\n- `-H, --header \u003cheader\u003e`: Add a header to include with the request.\n- `-B, --body \u003cbody\u003e`: Define the body to send with the request (mainly used with POST, PUT, PATCH requests).\n- `--timeout \u003cseconds\u003e`: Specify a timeout to use with the request.\n\nThere are some other flags available as a convenience for users. These include:\n- `-h, --help`: Display help information for the command (or a subcommand) with which it is used.\n- `-v, --version`: Display the current version of SAReq.\n- `--no-color`: Disable coloring in the HTTP response output.\n- `--no-prettify`: Disable prettification in the HTTP response output.\n\n#### Adding Headers\n\nHeaders can be added using the `-H` or `--header` flag followed by the header key-value pair in the format `\"key=value\"`.\n```sh\nsareq get https://api.example.com/users --header \"Authorization=abc123\"\n\n# or using the shorthand version\nsareq get https://api.example.com/users -H \"Authorization=abc123\"\n```\n\nYou can also add multiple headers by using the flag multiple times (once for each header):\n```sh\nsareq get https://api.example.com/users -H \"Authorization=abc123\" -H \"Accept=application/json\"\n```\n\n#### Defining a Request Body\n\nRequest bodies can be defined using the `-B` or `--body` flag followed by the body content. This is mainly used with POST, PUT, or PATCH requests.\n```sh\nsareq post https://api.example.com/users --body '{\"name\": \"John Doe\"}'\n\n# or using the shorthand version\nsareq post https://api.example.com/users -B '{\"name\": \"John Doe\"}'\n```\n\nThe content of the body is enclosed in single quotes or double quotes, depending on type of the content. For example, JSON content is typically enclosed in single quotes to avoid conflicts with double quotes used for JSON keys and values.\n\n#### Specifying a Timeout\n\nTo avoid waiting indefinitely for a response, you can specify a timeout with the request using the `--timeout` flag followed by the number of seconds to wait before timing out.\n```sh\nsareq get https://api.example.com/users --timeout 10\n```\nThis will set a timeout of 10 seconds for the request. If the server does not respond within this time frame, SAReq will terminate the request and display a timeout error.\n\n#### Making a Request with Multiple Flags\n\nSAReq allows you to combine multiple flags in a single request. You simply specify each flag followed by its corresponding value (if applicable) in the command.\n```sh\nsareq post https://api.example.com/users -H \"Authorization=abc123\" -H \"Content-Type=application/json\" -B '{\"name\": \"John Doe\"}' --timeout 15\n```\nThis command makes a POST request to create a new user, includes two headers, defines a JSON body, and sets a timeout of 15 seconds.\n\n#### Formatting the Output\n\nCurrently, SAReq offers two features to format the output of HTTP responses:\n- **Coloring**: This feature adds color to different parts of the HTTP response (e.g., status code, headers, body) to enhance readability.\n- **Prettification**: This feature formats the response body (if it's in JSON format) to make it more human-readable by adding indentation and line breaks.\n\nBy default, both coloring and prettification are enabled. However, you can disable them using the `--no-color` and `--no-prettify` flags, respectively.\n```sh\n# to disable only coloring\nsareq get https://api.example.com/users --no-color\n\n# to disable only prettification\nsareq get https://api.example.com/users --no-prettify\n\n# to disable coloring and prettification together\nsareq get https://api.example.com/users --no-color --no-prettify\n```\n\n#### Help and Version Information\n\nSAReq provides built-in help and version information through the `-h/--help` and `-v/--version` flags.\n\nTo display help information for SAReq or a specific command, use the `-h` or `--help` flag:\n```sh\nsareq --help\n\n# help for a specific command\nsareq get --help\n```\n\nTo display the current version of SAReq, use the `-v` or `--version` flag:\n```sh\nsareq --version\n```\n\nYou can also use the `version` subcommand to get the version information:\n```sh\nsareq version\n```\n\n### Testing with `localhost`\n\nSAReq is not limited to making requests to public APIs. You can also use it to test your local development servers running on `localhost`. For example, if you have a server running on `http://localhost:8080`, you can make requests to it like this:\n```sh\n# making a GET request to localhost\nsareq get http://localhost:8080/api/test\n\n# making a POST request to localhost\nsareq post http://localhost:8080/api/test --body '{\"data\": \"test\"}'\n\n# making a DELETE request to localhost\nsareq delete http://localhost:8080/api/test/1\n```\n\n## Contributing\n\nFor information on how to contribute to SAReq, please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) document.\n\n## Roadmap\n\nFor a detailed roadmap of planned features and improvements, please refer to the [ROADMAP.md](ROADMAP.md) document.\n\n## License\n\nSAReq is licensed under the [BSD-3-Clause license](LICENSE).\n\n## Maintainers\n\nThe project is currently maintained by [Varun Mulchandani](https://github.com/im-varun).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-varun%2Fsareq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fim-varun%2Fsareq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fim-varun%2Fsareq/lists"}