Help us shape the future of Go! Take the 2026 Go Developer Survey

go-aether

command module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 9 Imported by: 0

README ยถ

๐Ÿš€ go-aether

A Zero-Runtime, Domain-First Scaffolding CLI Engine for Production-Grade Go Backends.

Go Version Release License


go-aether is a developer-first CLI scaffolding engine designed for Go Backend Engineers and Enterprise Architects. It eliminates the friction of boilerplate construction by generating production-grade, strictly typed code across multiple architectural styles โ€” including Hexagonal (Ports & Adapters), Domain-Driven Design (DDD), CQRS, Distributed Systems, Fintech, and Realtime Protocols โ€” in milliseconds.

Unlike opinionated frameworks, go-aether is strictly a Dev-Time Scaffolding Tool. It embeds clean standard text/template files into a single self-contained binary, generating pure, unencumbered Go code with zero runtime lock-in.


โœจ Core Highlights

  • ๐Ÿ—๏ธ Domain-First Scaffolding: 90 commands organized into semantic groups (arch:*, db:*, api:*, security:*, fintech:*, etc.)
  • โšก Zero-Runtime Overhead: All generated code is 100% native Go โ€” no external runtime frameworks, no hidden dependencies.
  • ๐Ÿ›ก๏ธ Transactional Disk Buffer: Atomic multi-file generation with automatic rollback on error. Your filesystem is never left in a partial state.
  • ๐Ÿฉบ Structural Health Check: Built-in doctor command for AST-based diagnostics against the Single Source of Truth (aether.yaml).
  • ๐Ÿ”„ Enterprise Patterns Built-In: CQRS, Transactional Outbox, Distributed Saga, Unit of Work, and more โ€” generated with a single command.
  • ๐Ÿ”’ Security & Observability First: Scaffold OpenTelemetry tracing, Prometheus metrics, Argon2id hashing, Casbin RBAC, and Zero-Trust patterns out of the box.
  • ๐Ÿ›ก๏ธ Brownfield Adoption: Scan existing Go codebases and seamlessly integrate them into the Aether manifest.

๐ŸŒŸ What's New in v0.2.0

go-aether v0.2.0 introduces massive DX and safety improvements for Enterprise Architects:

  • ๐ŸŽฎ Universal TUI Fallback: Over 40+ granular CLI commands now feature an interactive Text User Interface (TUI) fallback using charmbracelet/huh. Forgot an argument? Aether will elegantly prompt you for it instead of throwing a generic error, all while preserving standard flag support for CI/CD environments.
  • โš›๏ธ Atomic Unit-of-Work (UOW) Disk Buffer: File generation is now fully transactional. Aether writes all changes to a virtual buffer first. If any step fails (e.g. disk full, permission error), it atomically rolls back all changes and restores overwritten files via .bak backups, guaranteeing your filesystem is never left in a partial state.
  • ๐Ÿง  Context Memory: Aether intelligently remembers user context across commands, reducing repetitive keystrokes.
  • ๐Ÿฉบ Doctor Health Checks: Use aether doctor to perform robust structural AST diagnostics against your domain manifest.

๐Ÿš€ Installation

go install github.com/muhananaufal/go-aether@latest

Ensure $(go env GOPATH)/bin is in your system $PATH.


๐Ÿ“– Quick Start

1. Initialize a New Project

Bootstrap a clean architecture workspace and generate the master aether.yaml manifest:

mkdir my-service && cd my-service
go-aether init my-service --arch hexagonal --router chi --db postgres

2. Scaffold a Domain Module

Generate a complete vertical slice (order) โ€” Domain Entity, Port Interface, Service, HTTP Handler, and Postgres Repository:

go-aether arch:module order --transports http

3. Add Enterprise Patterns

# Add CQRS Command & Query Bus for the order domain
go-aether platform:cqrs order

# Add Transactional Outbox + SQL migrations
go-aether async:outbox

# Add Distributed Saga with compensation workflow
go-aether async:saga checkout

# Add Unit of Work transactional orchestrator
go-aether db:uow

# Add Read/Write database replica splitter
go-aether db:readreplica

4. Add Security & Observability

go-aether security:auth oauth2
go-aether security:argon2
go-aether o11y:tracing otel
go-aether o11y:metrics prometheus
go-aether infra:healthcheck

5. Run Structural Diagnostics

go-aether doctor

๐Ÿšฉ Important Command Flags

While go-aether has many commands, most core scaffolding commands share a common set of flags.

Project Lifecycle

  • init : --module, --arch, --db, --router
  • adopt : --scan (perform interactive anomaly directory scanning)
  • doctor : --fix (attempt automatic remediation of manifest inconsistencies)

Module Scaffolding (arch:module)

  • --transports : Comma-separated transport targets (e.g., http,grpc,nats; default: http).
  • --cache : Inject L1/L2 Redis caching decorators into the repository layer.
  • --worker : Scaffold async worker job processor for domain events.

Specific Capabilities

  • arch:handler : --transport (Transport protocol target, e.g. http, grpc)
  • test:stress : --engine / -e (Load testing engine: k6 or vegeta)

Global Flags (Available on all commands)

  • --dry-run : Simulate generation and print to stdout without writing to disk.
  • --force / -f : Force overwrite existing generated files.
  • --verbose / -v : Enable verbose structured logging output for debugging.

๐Ÿ—บ๏ธ Complete Command Reference (v0.9.0 โ€” 90 Commands)

โš™๏ธ Core Lifecycle

Command Description
init [name] Bootstrap project layout and aether.yaml manifest
adopt Scan and adopt a legacy brownfield Go repository
doctor Run structural health diagnostics against aether.yaml
ls List active modules, architectural paths, and installed plugins

๐Ÿ—๏ธ Architecture Scaffolding (arch:*)

Command Description
arch:module [name] Scaffold a complete vertical domain slice (Domain, Port, Service, Handler, Repo)
arch:domain [name] Scaffold the domain layer entity only
arch:port [name] Scaffold the port interface contract only
arch:service [name] Scaffold the service layer only
arch:handler [name] Scaffold the transport handler only
arch:repository [name] Scaffold the infrastructure repository only
arch:aggregate [name] Generate a DDD Aggregate Root with event recording
arch:event [name] Generate a Domain Event struct and serializer
arch:valueobject [name] Generate an immutable DDD Value Object
arch:command [name] Generate a CQRS Command DTO and execution handler
arch:query [name] Generate a CQRS Query DTO and read-model handler
arch:mock [interface] Scaffold an interface mock via Mockery for isolated unit tests
arch:pipeline [name] Generate a Fan-Out / Fan-In bounded concurrency pipeline
arch:specification [name] Generate a DDD Specification pattern for dynamic query rules
arch:di [type] Set up a Dependency Injection container (fx, wire)
arch:error Set up a standardized centralized error handler

๐Ÿ—„๏ธ Database & Persistence (db:*)

Command Description
db:migration [name] Generate a SQL migration file pair (up/down)
db:seeder [name] Generate a database seeder file
db:sqlc Set up SQLC type-safe query code generator
db:uow Set up Unit of Work transactional orchestrator
db:readreplica Set up Primary-Write / Replica-Read connection pool splitter
db:paginator Generate a cursor-based opaque base64 pagination helper

๐ŸŒ API Layer (api:*)

Command Description
api:graphql Set up gqlgen GraphQL server with DataLoader boilerplate
api:openapi Set up Swagger / OpenAPI 3.0 documentation middleware
api:grpc Set up gRPC bi-directional duplex streaming handler
api:grpc-gateway Set up gRPC-Gateway REST/JSON reverse-proxy
api:middleware [jwt|rate-limit|audit-log] Inject a middleware (jwt-auth, rate-limit, etc) into a module handler
api:transport [http|grpc|graphql] Register a new global transport protocol in aether.yaml
api:validator [playground] Set up struct validation wrapper (playground)
api:idempotency [redis] Set up Idempotency-Key validation middleware

โšก Realtime Protocols (realtime:*)

Command Description
realtime:ws [gorilla] Set up WebSocket hub and connection pool
realtime:sse Set up Server-Sent Events (SSE) streaming broker
realtime:webrtc [pion] Set up Pion WebRTC peer-to-peer data channel hub
realtime:mqtt [paho] Set up Paho MQTT client for IoT telemetry

๐Ÿ“จ Async Messaging & Events (async:*)

Command Description
async:worker [name] Generate an asynchronous background job processor
async:cron [job-name] Set up in-process recurring cron scheduler
async:outbox Set up Transactional Outbox pattern with SQL migrations
async:saga [workflow] Set up Distributed Saga orchestrator with compensation
async:eventing Set up global Pub/Sub event bus interfaces
async:webhook Set up HMAC-SHA256 signed webhook dispatcher

๐Ÿ” Security & Zero-Trust (security:*)

Command Description
security:auth [oauth2|apikey|jwt] Set up authentication middleware
security:authz [casbin] Set up RBAC / ABAC authorization engine (Casbin)
security:oauth2 [google|github] Set up OIDC/OAuth2 login with PKCE state verification
security:argon2 Set up GPU-resistant Argon2id password hasher
security:crypto [aes-gcm|chacha20] Set up symmetric envelope encryption
security:secrets [vault|aws-sm] Set up secret manager client
security:auditlog Set up tamper-evident immutable audit log with PII scrubbing

๐Ÿ’พ Caching Layer (cache:*)

Command Description
cache:redis [redis|valkey] Set up global cache layer
cache:multilevel Set up synchronized L1 (memory) + L2 (Redis) cache
cache:bloom Set up probabilistic Bloom Filter cache penetration guard
cache:dedup Set up Singleflight request deduplication (anti thundering herd)

๐Ÿญ Infrastructure & DevOps (infra:*)

Command Description
infra:cicd [github|gitlab] Set up CI/CD pipelines
infra:deploy [k8s|helm|lambda|docker] Set up deployment manifests
infra:healthcheck Set up Kubernetes Liveness /livez and Readiness /readyz probes
infra:drain Set up zero-downtime graceful shutdown and draining manager
infra:profiling [pprof] Set up protected runtime profiling endpoints
infra:lint Set up golangci-lint configuration and git pre-commit hooks
infra:featureflags [flipt] Set up feature flags and canary release client
infra:config [viper|koanf] Set up centralized config manager
infra:search [elasticsearch|meilisearch] Set up full-text search engine client

๐Ÿ“Š Observability (o11y:*)

Command Description
o11y:tracing [jaeger|stdout|otlp] Set up OpenTelemetry distributed tracing
o11y:metrics [prometheus] Set up Prometheus RED metrics middleware and endpoint
o11y:logger [slog|zap] Set up structured JSON logger with trace correlation

๐Ÿ’ฐ Fintech & Financial Reliability (fintech:*)

Command Description
fintech:ledger Set up Double-Entry bookkeeping ledger engine
fintech:decimal Set up high-precision decimal money arithmetic helpers
fintech:reconcile Set up automated settlement and transaction reconciliation
fintech:pricing Set up rule-based tiered pricing and fee calculation engine

๐Ÿ“ฃ Notifications & Communication (notif:*)

Command Description
notif:sms Set up Twilio SMS and WhatsApp omni-channel messaging
notif:push Set up Firebase Auth and FCM push notifications
notif:mail [smtp|resend|sendgrid] Set up transactional email client

โ˜๏ธ Cloud Storage (cloud:*)

Command Description
cloud:s3 [aws|minio] Set up S3 object storage client with pre-signed URL generator
cloud:storage [s3|gcs|local] Set up cloud blob storage adapter

๐ŸŒ Distributed Platform (platform:*)

Command Description
platform:discovery [consul|etcd] Set up service discovery client
platform:lock [redis] Set up distributed Redlock mutex engine
platform:resilience [resilience4go] Set up Circuit Breaker and Bulkhead resilience engine
platform:cqrs [module] Set up CQRS Command and Query handlers for a module
platform:multitenancy [module] Set up Row Level Security (RLS) SQL tenant isolation
platform:tenant Set up tenant context middleware and isolation helper
platform:ai [openai|ollama] Set up LLM proxy infrastructure

๐Ÿงช Testing & QA Engine (test:*)

Command Description
test:stress Scaffold high-concurrency load testing suite (k6 / Vegeta)
test:chaos Scaffold chaos engineering fault injection middleware
test:fuzz Scaffold Go native continuous fuzz testing harness
test:mutation Scaffold mutation testing verification runner
test:benchmark Scaffold micro-benchmark suite and memory allocation profiler
test:container Scaffold Testcontainers integration testing (PostgreSQL + Redis)
test:integration Set up integration test helpers and mocking base

๐Ÿ“‚ Generated Project Layout

my-service/
โ”œโ”€โ”€ aether.yaml                     <- Single Source of Truth Manifest
โ”œโ”€โ”€ cmd/
โ”‚   โ””โ”€โ”€ api/
โ”‚       โ””โ”€โ”€ main.go                 <- Application Entrypoint
โ”œโ”€โ”€ internal/
โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ domain/                 <- Pure Business Logic & Entities
โ”‚   โ”‚   โ”œโ”€โ”€ port/                   <- Inbound & Outbound Interface Contracts
โ”‚   โ”‚   โ””โ”€โ”€ service/                <- Use Cases & Application Orchestration
โ”‚   โ”œโ”€โ”€ adapter/
โ”‚   โ”‚   โ”œโ”€โ”€ handler/http/           <- HTTP Controllers
โ”‚   โ”‚   โ””โ”€โ”€ repository/             <- Database Implementations
โ”‚   โ”œโ”€โ”€ jobs/                       <- Background Cron Workloads
โ”‚   โ””โ”€โ”€ workflows/                  <- Saga Orchestration Workflows
โ”œโ”€โ”€ pkg/
โ”‚   โ”œโ”€โ”€ auth/                       <- OAuth2 & API Key Validators
โ”‚   โ”œโ”€โ”€ cache/                      <- L1/L2 Multi-Level Cache
โ”‚   โ”œโ”€โ”€ concurrency/                <- Pipeline & Singleflight Helpers
โ”‚   โ”œโ”€โ”€ middleware/                  <- Metrics, Audit Log, Rate Limit
โ”‚   โ”œโ”€โ”€ security/                   <- Argon2id, Crypto, Secrets
โ”‚   โ”œโ”€โ”€ server/                     <- Drain & Health Check Handlers
โ”‚   โ””โ”€โ”€ tenant/                     <- Multi-Tenant Context Isolation
โ””โ”€โ”€ migrations/                     <- SQL Migrations (Up/Down)

๐Ÿ“œ License

This project is open-sourced under the MIT License ยฉ 2026 muhananaufal.

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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