Skip to content

About

A small CLI to maintain a VERSION file for an application. That version file can track the semver of the application and the CLI nature of the application allows it to easily be integrated into build tooling.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

134 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Versionator

A semantic version management CLI tool that manages versions in a plain text VERSION file.

Documentation: https://benjaminabbitt.github.io/versionator/

Features

  • Single source of truth: Plain text VERSION file
  • SemVer 2.0.0 compliant: Full support for pre-release and build metadata
  • Deliberate version control: Explicit major/minor/patch commands for teams who prefer manual versioning
  • Auto-bump available: Optional commit message parsing via bump command (+semver: tags or Conventional Commits)
  • Code embedding: Generate version constants for 10+ languages
  • CI/CD integration: Output version variables for GitHub Actions, GitLab CI, etc.
  • Git integration: Create tags and release branches

Language Support

Generate version constants for your codebase (sorted by TIOBE Index):

Language Format Documentation
Python python _version.py
C c, c-header version.c, version.h
C++ cpp, cpp-header version.cpp, version.hpp
Java java Version.java
C# csharp Version.cs
JavaScript js version.js
Go go version.go
TypeScript ts version.ts
PHP php Version.php
Swift swift Version.swift
Kotlin kotlin Version.kt
Rust rust version.rs
Ruby ruby version.rb

Data formats: JSON (json), YAML (yaml) — see emit command

Container files: Docker — Containerfile/Dockerfile with OCI labels

Documentation

Full documentation: https://benjaminabbitt.github.io/versionator/

Quick Install

# Linux (x64)
curl -LO https://github.com/benjaminabbitt/versionator/releases/latest/download/versionator-linux-amd64.tar.gz
tar xzf versionator-linux-amd64.tar.gz
sudo mv versionator-linux-amd64 /usr/local/bin/versionator

# Or use container (Docker/Podman)
docker run --rm -v $(pwd):/workspace ghcr.io/benjaminabbitt/versionator version

See Installation for all platforms.

Quick Start

versionator init        # Create VERSION file (0.0.1)
versionator patch +     # 0.0.1 -> 0.0.2  (aliases: increment, inc, +)
versionator release     # Create tag v0.0.2

About This Project

Versionator is a hobby project solving a real problem. It could be solved with less—a regex parses most version strings just fine. Instead, there's a 370-line formal EBNF grammar covering SemVer, Go pseudo-versions, .NET assembly versions, and more. Written on a Sunday afternoon because formal grammars are fun and passion projects permit glorious digressions.

The grammar might have value to someone, sometime. If it doesn't, that's fine too. It has value to me.

See Grammar-Based Parser for the full philosophy.

License

BSD-3-Clause

About

A small CLI to maintain a VERSION file for an application. That version file can track the semver of the application and the CLI nature of the application allows it to easily be integrated into build tooling.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages