https://github.com/anibaldeboni/rapper
Easy to use mass HTTP request tool
https://github.com/anibaldeboni/rapper
cli golang http
Last synced: 9 days ago
JSON representation
Easy to use mass HTTP request tool
- Host: GitHub
- URL: https://github.com/anibaldeboni/rapper
- Owner: anibaldeboni
- License: gpl-3.0
- Created: 2024-01-25T19:38:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2026-02-10T17:02:09.000Z (4 months ago)
- Last Synced: 2026-02-10T21:03:29.524Z (4 months ago)
- Topics: cli, golang, http
- Language: Go
- Homepage:
- Size: 913 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rapper
Rapper is a powerful, configurable CLI tool to perform multiple HTTP requests based on CSV files. It features an interactive Terminal User Interface (TUI), profile management, dynamic worker pools, and real-time metrics monitoring.
## Features
### 🎯 Multi-View TUI Interface
- **Files View**: Browse and select CSV files for processing
- **Logs View**: Real-time processing logs with scroll support
- **Settings View**: Edit configuration with live preview
- **Workers View**: Monitor and control worker pool dynamically
### 📋 Profile Management
- Support for multiple configuration profiles (dev, staging, production, etc.)
- Quick profile switching with `Ctrl+P`
- Visual profile selector with active profile indicator
- Each profile stored as separate YAML file
### ⚙️ Configuration Editor
- In-app configuration editing
- Form fields for URL template, request body, and headers
- Tab navigation between fields
- Save changes with `Ctrl+S`
- Real-time validation and unsaved changes indicator
### 👷 Dynamic Worker Pool
- Adjust worker count in real-time with arrow keys or +/-
- Visual slider for worker count (1 to CPU count)
- Instant feedback without restarting
### 📊 Real-Time Metrics
- Processing status indicator
- Total requests, success/error counts
- Lines processed from CSV
- Throughput (requests per second)
- Elapsed time during processing
- Active workers count
- Auto-refresh every 500ms
### 🎨 Visual Polish
- Toast notifications for important actions
- Color-coded metrics (green for success, red for errors)
- Smooth animations and transitions
- Enhanced modal dialogs
- Responsive layout
## Installing
We provide pre-compiled binaries for Linux and MacOS (amd64 and arm64). The latest release could be found [here](https://github.com/anibaldeboni/github.com/anibaldeboni/rapper/releases/latest). After downloading a suitable binary for your system and architecture follow the commands:
```shell
chmod +x rapper-linux-amd64
mv ./rapper-linux-amd64 ~/.local/bin/rapper
```
The instructions above move the binary to `~./local/bin` with the name `rapper` if you have another folder mapped in `$PATH` move the app to the pertinent location.
## Configuration
Prior to running `rapper` you must set a `config.yml` structure is as follow:
```yaml
request:
method: POST
url_template: http://localhost:8080/api/users/{{.id}}
body_template: |
{
"name": "{{.name}}",
"email": "{{.email}}"
}
headers:
Authorization: Bearer dev-token-123456
Content-Type: application/json
Cookie: SESSID=1234
X-API-Version: v1
csv:
separator: ','
fields:
- id
- name
- email
workers: 2
```
Have in mind that when a request fails all variables selected in `csv` field will be used to form the error message, so select all variables you need to form the url and payload and any other that is relevant to identify problems when an error occur
## Keyboard Shortcuts
### Global Navigation
- `F1`: Switch to Files view
- `F2`: Switch to Logs view
- `F3`: Switch to Settings view
- `F4`: Switch to Workers view
- `Ctrl+C`: Cancel operation
- `q`: Quit application
### Settings View
- `Tab` / `Shift+Tab`: Navigate between form fields
- `Ctrl+S`: Save configuration
- `Ctrl+P`: Open profile selector
- Arrow keys in form: Edit text
- `↑` / `↓`: Navigate profile list (when profile selector is open)
- `Enter`: Select profile (when profile selector is open)
### Workers View
- `←` / `→`: Decrease/increase worker count
- `-` / `+`: Decrease/increase worker count
### Files & Logs View
- `↑` / `↓` / `←` / `→`: Navigate file list / Scroll logs
## Usage
All options are available via `rapper -h`
You may run `rapper` directly in a directory containing a valid `config.yml` and CSV files to process. Or setting the options:
```shell
-config string
path to directory containing a config file (default current working dir)
-dir string
path to directory containing the CSV files (default current working dir)
-output string
path to output file, including the file name
-workers int
number of request workers (max: 5) (default 1)
```
A little demo of the app execution:

# Development
The project uses a comprehensive `Makefile` for all build and development tasks. Run `make help` to see all available commands.
### Building
Build the application with VCS info embedded:
```shell
make build
```
The binary will be created at `./build/rapper`. Version information is automatically extracted from git via `debug.ReadBuildInfo()`.
Other build options:
```shell
make dev # Build with race detector for development
make release # Build optimized binary for release
make build-all # Build binaries for all platforms (Linux, macOS, Windows)
```
After building, copy the binary to a location in your `$PATH`:
```shell
sudo cp ./build/rapper /usr/local/bin/
```
### Testing
Run tests with race detection:
```shell
make test
```
Generate coverage report:
```shell
make test-coverage # Opens coverage.html in ./build/
```
For test assertions we use [testify](https://github.com/stretchr/testify) and [gomock](https://go.uber.org/mock) for test mocks generation.
### Linting
Make sure you have `golangci-lint` installed. More instructions [here](https://golangci-lint.run/usage/install/).
```shell
make lint
```
### Other Commands
```shell
make clean # Remove build artifacts and cache
make install_deps # Download and install dependencies
make mocks # Generate mocks
make run # Build and run the application
make all # Run lint, test, and build
```