@churivibhav/reqex 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,57 +1,163 @@
|
|
|
1
1
|
# reqex
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**reqex** is a terminal HTTP client for `.http` and `.rest` files. Open a folder of requests, edit them in place, send them, and read the response — all in one screen. Think Postman, but in your terminal.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- **Engine**: [httpyac](https://httpyac.github.io/) — full `.http` compatibility
|
|
7
|
-
- **Target**: Kitty / glibc Linux, macOS, Windows (Rezi native binaries)
|
|
5
|
+
It uses [httpyac](https://httpyac.github.io/) under the hood, so your existing REST Client / httpyac files work as-is. The UI is built with [Rezi](https://rezitui.dev).
|
|
8
6
|
|
|
9
7
|
## Install
|
|
10
8
|
|
|
9
|
+
You need **Node.js 20 or later**.
|
|
10
|
+
|
|
11
11
|
```bash
|
|
12
12
|
npm install -g @churivibhav/reqex
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
1. Put your HTTP files in a folder (`.http`, `.rest`, or environment files like `.env` / `.env.json`).
|
|
18
|
+
2. Open that folder with reqex:
|
|
16
19
|
|
|
17
20
|
```bash
|
|
18
|
-
reqex # open
|
|
19
|
-
reqex ./api # open folder
|
|
21
|
+
reqex # open the current directory
|
|
22
|
+
reqex ./api # open a specific folder
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Select a file in the **Files** pane on the left.
|
|
26
|
+
4. Place your cursor on a request block and press **F5** to send it.
|
|
27
|
+
5. Read the response in the **Response** pane on the right.
|
|
28
|
+
|
|
29
|
+
That’s the core loop: browse → edit → send → inspect.
|
|
30
|
+
|
|
31
|
+
## The interface
|
|
32
|
+
|
|
33
|
+
reqex opens a three-pane layout:
|
|
34
|
+
|
|
35
|
+
| Pane | What it does |
|
|
36
|
+
|------|----------------|
|
|
37
|
+
| **Files** | Browse `.http`, `.rest`, and environment files in your workspace |
|
|
38
|
+
| **Editor** | Edit the selected file with HTTP syntax highlighting |
|
|
39
|
+
| **Response** | Status, headers, body, variables, and test results for the last request |
|
|
40
|
+
|
|
41
|
+
Use **Tab** / **Shift+Tab** to move between panes, or **Ctrl+1**, **Ctrl+2**, **Ctrl+3** to jump directly. Press **F11** or **z** to zoom the focused pane.
|
|
42
|
+
|
|
43
|
+
Press **F1** or **?** anytime for in-app quick help. Press **Ctrl+/** for the full keybinding list.
|
|
44
|
+
|
|
45
|
+
## HTTP files
|
|
46
|
+
|
|
47
|
+
reqex understands the standard `.http` / `.rest` format. A minimal example:
|
|
48
|
+
|
|
49
|
+
```http
|
|
50
|
+
@baseUrl = https://api.example.com
|
|
51
|
+
|
|
52
|
+
### List items
|
|
53
|
+
GET {{baseUrl}}/items
|
|
54
|
+
Accept: application/json
|
|
55
|
+
|
|
56
|
+
### Create item
|
|
57
|
+
POST {{baseUrl}}/items
|
|
58
|
+
Content-Type: application/json
|
|
59
|
+
|
|
60
|
+
{
|
|
61
|
+
"name": "example"
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Each request is separated by a line starting with `###`. Variables like `{{baseUrl}}` are resolved when you send.
|
|
66
|
+
|
|
67
|
+
Because reqex uses httpyac, you also get:
|
|
68
|
+
|
|
69
|
+
- **Variables** — file-level `@name = value` and environment files
|
|
70
|
+
- **Environments** — switch between dev/staging/prod with **Ctrl+E**
|
|
71
|
+
- **Chained requests** — reference a previous response with `@name` and `# @ref name`
|
|
72
|
+
- **Tests** — assertions with `??` lines after a request
|
|
73
|
+
|
|
74
|
+
For the full file format, see the [httpyac documentation](https://httpyac.github.io/guide/request.html).
|
|
75
|
+
|
|
76
|
+
## Sending requests
|
|
77
|
+
|
|
78
|
+
- Put the cursor anywhere inside a request block and press **F5** (or **Ctrl+Enter** / **Alt+Enter** on terminals that support it).
|
|
79
|
+
- To stop a slow request, press **Ctrl+X**.
|
|
80
|
+
- Unsaved edits are marked in the file tree — press **Ctrl+S** to save before sending if you want the file on disk updated.
|
|
81
|
+
|
|
82
|
+
## Response pane
|
|
83
|
+
|
|
84
|
+
After a request completes, the response pane shows several tabs:
|
|
85
|
+
|
|
86
|
+
| Tab | Shows |
|
|
87
|
+
|-----|--------|
|
|
88
|
+
| **Pretty** | Formatted JSON when applicable |
|
|
89
|
+
| **Raw** | Response body as received |
|
|
90
|
+
| **Headers** | Response headers |
|
|
91
|
+
| **Variables** | Variables set by the request |
|
|
92
|
+
| **Tests** | Test assertion results |
|
|
93
|
+
|
|
94
|
+
Use **Ctrl+Tab** / **Ctrl+Shift+Tab** to cycle tabs, or click a tab header. Copy the visible tab with **Ctrl+Shift+C**.
|
|
95
|
+
|
|
96
|
+
## Environments
|
|
97
|
+
|
|
98
|
+
If your project defines httpyac environments (for example in `.env` or `.env.json` files), switch between them with **Ctrl+E**. Use the arrow keys to highlight an environment and **Enter** to apply it. Choose **(none)** to clear the active environment.
|
|
99
|
+
|
|
100
|
+
## Command palette
|
|
101
|
+
|
|
102
|
+
Press **F2** or **Ctrl+Shift+P** to open the command palette. From there you can send requests, save files, switch environments, toggle the sidebar, and more — without memorizing every shortcut.
|
|
103
|
+
|
|
104
|
+
## Configuration
|
|
105
|
+
|
|
106
|
+
### Keybindings
|
|
107
|
+
|
|
108
|
+
Default shortcuts follow a VS Code–style preset. Override them in:
|
|
109
|
+
|
|
110
|
+
- **User config:** `~/.config/reqex/keybindings.json` (Linux), `~/Library/Application Support/reqex/keybindings.json` (macOS), or `%APPDATA%\reqex\keybindings.json` (Windows)
|
|
111
|
+
- **Project config:** `.reqex/keybindings.json` in your workspace (overrides user settings)
|
|
112
|
+
|
|
113
|
+
Set `REQEX_CONFIG_DIR` to use a different config directory.
|
|
114
|
+
|
|
115
|
+
Example — remap send to **Ctrl+Return** only and use the vim pane preset:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"preset": "vim",
|
|
120
|
+
"bindings": {
|
|
121
|
+
"ctrl+return": "request.send"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
20
124
|
```
|
|
21
125
|
|
|
22
|
-
|
|
126
|
+
Changes are picked up automatically while reqex is running.
|
|
127
|
+
|
|
128
|
+
### Common shortcuts
|
|
23
129
|
|
|
24
130
|
| Key | Action |
|
|
25
131
|
|-----|--------|
|
|
26
132
|
| `F5` | Send request under cursor |
|
|
27
|
-
| `Ctrl+Enter` / `Alt+Enter` | Send
|
|
133
|
+
| `Ctrl+Enter` / `Alt+Enter` | Send request |
|
|
28
134
|
| `Ctrl+X` | Cancel in-flight request |
|
|
29
|
-
| `Tab` / `Shift+Tab` | Cycle panes |
|
|
30
|
-
| `Ctrl+1/2/3` | Jump to Files / Editor / Response |
|
|
31
135
|
| `Ctrl+S` | Save file |
|
|
32
136
|
| `Ctrl+E` | Environment switcher |
|
|
137
|
+
| `Ctrl+B` | Toggle file sidebar |
|
|
138
|
+
| `Ctrl+P` | Quick open files |
|
|
33
139
|
| `Ctrl+Shift+P` / `F2` | Command palette |
|
|
140
|
+
| `Ctrl+Shift+C` | Copy response tab |
|
|
141
|
+
| `Ctrl+F` | Search in response |
|
|
142
|
+
| `Tab` / `Shift+Tab` | Cycle panes |
|
|
143
|
+
| `Ctrl+1/2/3` | Jump to Files / Editor / Response |
|
|
34
144
|
| `F1` / `?` | Quick help |
|
|
35
145
|
| `Ctrl+/` | Full keybindings list |
|
|
36
146
|
| `F11` / `z` | Zoom pane |
|
|
37
147
|
| `Ctrl+Q` | Quit |
|
|
38
148
|
|
|
39
|
-
|
|
149
|
+
## Requirements
|
|
40
150
|
|
|
41
|
-
|
|
151
|
+
- **Node.js >= 20**
|
|
152
|
+
- A modern terminal. **Kitty** is recommended on Linux for the best keyboard support.
|
|
153
|
+
- **glibc** Linux (x64 or arm64), macOS, or Windows.
|
|
42
154
|
|
|
43
|
-
|
|
44
|
-
npm install
|
|
45
|
-
npm run dev
|
|
46
|
-
npm test
|
|
47
|
-
npm run build
|
|
48
|
-
```
|
|
155
|
+
Alpine Linux and other **musl**-based systems are not supported (Rezi ships native binaries built for glibc).
|
|
49
156
|
|
|
50
|
-
##
|
|
157
|
+
## Contributing
|
|
51
158
|
|
|
52
|
-
|
|
53
|
-
- Rezi uses prebuilt native binaries (glibc Linux x64/arm64, macOS, Windows). **Alpine/musl is not supported.**
|
|
159
|
+
See [develop.md](develop.md) for local setup, tests, and publishing.
|
|
54
160
|
|
|
55
161
|
## License
|
|
56
162
|
|
|
57
|
-
GPL-3.0-or-later
|
|
163
|
+
GPL-3.0-or-later — see [LICENSE](LICENSE).
|