Skip to content

anibaldeboni/rapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

193 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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 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. 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: ','
    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:

  -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: 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

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •