cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package cli provides the Helix project and module generator CLI tool (e.g. `helix new app`, `helix generate module`).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, opts BuildOptions) error

Build generates code and produces a static application binary.

func CreateMigration

func CreateMigration(ctx context.Context, opts CreateMigrationOptions) error

CreateMigration creates a timestamped migration file.

func Generate

func Generate(ctx context.Context, opts GenerateOptions) error

Generate runs Helix code generation for the configured directory tree.

func GenerateContext

func GenerateContext(ctx context.Context, opts GenerateContextOptions) error

GenerateContext creates a DDD-light Helix context scaffold.

func GenerateModule

func GenerateModule(ctx context.Context, opts GenerateModuleOptions) error

GenerateModule creates a conventional Helix module scaffold.

func GenerateWire

func GenerateWire(ctx context.Context, opts GenerateWireOptions) error

GenerateWire runs compile-time DI wiring generation for the configured tree.

func MigrateDown

func MigrateDown(ctx context.Context, opts MigrationOptions) error

MigrateDown rolls back the latest applied migration.

func MigrateUp

func MigrateUp(ctx context.Context, opts MigrationOptions) error

MigrateUp applies pending migrations.

func MigrationStatus

func MigrationStatus(ctx context.Context, opts MigrationOptions) error

MigrationStatus prints migration status.

func NewApp

func NewApp(ctx context.Context, opts NewAppOptions) error

NewApp creates a minimal Helix application scaffold.

func Run

func Run(ctx context.Context, opts RunOptions) error

Run starts the application with hot reload enabled.

Types

type BuildOptions

type BuildOptions struct {
	Dir    string
	Docker bool
}

BuildOptions configures the helix build entry point.

type CreateMigrationOptions

type CreateMigrationOptions struct {
	Dir  string
	Name string
}

CreateMigrationOptions configures the helix db migrate create entry point.

type GenerateContextOptions

type GenerateContextOptions struct {
	Dir  string
	Name string
}

GenerateContextOptions configures the helix generate context entry point.

type GenerateModuleOptions

type GenerateModuleOptions struct {
	Dir  string
	Name string
}

GenerateModuleOptions configures the helix generate module entry point.

type GenerateOptions

type GenerateOptions struct {
	Dir string
}

GenerateOptions configures the minimal helix generate entry point.

type GenerateWireOptions

type GenerateWireOptions struct {
	Dir string
}

GenerateWireOptions configures the helix generate wire entry point.

type MigrationOptions

type MigrationOptions struct {
	Dir         string
	DatabaseURL string
	Output      io.Writer
}

MigrationOptions configures helix db migrate execution entry points.

type NewAppOptions

type NewAppOptions struct {
	Dir              string
	Name             string
	HelixReplacePath string
}

NewAppOptions configures the helix new app entry point.

type RunOptions

type RunOptions struct {
	Dir  string
	Args []string
}

RunOptions configures the helix run entry point.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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