Skip to Content
Getting StartedInstallation

Installation

GoFrame requires you to have at least Docker working and Golang installed

Install the CLI to generate a new project and run common tasks.

go install github.com/alexisvisco/goframe/cli/cmd/goframe@latest

Create a project in a new directory:

goframe init --gomod <go module name> [flags]

There are several options you can pass:

flagdescriptiondefault
—gomod, -gGo module name (required)-
—folder, -fProject folder name.
—db-name, -dSet the database (postgres, sqlite)postgres
—workerWorker type to use (only temporal supported)temporal
—maintainer, -mAdd maintainer-specific testing featuresfalse

This command scaffolds the folder structure, downloads dependencies and prepares a working cmd/app/main.go entry point.

Example:

goframe init --gomod github.com/myuser/myproject

Setup external services

After the installation successful, you can setup the docker-compose file:

docker compose up -d

Will setup the following services:

Run the application

You can run the application using the following command:

go run cmd/app/main.go

Run the CLI

GoFrame generates a CLI for you which is located in your application at cmd/cli/main.go. After building it, you can run it using:

bin/goframe --help

The generated CLI includes commands for:

  • Database operations: migrations, seeds, cleanup
  • Code generation: handlers, services, migrations, mailers, workers
  • Development tools: route listing, sync operations, i18n management
  • Tasks: custom task management

You can extend the CLI with your own commands. See the CLI documentation for more details.

Available CLI Commands

Once your project is set up, the generated CLI provides these main command groups:

  • db - Database operations (migrate, rollback, seeds, clean)
  • generate - Code generators (handler, service, migration, mailer, etc.)
  • task - Task management if any
  • routes - List application routes
  • sync - Synchronization operations
  • i18n - Internationalization management
  • refactor - Code refactoring utilities
  • sync - Synchronization operations (router, registries, mails …)
Last updated on