diff --git a/go-junit-report.go b/go-junit-report.go
index b85ddf0..9375eb1 100644
--- a/go-junit-report.go
+++ b/go-junit-report.go
@@ -6,6 +6,7 @@ import (
 	"fmt"
 	"io"
 	"os"
+	"strings"
 	"time"
 
 	"github.com/jstemmer/go-junit-report/v2/pkg/gtr"
@@ -28,12 +29,14 @@ var (
 	input         = flag.String("in", "", "read go test log from file")
 	output        = flag.String("out", "", "write XML report to file")
 	iocopy        = flag.Bool("iocopy", false, "copy input to stdout; can only be used in conjunction with -out")
+	properties    = make(keyValueFlag)
 
 	// debug flags
 	printEvents = flag.Bool("debug.print-events", false, "print events generated by the go test parser")
 )
 
 func main() {
+	flag.Var(&properties, "prop", "add property to generated report; properties should be specified as \"key=value\"")
 	flag.Parse()
 	if *iocopy && *output == "" {
 		exitf("you must specify an output file with -out when using -iocopy")
@@ -76,6 +79,11 @@ func main() {
 		}
 	}
 	report := gtr.FromEvents(events, *packageName)
+	for i := range report.Packages {
+		for k, v := range properties {
+			report.Packages[i].AddProperty(k, v)
+		}
+	}
 
 	hostname, _ := os.Hostname() // ignore error
 	testsuites := junit.CreateFromReport(report, hostname, time.Now())
@@ -114,3 +122,26 @@ func exitf(msg string, args ...interface{}) {
 	}
 	os.Exit(2)
 }
+
+type keyValueFlag map[string]string
+
+func (f *keyValueFlag) String() string {
+	if f != nil {
+		var pairs []string
+		for k, v := range *f {
+			pairs = append(pairs, fmt.Sprintf("%s=%s", k, v))
+		}
+		return strings.Join(pairs, ",")
+	}
+	return ""
+}
+
+func (f *keyValueFlag) Set(value string) error {
+	idx := strings.IndexByte(value, '=')
+	if idx == -1 {
+		return fmt.Errorf("%v is not specified as \"key=value\"", value)
+	}
+	k, v := value[:idx], value[idx+1:]
+	(*f)[k] = v
+	return nil
+}