Quick Start

Upgrade Guide

Upgrade an existing GoLazy application from v0.1.13 to v0.1.14.

By Guillermo Alvarez - Published - Updated

Upgrade from v0.1.13

GoLazy v0.1.14 adds richer startup errors, SEO metadata, terminal progress helpers, and CLI setup improvements. Existing v0.1.13 applications can update the module and CLI without a required source rewrite.

Update the framework requirement:

go get golazy.dev@latest
go mod tidy

Read Install GoLazy for the current install and module setup flow.

Install or update the matching CLI so lazy new selects the latest sample application template:

curl -fsSL https://golazy.dev/install.sh | sh
lazy --version

Read Run With lazy for the development command and Full App for the generated application layout. The new Development guide collects the mise, service, asset-pipeline, Tailwind, and lazy workflow conventions in one place.

Context startup errors

lazyapp.Config.Context now supports an error-returning initializer:

func Context(ctx context.Context) (context.Context, error) {
    posts, err := postservice.New()
    if err != nil {
        return ctx, fmt.Errorf("initialize posts service: %w", err)
    }

    return postservice.WithContext(ctx, posts), nil
}

The previous func(context.Context) context.Context shape still works, so this is an optional cleanup for existing apps. Use the error-returning form when service construction, configuration loading, database connection setup, or other dependency initialization can fail. Read Application Startup and Context And Services.

CLI setup behavior

lazy new now checks https://golazy.dev/lazy.version before cloning a remote template. If a newer CLI is available, update first or pass --skip-update-check deliberately:

lazy new github.com/user/my_app
lazy new --version v0.1.13 github.com/user/old_app
lazy new --skip-update-check github.com/user/offline_app

Generated apps validate with the current go on PATH. Non-Go app-managed tool subprocesses, such as the package-manager work inside lazy js and lazy tailwind, still run through mise exec so tools installed by the app's mise.toml are available without opening a new shell.

lazy new also initializes a fresh Git repository and commits the generated checkout with a command-local GoLazy identity after validation succeeds.

SEO metadata

Apps that set social metadata can now include image alt text, image dimensions, and published timestamps:

c.SEOImageAlt("Hello post social preview")
c.PublishedTime(post.PublishedAt)
c.OpenGraph(lazyseo.OpenGraph{
    Image: "/posts/hello-og.png",
    ImageAlt: "Hello post social preview",
    ImageWidth: 1200,
    ImageHeight: 630,
})

Metadata can read matching optional model methods such as ImageAlt() string and PublishedTime() time.Time. Read Template Data And Helpers.

lazy upgrade

lazy upgrade now uses compact progress output for migration steps and keeps interactive conflict diffs or prompts in deliberate terminal takeovers. Automated migrations are still limited to the supported older generated-app paths through v0.1.13; the v0.1.13 -> v0.1.14 update is the manual module update above.

If you are upgrading from v0.1.12 or earlier, first read the v0.1.13 upgrade guide for control-plane probes, native desktop helper commands, the CLI vanity module path, and the first lazy upgrade migrations.