Deterministic Batch Derivation
Same seed + same input → same output. Perfect for regression testing and reproducible datasets.
Build requests from parameters or templates, produce HAR captures, and export to curl / wget / python / postman / xml / yaml / har / jsonl / csv / markdown / html / text.
# Install
go install github.com/cyberspacesec/request-mock-skills/cmd/request-mock@latest
# Generate one request → JSON envelope (AI-friendly)
request-mock generate -X POST -u https://api.example.com/login -d '{"u":"a"}' -f json
# Batch derivation, deterministic
request-mock generate -X GET -u https://api.example.com/users -n 50 --seed 42 -f jsonl
# Raw curl output
request-mock generate -X GET -u https://api.example.com/users -f curl --rawpackage main
import (
"fmt"
"github.com/cyberspacesec/request-mock-skills/pkg/mock"
)
func main() {
spec := mock.Login("https://api.example.com/login", "alice", "secret")
h, _ := mock.GenerateOne(spec)
curl, _ := mock.Export(h, mock.FormatCurl)
fmt.Println(curl)
}flowchart LR
A["Parameters / Templates"] --> B["RequestSpec"]
B --> C["Generate"]
C --> D["*har.Har"]
D --> E["Export"]
E --> F1["curl / wget / python"]
E --> F2["postman / xml / yaml"]
E --> F3["har / jsonl / csv"]
E --> F4["markdown / html / text"]
D -.optional.-> P["Split / Dedup / AddHeaders / Clone"]
P --> E--raw for humans