A Golang module packaging tool that clones your repos, filters code, and streams zip files for each tagged module.
CONR helps developers assemble valid Go module zip archives without fuss— you specify the repositories, conr handles ephemeral clones, tag checkouts, and filtering.
Install CONR, then run one command to produce a Go module zip:
# Install conr
go install code.nicktrevino.com/conr/cmd/conr@latest
conr --mod ./cool-module --outDir ./dist --clean
Within ./dist, you’ll see a structured output for each discovered tag, including
zip archives (.zip) and accompanying metadata (.mod, .info).
This matches Go’s official module layout so that downstream tooling recognizes it.
--include and --exclude patterns..mod, .info, and list files for each tag, plus sets @latest..git/**/* and test files) as needed.--showSkips to see which files were excluded, or verify includes in real time.
CONR clones your repo, enumerates v* tags, then checks
each out in turn, copying relevant Go source files into a streamed zip.
We also build go.mod-like files (.mod), version info (.info),
and a list of tags, all structured in @v subdirectories.
Finally, @latest is updated to the newest version.
--mod for each repo or path. CONR clones them into fresh temp directories.v (e.g. v1.2.3), then sort them.list (containing all discovered tags), @latest, .mod, and .info so that Go tooling sees a valid module structure.--mod flags to process multiple repos concurrently.--include / --exclude or load patterns from --includeListFile / --excludeListFile to refine your build output..git/*) and test files (*_test.go), but you can skip these built-ins with --skipBuiltinExcludes.--vcs flag (default git) and an internal interface allow for future expansion to other version control systems.--clean to overwrite an existing output directory if needed, or --showSkips for debugging.
go-git and streaming archives with archive/zip.**/ expansions are turned into case-insensitive regex for precise file matching.Not exactly. We rely on Git under the hood, but CONR automates and abstracts the process of checking out tags, filtering, and archiving the code.
Some existing tools like gopack also offer packaging functionalities. The key differences with CONR are:
v* tags, and applies flexible --include / --exclude patterns..mod and .info files, plus version lists and @latest pointers, mirroring the Go proxy layout.