1. Why a release bundle is needed
If you are just starting out, it is very easy to fall into a trap: it feels like the goal of development is to get a file that runs. And that is true... for about the first half hour. Then reality starts asking questions, and they all sound like different versions of "what is this thing and how do I use it?". The user (or you, a week later) is not obliged to remember which flags the program has, which commands are supported, where to check the version, and what to do if "it does not start on Windows".
A release bundle is an attempt to be a polite engineer. We do not just hand over "here is the binary, good luck"; we hand over a small set of artifacts that answers the basic questions: what is it, how do I run it, how do I check the version, where can I see examples, what changed. It is a bit like giving someone a coffee grinder: sure, you can hand over only the motor and wires, but the manual and a couple of recipes somehow improve the odds that you will stay friends.
Release bundle as a delivery contract
The word "contract" here is not legal, but engineering. We define: anyone who downloaded our program must be able to do several things without telepathy. First, understand how to launch the program and where the help is. Second, understand which version the program is and for which platform it was built. Third, see short examples of typical usage. Fourth, understand what changed compared with the previous version (or at least see that "there were changes").
It is important that this contract works for you as well. In a month, you will be looking at the bug report "nothing works here", and suddenly the most useful question will be "can you show the output of todo --version". If the version is not embedded in the binary and not printed out, you start playing engineering roulette: "seems like it was a release... or not a release... or maybe I built it last week...".
Minimum release bundle contents
In this lecture we are not discussing specific archivers, installers, or publishing releases on services — that is a separate world where you can drown in buttons. We need a simple, clear, portable idea: a folder (or archive) containing predictable files.
It is convenient to think like this: there is a "core" (the binary) and a "wrapper" that makes the core suitable for life outside your laptop.
Below is the minimum set worth keeping in mind as the default.
| Element | Example name | Why it is needed | Important idea |
|---|---|---|---|
| Binary | or |
What runs | The name should distinguish platform and version |
| README | or |
"How to use it" + quickstart | README is the project interface for a human |
| Examples | |
Ready-made commands/scenarios | Examples save more time than "descriptions" |
| Notes | / |
"What changed" | Releases are usually accompanied by notes |
Pay attention: this is not a list "just to make it look nice", but the minimum set that turns launching into a predictable action. And yes, if you are thinking "I already understand everything", then congratulations — you are not you yet. Your future self will appreciate it.
2. What a bundle looks like for the todo project
From this point on, we will talk as if we have a training CLI application called todo (we are building it throughout the course): it can create tasks, show a list, mark tasks as completed, store data, and print all of that to stdout. We will not expand the functionality now; we will "package" what has already been done.
Imagine that we prepared release version 1.3.0 for Linux amd64. Then a release bundle can be thought of as a directory:
todo_1.3.0_linux_amd64/
todo
README.md
RELEASE_NOTES.md
examples/
quickstart.txt
demo-session.txt
And for Windows:
todo_1.3.0_windows_amd64/
todo.exe
README.md
RELEASE_NOTES.md
examples/
quickstart.txt
demo-session.txt
Even without archives and a "real release process", the main point is already visible: the user opened the folder and understood where to look.
5. Naming artifacts
When you make one binary "for yourself", you can name it anything you like, even a.out or final_final2_really. But as soon as more than one artifact appears, confusion starts: which one is for macOS, which one for Linux, which one is new, which one is old, and why does one not start (spoiler: because you are trying to run a binary built for a different architecture).
That is why in releases we aim for a boring but informative naming scheme:
- application name (todo)
- version (1.3.0)
- target OS (linux, windows, darwin)
- architecture (amd64, arm64)
- the .exe extension for Windows
This can be assembled into a string in Go (we already had the idea earlier), and it is useful to keep the logic in one place so you do not have to search the project for 12 different formats later.
A small example (we are not making it complicated, just showing the idea; this may live in internal/buildinfo or nearby):
package buildinfo
import (
"fmt"
"runtime"
)
func ArtifactName(app, version string) string {
return fmt.Sprintf("%s_%s_%s_%s", app, version, runtime.GOOS, runtime.GOARCH)
}
If you call this and print it, you get something like:
package main
import (
"fmt"
"example.com/todo/internal/buildinfo"
)
func main() {
fmt.Println(buildinfo.ArtifactName("todo", "1.3.0")) // todo_1.3.0_linux_amd64
}
The point is not to generate release names directly inside the application (although that is sometimes useful), but to get used to the format and stop relying on memory.
6. README: what matters in it
Many people write README files on the "as long as there is one" principle. You end up with a file that says: "This is the todo application. It does todo." Thanks, of course, but that is like a microwave manual saying "Heats food".
A good README for a CLI is a short roadmap. It has one main goal: so that a person seeing the project for the first time can, in 2–3 minutes:
- run the binary,
- see the help,
- execute one typical scenario,
- understand where to look for the version,
- understand where to write if everything breaks (or at least what to attach to the message).
These blocks are almost always useful in a README:
- What it is (2–3 sentences, no novel).
- Quick start: 3–6 commands that can be copied.
- Help: how to see --help and --version.
- Where the examples are: a link to the examples/ folder.
- Limitations (if any): for example, "the data file is stored there".
To make this more tangible, here is a README "skeleton" (as text, not as dogma). Notice: this is not a "requirements list", but the minimum scenario of communication with a person.
# todo
A small CLI task tracker: add a task, show a list, mark it as completed.
## Quick start
1) Check the version:
todo --version
2) Check the help:
todo --help
3) Add a task:
todo add "buy milk"
4) Show the list:
todo list
In this format, README actually works: the user copies commands, gets a result, and starts trusting the tool. And yes, "trust" in a CLI is when it does not make you read its source code.
7. examples/: usage examples
The examples/ folder sounds optional until you try to explain to a user how to reproduce a problem. Examples are good because, first, they are "living documentation", and second, they establish the standard style of using your tool.
For our todo, a convenient example is a "demo session": a set of commands and the expected output (at least partially). Even if the user does not read the whole file, they will see the template: what commands exist and what they print.
An example file examples/quickstart.txt may look like ordinary text. Note: this is not Go code, so we are not compiling anything here — we are just showing "how to use it".
# Quickstart: todo
todo --version
todo --help
todo add "read the lecture about the release bundle"
todo list
todo done 1
todo list
The trick is that such examples can, if desired, be used as the basis for a manual smoke check: you open the file, run through the commands, and you can already see that the binary is "alive". Even if you are not building CI and automated release tests, the very habit of having a "launch scenario" in examples/ is very engineering-minded.
8. Release notes: RELEASE_NOTES.md
"Release notes" sounds serious, as if you have a company with a thousand people and a marketing department. In practice, it is just an honest answer to the question: "What changed?". For the Go world, this is normal culture: releases are accompanied by notes, and even the Go language itself regularly says in release announcements, "read the release notes".
For our todo, release notes can be short. What matters is not the amount of text, but the structure. A convenient format is version, date (if you record it), and a few lines by meaning.
Here is an example of what RELEASE_NOTES.md may look like:
# Release notes
## 1.3.0
Added:
- --version flag (shows version, commit, and build date)
Fixed:
- more accurate error messages when a task id is invalid
Changed:
- task list output is now more stable (sorting)
If you noticed, there are bullet points here — yes, sometimes it is genuinely worse without them: changes are easier to read "with your eyes moving line by line". Inside the lecture we generally avoid lists, but release notes are exactly the genre where short bullets are appropriate, because this is not "an explanation" but "a change log".
9. What the binary in the bundle must be able to do
This section matters because it connects "files next to each other" and "program behavior". From the user's point of view, a release bundle is not only README. It is also the confidence that the binary itself does not behave like a capricious cat: "I run today, I do not want to tomorrow".
Therefore, a CLI almost always should have two "diagnostic" branches that do not depend on the rest of the logic:
- --help (or the help command) — shows usage.
- --version — shows the version.
We have already done --version. What remains is to make sure --help is friendly too, and that help/usage does not hide important information.
Here is a small example of how you can connect flag.Usage to "About" from buildinfo. This is not "the one correct" option, but it clearly shows the idea: help is part of the contract.
package main
import (
"flag"
"fmt"
"os"
"example.com/todo/internal/buildinfo"
)
func main() {
flag.Usage = func() {
fmt.Fprintln(os.Stderr, buildinfo.About())
fmt.Fprintln(os.Stderr, "Usage: todo [flags] <cmd> [args]")
flag.PrintDefaults()
}
flag.Parse()
}
The user types todo --help and sees not a soulless "Usage", but also the product identity. And if they later send you a screenshot, you already have the version/commit right in that text.
A simple mental model of a release bundle for an engineer
It is useful to fix the model here so that you do not slip back into "I just built a binary". You can think of the process as an assembly line, even if you do it by hand in three commands.
flowchart TD
A[Sources + go.mod + dependencies] --> B[go build]
B --> C["Binary (target GOOS/GOARCH)"]
C --> D[Check: --version / --help]
D --> E[Release folder: binary + README + examples + notes]
The most interesting part here is the "check" step. Psychologically, it turns the binary into an artifact: you did not just get a file; you made sure that it describes itself and that there is a minimal "map of the terrain" nearby.
10. Typical mistakes when preparing a release bundle
Mistake #1: thinking that a release is "just upload the binary".
This usually ends with users writing "it does not work", and you starting to pull information out of them with pliers: which OS, which version, how did you run it. A release bundle is needed precisely so that the minimum answers are nearby: in README and in --version/--help.
Mistake #2: not distinguishing artifacts by platform and architecture.
When todo for linux/amd64 and todo for darwin/arm64 sit next to each other with the same name, someone will definitely run "the wrong one". And that will be the same person who later says "your Go is strange". The cure is boring but correct naming: app_version_GOOS_GOARCH, and .exe for Windows.
Mistake #3: making the README "about everything in the world", but without a copyable quickstart.
Paradoxically, a long description is worse than a short set of commands. The user does not want philosophy; they want "give me 3 commands to see a result". If there is no quickstart, people most often close the folder. Or open the source code. And then they do not close it anymore... because they are fixing your UX.
Mistake #4: hiding examples in text instead of putting them in examples/.
When examples exist only inside README, they are harder to maintain and harder to reference in support: "open examples/demo-session.txt and run the commands". The examples/ folder creates the feeling that the project was used by "more than just the authors".
Mistake #5: not having release notes and then not remembering what changed.
This is a classic not only for users, but for the author too. You made a "small fix", shipped a new file, and two weeks later you cannot explain how 1.3.0 differs from 1.2.9. A short RELEASE_NOTES.md disciplines both you and the project.
GO TO FULL VERSION