taggit

command module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

README

taggit

A CLI tool to publish semver releases from a git repository.

Overview

taggit is a command line tool written in Go that helps manage semantic versioning tags in a git repository. It provides commands for listing existing tags and creating new version tags at patch, minor, and major levels.

Getting Started

taggit can be installed via go install or downloaded from Releases.

Install
go install github.com/shoenig/taggit@latest

Commands

The taggit command line tool provides commands for managing version tags.

NAME:
  taggit

USAGE:
  taggit  [global options] [command [command options]] [arguments...]

VERSION:
  development

DESCRIPTION:
  Publish new versions of Go modules.

COMMANDS:
  list  - List tagged versions.
  zero  - Create initial v0.0.0 tag
  patch - Create an incremented patch version
  minor - Create an incremented minor version
  major - Create an incremented major version

GLOBALS:
--version/-V   boolean - print version information
--help/-h      boolean - print help message
list

The list command displays all semver-compatible tags in the repository, organized by base version.

$ taggit list
v0.1.0 |= v0.1.0 v0.1.0-alpha1
v0.2.0 |= v0.2.0-rc1 v0.2.0-r1+linux v0.2.0-r1+darwin
zero

The zero command creates the initial v0.0.0 tag. This must be done before any other version commands can be used.

$ taggit zero
taggit: created tag v0.0.0
patch

The patch command increments the patch level of the current latest version.

$ taggit patch
taggit: created tag v0.0.1

To create a pre-release version, provide the pre-release identifier as an argument:

$ taggit patch beta1
taggit: created tag v0.0.2-beta1

To add build metadata, use the -m or --meta flag:

$ taggit patch -m build123
taggit: created tag v0.0.2+build123
minor

The minor command increments the minor level of the current latest version.

$ taggit minor
taggit: created tag v0.1.0

Pre-release and metadata options work the same as with patch:

$ taggit minor alpha1
taggit: created tag v0.2.0-alpha1

$ taggit minor --meta=linux
taggit: created tag v0.2.0+linux
major

The major command increments the major level of the current latest version.

$ taggit major
taggit: created tag v1.0.0

Global Options

  • -V, --version - Print version information
  • -h, --help - Print help message

Contributing

The github.com/shoenig/taggit module is always improving. For bug fixes and new features please file an issue.

License

The github.com/shoenig/taggit module is open source under the BSD-3-Clause license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cli
tags
Package tags contains utility functions around organizing tags.
Package tags contains utility functions around organizing tags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL