************************************************************************************************************************
_
| |_ __ _ _ __ _ __
| __/ _` | '_ \| '__|
| || (_| | |_) | |
\__\__,_| .__/|_|
|_|
************************************************************************************************************************
Tap into API performance, straight from your terminal
Tapr is a fast, lightweight CLI tool for API health checking, performance monitoring, and debugging. Built in Go for speed and reliability, it's perfect for developers, DevOps engineers, and SREs who need quick insights into API behavior.
tapr-demo.mp4
Why Tapr?
- 🚀 Fast: Single binary, zero dependencies, instant startup
- 🎯 Focused: Does one thing well - API health monitoring
- 🔧 CI/CD Ready: JSON/CSV output, exit codes, fail-fast mode
- 🎨 Beautiful: Color-coded output with visual latency bars
- ⚡ Real-time: Watch mode with live statistics
- 🔍 Detailed: Trace mode shows DNS, TCP, TLS, and server timing
- Features
- Installation
- Quick Start
- Usage Examples
- Configuration
- Command Reference
- CI/CD Integration
- Output Formats
- Troubleshooting
- Contributing
- License
- ✅ Single Endpoint Testing - Quick health checks with latency measurement
- ✅ Batch Testing - Test multiple endpoints concurrently from a config file
- ✅ Continuous Monitoring - Watch mode with live updating statistics
- ✅ Request Tracing - Detailed breakdown of DNS, TCP, TLS, and server processing time
- ✅ Custom Headers - Support for inline headers and YAML header files
- ✅ Retry Logic - Configurable retries with exponential backoff
- ✅ Multiple Output Formats - Pretty (terminal), JSON, or CSV
- ✅ CI/CD Integration - Exit codes, quiet mode, fail-fast for automation
Tapr measures and reports:
- Total request latency
- Success/failure rates
- P50, P95, P99 percentiles
- Min/max/average response times
- Standard deviation for consistency analysis
- Response size and HTTP protocol version
Pre-built binaries are available in Releases.
# Linux
curl -L https://github.com/symtalha14/tapr/releases/latest/download/tapr-linux-amd64 -o tapr
chmod +x tapr
sudo mv tapr /usr/local/bin/
# macOS
curl -L https://github.com/symtalha14/tapr/releases/latest/download/tapr-darwin-amd64 -o tapr
chmod +x tapr
sudo mv tapr /usr/local/bin/
# Windows
# Download tapr-windows-amd64.exe from releasesgo install github.com/symtalha14/tapr/cmd/tapr@latestgit clone https://github.com/symtalha14/tapr.git
cd tapr
go build -o tapr ./cmd/tapr/
sudo mv tapr /usr/local/bin/tapr --help# Simple GET request
tapr https://api.example.com/health
# Output:
# ✓ 200 OK
# Latency: 142ms
# Size: 312 bytes# Inline headers
tapr https://api.example.com/users \
-H "Authorization: Bearer token123" \
-H "Content-Type: application/json"
# From file
tapr https://api.example.com/users --headers headers.yml# Watch with 5-second intervals
tapr watch https://api.example.com/health --interval 5s
# Live output shows:
# - Success rate
# - Average/min/max latency
# - P95 percentile
# - Recent request history with visual bars# Test multiple endpoints from config
tapr batch endpoints.yml
# With CI/CD options
tapr batch endpoints.yml --quiet --fail-fast --output json# See detailed timing breakdown
tapr trace https://api.example.com/data
# Shows:
# - DNS Lookup: 12ms
# - TCP Connection: 24ms
# - TLS Handshake: 89ms
# - Server Processing: 156ms
# - Content Transfer: 8mstapr https://api.example.com/flaky-endpoint --retries 3 --timeout 5stapr watch https://api.example.com/health --interval 2s --count 10Sample Output:
📈 Live Stats (10 requests)
Success Rate: 100% (10/10) ✓
Avg Latency: 234ms
Min Latency: 145ms
Max Latency: 356ms
P95 Latency: 340ms
📊 Recent Checks
14:30:15 ✓ 200 OK 145ms [██░░░░░░░░] 30%
14:30:17 ✓ 200 OK 234ms [█████░░░░░] 50%
14:30:19 ✓ 200 OK 356ms [█████████░] 95%
endpoints.yml:
concurrency: 5
timeout: 10s
endpoints:
- name: "Auth Service"
url: https://auth.example.com/health
method: GET
expected_status: 200
- name: "User Service"
url: https://users.example.com/health
method: GET
expected_status: 200
- name: "Payment Gateway"
url: https://payments.example.com/health
method: GET
expected_status: 200
headers:
X-API-Key: secret-keyRun:
tapr batch endpoints.ymlSample Output:
ENDPOINT METHOD STATUS LATENCY SIZE RESULT
Auth Service GET 200 142ms 1.2KB ✓
User Service GET 200 234ms 892B ✓
Payment Gateway POST 200 189ms 3.4KB ✓
📊 Summary
Total: 3 endpoints
Successful: 3 (100%)
Failed: 0 (0%)
Avg Latency: 188ms
Total Time: 1.2s
✓ All endpoints healthy!
GitHub Actions example:
- name: Check API Health
run: tapr batch production-endpoints.yml --quiet --fail-fastJenkins example:
sh 'tapr batch endpoints.yml --output json > health-report.json'tapr batch endpoints.yml --output json > results.json
# Parse with jq
cat results.json | jq '.results[] | select(.success == false)'tapr trace https://api.example.com/slow-endpointSample Output:
📊 Request Timeline
DNS Lookup ██░░░░░░░░░░░░░░ 12ms ( 4.1%)
TCP Connection ████░░░░░░░░░░░░ 24ms ( 8.3%)
TLS Handshake ████████████░░░░ 89ms (30.7%)
Server Processing ████████████████ 156ms (53.8%)
Content Transfer ██░░░░░░░░░░░░░░ 8ms ( 2.8%)
💡 Insights
⚠️ TLS handshake is slow (30.7% of total)
⚠️ Server processing is the main bottleneck
headers.yml:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json
User-Agent: Tapr/0.1.0
X-Request-ID: abc-123-def
X-API-Key: your-api-key-hereUsage:
tapr https://api.example.com/users --headers headers.ymlbatch-config.yml:
# Global settings
timeout: 30s
concurrency: 10
# Endpoints to test
endpoints:
- name: "Production API"
url: https://api.example.com/health
method: GET
expected_status: 200
- name: "Database Health"
url: https://api.example.com/db/ping
method: GET
expected_status: 200
timeout: 5s # Override global timeout
- name: "Create User Endpoint"
url: https://api.example.com/users
method: POST
expected_status: 201
headers:
Content-Type: application/json
X-Test-Mode: "true"Available on all commands:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--timeout |
-t |
duration | 10s |
Maximum time to wait for response |
--method |
-X |
string | GET |
HTTP method (GET, POST, PUT, PATCH, DELETE) |
--headers |
string | Path to YAML file with headers | ||
--header |
-H |
string[] | Inline header (repeatable): "Key: Value" |
|
--verbose |
-v |
bool | false |
Show detailed request/response info |
--retries |
-r |
int | 0 |
Number of retry attempts on failure |
--quiet |
-q |
bool | false |
Only show errors (for CI/CD) |
--silent |
bool | false |
No output at all, only exit code | |
--output |
-o |
string | pretty |
Output format: pretty, json, csv |
Test a single endpoint.
Examples:
tapr https://api.example.com
tapr https://api.example.com -X POST -H "Auth: token"
tapr https://api.example.com --timeout 30s --retries 3Continuously monitor an endpoint with live statistics.
Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--interval |
-i |
duration | 2s |
Time between requests |
--count |
-n |
int | 0 |
Number of requests (0 = infinite) |
Examples:
# Monitor every 5 seconds
tapr watch https://api.example.com --interval 5s
# Monitor 20 times
tapr watch https://api.example.com --count 20
# Infinite monitoring with custom headers
tapr watch https://api.example.com -i 3s -H "Auth: token"Press Ctrl+C to stop and see summary.
Show detailed timing breakdown for each request phase.
Examples:
tapr trace https://api.example.com
tapr trace https://api.example.com -H "Authorization: Bearer token"Test multiple endpoints from a YAML configuration file.
Flags:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--concurrency |
-c |
int | 5 |
Number of concurrent requests |
--fail-fast |
bool | false |
Stop on first failure | |
--max-time |
duration | 0 |
Maximum time for entire batch |
Examples:
# Basic batch test
tapr batch endpoints.yml
# CI/CD mode
tapr batch endpoints.yml --quiet --fail-fast --output json
# High concurrency
tapr batch endpoints.yml --concurrency 20
# Time-limited
tapr batch endpoints.yml --max-time 2mTapr uses standard exit codes for automation:
0- Success (all tests passed)1- Failure (some tests failed)2- Error (configuration error, invalid arguments)
.github/workflows/api-health.yml:
name: API Health Check
on:
push:
branches: [main]
schedule:
- cron: '*/15 * * * *' # Every 15 minutes
jobs:
health-check:
runs-on: ubuntu-latest
steps:
- name: Install Tapr
run: |
curl -L https://github.com/symtalha14/tapr/releases/latest/download/tapr-linux-amd64 -o tapr
chmod +x tapr
sudo mv tapr /usr/local/bin/
- name: Check Production APIs
run: tapr batch production-endpoints.yml --quiet --fail-fast
- name: Notify on Failure
if: failure()
run: |
curl -X POST ${{ secrets.SLACK_WEBHOOK }} \
-d '{"text":"🚨 Production APIs are unhealthy!"}'.gitlab-ci.yml:
api-health-check:
stage: test
script:
- tapr batch staging-endpoints.yml --quiet --fail-fast
only:
- merge_requestsJenkinsfile:
pipeline {
agent any
stages {
stage('API Health Check') {
steps {
sh 'tapr batch endpoints.yml --quiet --output json > results.json'
archiveArtifacts artifacts: 'results.json'
}
}
}
}#!/bin/bash
# Pre-deployment health check
if tapr batch production-endpoints.yml --quiet --fail-fast; then
echo "✓ APIs healthy, proceeding with deployment"
./deploy.sh
else
echo "✗ APIs unhealthy, aborting deployment"
exit 1
fiBeautiful, color-coded terminal output with visual indicators.
tapr batch endpoints.ymlMachine-readable format for parsing and automation.
tapr batch endpoints.yml --output jsonSample Output:
{
"total": 3,
"successful": 2,
"failed": 1,
"success_rate": 66.67,
"avg_latency_ms": 234,
"total_time_ms": 1543,
"results": [
{
"name": "Auth API",
"url": "https://api.example.com/auth",
"method": "GET",
"status": 200,
"latency_ms": 142,
"success": true
}
]
}Spreadsheet-friendly format for analysis.
tapr batch endpoints.yml --output csv > results.csvSample Output:
name,url,method,status,expected_status,latency_ms,size_bytes,success,error
Auth API,https://api.example.com/auth,GET,200,200,142,1024,true,
User API,https://api.example.com/users,GET,200,200,234,2048,true,Problem: Error: URL must start with http:// or https://
# Wrong:
tapr api.example.com
# Right:
tapr https://api.example.comProblem: Error: headers file not found
# Check file path
ls headers.yml
# Use absolute path if needed
tapr https://api.example.com --headers /path/to/headers.ymlProblem: Tests passing but batch fails
# Check expected_status in config
# Make sure it matches actual responseProblem: Slow batch tests
# Increase concurrency
tapr batch endpoints.yml --concurrency 10
# Set max time limit
tapr batch endpoints.yml --max-time 30s# For many endpoints, increase concurrency
tapr batch endpoints.yml --concurrency 20# Stop immediately on first failure (saves time)
tapr batch endpoints.yml --fail-fast# Don't wait forever for slow endpoints
tapr watch https://slow-api.com --timeout 5s# Stop after N requests
tapr watch https://api.com --count 100- Request body support (POST/PUT data)
- Response body display and comparison
- Save results to file
- HTML report generation
- Configuration file (~/.taprrc)
- Rate limiting (--rate 10/s)
- Comparison mode (diff between endpoints)
- Authentication helpers (OAuth, API keys)
- Stable API
- Comprehensive documentation
- Plugin system
- Web UI for results
Want a feature? Open an issue!
Tapr is built for developers by developers. Contributions are welcome and celebrated! 🎉
- 🐛 Report bugs - Open an issue
- 💡 Suggest features - Share your ideas
- 📝 Improve docs - Fix typos, add examples
- 🧪 Write tests - Increase coverage
- 🔧 Fix issues - Check good first issues
- ⭐ Star the repo - Show your support!
# Fork and clone
git clone https://github.com/YOUR_USERNAME/tapr.git
cd tapr
# Create a branch
git checkout -b feature/your-feature
# Make changes and test
go test ./...
go build -o tapr ./cmd/tapr/
# Format code
gofmt -w .
# Commit and push
git commit -m "Add your feature"
git push origin feature/your-feature
# Open a Pull Request on GitHubSee CONTRIBUTING.md for detailed guidelines.
- 💬 Discussions - Ask questions, share ideas
- 🐛 Issues - Report bugs, request features
- 📢 Twitter - Follow for updates
Tapr is released under the Apache License 2.0.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright 2025 Syed Muhammad Talha
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Built with ❤️ using: