Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.01 KB

File metadata and controls

61 lines (41 loc) · 1.01 KB

platforma-cli

CLI tool for the Platforma framework - generates domain scaffolding.

Installation

go install github.com/platforma-dev/platforma-cli@latest

Usage

Generate a Domain

Scaffold a new domain with model, repository, service, and domain files:

platforma generate domain <domain-name>

Example:

platforma generate domain user

This creates the following structure in ./internal/<domain-name>:

  • model.go - Domain model
  • repository.go - Data access layer with migrations interface
  • service.go - Business logic layer
  • domain.go - Domain composition and factory

Version

Display the CLI version:

platforma --version
# or
platforma -v

Templates

Domain templates are located in internal/cli/templates/domain/. Modify these to customize the generated code structure.

Development

# Run from source
go run main.go generate domain mydomain

# Build
go build -o platforma

# Test
go test ./...

License

[License to be added]