Skip to content

Repository files navigation

rapper

GitHub License Build GitHub language count GitHub code size in bytes GitHub Release

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 live metrics on the right
  • Settings View: Edit configuration and tune the worker count via slider

📋 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 from the top of Settings with + / -
  • 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
  • Visible on the right side of the Logs view, auto-refresh every 100ms

🎨 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. After downloading a suitable binary for your system and architecture follow the commands:

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:

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: ','
workers: 2

Template fields are derived automatically from the URL, body, and header templates. Before requests are sent, the selected CSV headers are validated and missing fields are reported.

Keyboard Shortcuts

Global Navigation

  • F1: Switch to Files view
  • F2: Switch to Logs view
  • F3: Switch to Settings view
  • Ctrl+C: Cancel operation
  • q: Quit application

Settings View

  • Tab / Shift+Tab: Navigate between form fields (slider is the first field)
  • + / -: Increase / decrease worker count when the slider is focused
  • 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)

Files & Logs View

  • / / / : Navigate file list / Scroll logs
  • The Logs view shows live processing metrics on the right side while processing

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:

  -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

A little demo of the app execution: rapper usage recording

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:

make build

The binary will be created at ./build/rapper. Version information is automatically extracted from git via debug.ReadBuildInfo().

Other build options:

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:

sudo cp ./build/rapper /usr/local/bin/

Testing

Run tests with race detection:

make test

Generate coverage report:

make test-coverage  # Opens coverage.html in ./build/

For test assertions we use testify and gomock for test mocks generation.

Linting

Make sure you have golangci-lint installed. More instructions here.

make lint

Other Commands

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

About

Easy to use mass HTTP request tool

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages