forge

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 7 Imported by: 0

README

Forge Logo

Forge

A CLI for automated git version tagging and changelog generation. Supports SemVer, CalVer, and monorepo workflows.

I built this for my personal projects to handle versioning without the hassle.

What It Does

  • Version Management: SemVer and CalVer (with ISO week support)
  • Monorepo Support: Per-app versioning with namespaced tags
  • Changelog Generation: Parses conventional commits
  • Interactive CLI: Quick bumps with Bubble Tea UI
  • Build & Docker: Basic cross-compilation and image builds

Note on Builds: I highly recommend using GoReleaser for production builds. The build features here are basic and meant for my personal projects. Forge excels at version management - use it for tagging, then let GoReleaser handle the heavy lifting.

⚠️ ALPHA Features: The pre (prerelease) and meta (build metadata) configuration options are in early alpha state and not fully implemented. Do not use these in production environments.

Quick Start

# Install
go install github.com/alexjoedt/forge@latest

# Initialize
forge init

# Bump version (interactive)
forge bump

# Or direct
forge bump minor --push

Core Commands

forge bump [major|minor|patch]    # Create version tag
forge version                     # Show current version(s)
forge changelog                   # Generate changelog
forge validate                    # Check config and git state
forge build                       # Simple cross-compilation (use GoReleaser instead)
forge docker                      # Build Docker images

Configuration

Minimal forge.yaml:

version:
  scheme: semver    # or: calver
  prefix: v

git:
  tag_prefix: v
  default_branch: main

Monorepo:

defaultApp: api

api:
  version:
    scheme: semver
    prefix: v
  git:
    tag_prefix: api/v
    default_branch: main

worker:
  version:
    scheme: calver
    calver_format: "2006.WW"  # Year.Week
  git:
    tag_prefix: worker/
    default_branch: main

Workflow

# Make changes
git commit -m "feat: new feature"

# Tag version
forge bump minor --push

# Generate changelog
forge changelog --output CHANGELOG.md

# Build with GoReleaser (recommended)
goreleaser release

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
git
log
run

Jump to

Keyboard shortcuts

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