egg_cli

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README ΒΆ

egg

egg_cli

A fast and simple command line interface for creating fullstack web applications with the egg framework. egg_cli provides an interactive setup wizard that scaffolds complete Go web applications with modern tooling, database integration, authentication, and frontend build configuration.

What is egg_cli?

egg_cli is a project generator that creates production-ready Go web applications with:

  • πŸš€ REST API with controllers and routes
  • πŸ—„οΈ Database integration with SQLC for type-safe queries
  • πŸ” Authentication services and middleware
  • 🐳 Docker setup for containerized deployment
  • ⚑ Frontend build system with RSBuild support
  • πŸ“ Organized project structure following Go best practices
  • πŸ› οΈ Development tools and configurations

Installation

From Go
go install github.com/adamkali/egg_cli@latest
Build from Source
git clone https://github.com/adamkali/egg_cli.git
cd egg_cli
make build

Quick Start

Creating a New Project

The init command launches an interactive wizard that guides you through setting up your new egg project:

egg_cli init

The wizard will ask you about:

  • Project name and description
  • Database configuration (PostgreSQL, MySQL, SQLite)
  • Authentication setup
  • Frontend framework choice (React/Svelte with RSBuild)
  • Additional libraries and tools
Using Environment Files

Skip the interactive wizard by providing a pre-configured environment file:

egg_cli init --env production.yaml

Commands

init

Creates a new egg project with the interactive setup wizard.

egg_cli init [flags]

Flags:

  • --env string: Use an existing environment configuration file
generate

Generates additional configuration files for existing projects. Useful for creating different environment configurations (development, staging, production).

egg_cli generate [flags]

Flags:

  • --env string: Base configuration file to extend
  • --name string: Name of the new configuration file

Example:

# Generate a production config based on development settings
egg_cli generate --env development.yaml --name production

Project Structure

egg_cli generates projects with this structure:

my-awesome-app/
β”œβ”€β”€ main.go                 # Application entry point
β”œβ”€β”€ Dockerfile             # Container configuration  
β”œβ”€β”€ docker-compose.yml     # Multi-service setup
β”œβ”€β”€ config/
β”‚   └── development.yaml   # Environment configuration
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ controllers/       # HTTP request handlers
β”‚   β”œβ”€β”€ models/           # Data models
β”‚   β”œβ”€β”€ services/         # Business logic
β”‚   └── middleware/       # HTTP middleware
β”œβ”€β”€ migrations/           # Database migrations
β”œβ”€β”€ queries/             # SQLC database queries
└── frontend/            # Frontend application (if selected)
    β”œβ”€β”€ src/
    └── rsbuild.config.js

Development

Building
make build
Running Tests
go test ./...
Development Dependencies
  • Go 1.21+
  • Make (for build automation)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: go test ./...
  5. Submit a pull request

License

MIT License. See LICENSE for details.

Support

Documentation ΒΆ

Overview ΒΆ

Copyright Β© 2025 Adam Kalinowski <adam.kalilarosa@proton.me>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories ΒΆ

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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