{"id":26787494,"url":"https://github.com/itsjimi/req","last_synced_at":"2026-02-13T20:59:04.762Z","repository":{"id":53605988,"uuid":"246661705","full_name":"ItsJimi/req","owner":"ItsJimi","description":"Send requests from Rofi and CLI","archived":false,"fork":false,"pushed_at":"2025-01-30T13:41:15.000Z","size":34,"stargazers_count":3,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T12:30:35.318Z","etag":null,"topics":["cli","go","golang","http","http-client","request","requests","rofi","rofi-req","rofi-scripts"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ItsJimi.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}},"created_at":"2020-03-11T19:26:31.000Z","updated_at":"2025-01-30T13:41:18.000Z","dependencies_parsed_at":"2025-03-29T12:37:41.919Z","dependency_job_id":null,"html_url":"https://github.com/ItsJimi/req","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJimi%2Freq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJimi%2Freq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJimi%2Freq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsJimi%2Freq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsJimi","download_url":"https://codeload.github.com/ItsJimi/req/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249785889,"owners_count":21325559,"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","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","go","golang","http","http-client","request","requests","rofi","rofi-req","rofi-scripts"],"created_at":"2025-03-29T12:25:39.039Z","updated_at":"2026-02-13T20:59:04.726Z","avatar_url":"https://github.com/ItsJimi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# req\nA simple cli to send http requests.\n\n\n## Navigate\n- [Why](#why)\n- [Demo](#demo)\n- [Installl](#install)\n- [Usage](#usage)\n  - [Config file](#config-file)\n  - [List](#list)\n  - [Run](#run)\n- [Reference](#reference)\n  - [Config file](#config-file-1)\n  - [Commands](#commands)\n    - [help](#help)\n    - [version](#version)\n    - [list](#list-1)\n    - [run](#run-1)\n  - [Rofi](#rofi)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Why\nI created req mainly to use it with [Rofi](https://github.com/davatorium/rofi). At home, I can control domotics directly from Rofi.\n\u003e Check the [Rofi](#Rofi) section below.\n\n## Demo\n[![asciicast](https://asciinema.org/a/rpqbwVyj1f4KE2IapyG3r0QCW.svg)](https://asciinema.org/a/rpqbwVyj1f4KE2IapyG3r0QCW)\n\n## Install\nUse precompiled versions in [releases page](https://github.com/ItsJimi/req/releases)\n\nor\n\n```shell\ngo install github.com/ItsJimi/req@latest\n```\n\n## Usage\nFirst of all, you need to create a `.req.json` in your home directory.\n#### Config file\nThis is the most common `.req.json`.\n```json\n[\n  {\n    \"name\": \"Get first post\",\n    \"url\": \"https://jsonplaceholder.typicode.com/posts/1\",\n    \"method\": \"GET\"\n  }\n]\n```\n#### List\nYou can list all of available requests by running.\n```shell\nreq list\n```\nIn our case we have one element displayed.\n```\nGet first post\n```\n#### Run\nYou can run one or multiple requests by using run command.\n```shell\nreq run \"Get first post\"\n```\nThe result is displayed on terminal.\n```json\n{\n  \"userId\": 1,\n  \"id\": 1,\n  \"title\": \"...\",\n  \"body\": \"...\"\n}\n```\n\n## Reference\n### Config file\nBy default, [.req.json](https://github.com/ItsJimi/req/blob/master/.req.json) must be in your home directory.\n```json\n[\n  {\n    \"name\": \"Get first post\",\n    \"url\": \"https://jsonplaceholder.typicode.com/posts/1\",\n    \"method\": \"GET\",\n    \"output\": \"echo \\\"Title: {{.title}}\\nBody: {{.body}}\\\"\"\n  },\n  {\n    \"name\": \"Create post\",\n    \"url\": \"https://jsonplaceholder.typicode.com/posts\",\n    \"method\": \"POST\",\n    \"headers\": [\n      \"Content-type: application/json; charset=UTF-8\"\n    ],\n    \"body\": {\n      \"title\": \"foo\",\n      \"body\": \"bar\",\n      \"userId\": 1\n    }\n  }\n]\n```\n\u003e `output` exec commands with bash and use go template to replace variables.\n\n### Commands\n- All commands can use `--help` or `-h` to display its specific help.\n- All commands can use `--config` or `-c` to use a custom `.json` path. (By default req use a `.req.json` in your home directory)\n\n#### help\nDisplay helper\n```shell\nreq help\n```\n\n#### version\nDisplay version req using SemVer.\n```shell\nreq version\n```\n\n#### list\nDisplay list of `.req.json` requests names (each separated by `\\n`).\n```shell\nreq list\n```\n\n### run\nSend one or multiple requests and display results.\n\u003e Note: You can use --silent or -s to display nothing.\n```shell\nreq run \u003crequest name\u003e [other request name] [...]\n```\n\n### Rofi\nReq can be used in rofi with the [rofi-req.sh](https://github.com/ItsJimi/req/blob/master/rofi-req.sh) script.\n![rofi-req](https://i.imgur.com/kjSOnSB.png)\n\n## Contribute\nFeel free to fork and make pull requests.\n\n\n## License\n[MIT](https://github.com/ItsJimi/req/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjimi%2Freq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsjimi%2Freq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjimi%2Freq/lists"}