{"id":37202919,"url":"https://github.com/luigimorel/gogen","last_synced_at":"2026-01-14T23:24:34.850Z","repository":{"id":313643977,"uuid":"1052084224","full_name":"luigimorel/gogen","owner":"luigimorel","description":"Generate fullstack Go projects with a single command. ","archived":false,"fork":false,"pushed_at":"2025-11-23T19:53:18.000Z","size":66,"stargazers_count":7,"open_issues_count":4,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-23T21:20:49.809Z","etag":null,"topics":["docker","go","golang","hacktoberfest","reactjs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luigimorel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-07T11:23:50.000Z","updated_at":"2025-11-23T19:53:18.000Z","dependencies_parsed_at":"2025-10-01T09:16:49.120Z","dependency_job_id":"a1841f7b-72e0-47a6-9abb-371abac2954d","html_url":"https://github.com/luigimorel/gogen","commit_stats":null,"previous_names":["luigimorel/gogen"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/luigimorel/gogen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luigimorel%2Fgogen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luigimorel%2Fgogen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luigimorel%2Fgogen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luigimorel%2Fgogen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luigimorel","download_url":"https://codeload.github.com/luigimorel/gogen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luigimorel%2Fgogen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28437981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","go","golang","hacktoberfest","reactjs"],"created_at":"2026-01-14T23:24:34.267Z","updated_at":"2026-01-14T23:24:34.836Z","avatar_url":"https://github.com/luigimorel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gogen\n\nA fast and simple CLI tool for generating Go project boilerplates.\n\n## Installation\n\n### Quick Install\n\n```bash\n# Build from source\ngit clone https://github.com/luigimorel/gogen.git\ncd gogen\nmake build\n```\n\n### Using Go Install\n\n```bash\ngo install github.com/luigimorel/gogen@latest\n```\n\n### Using the CLI (Self-Install)\n\nAfter building or downloading the binary, gogen can install itself to your system PATH:\n\n```bash\n# Auto-detect best installation method for your system\n./gogen install\n\n# Force reinstallation if already installed\n./gogen install --force\n```\n\nThe install command supports:\n\n- **Linux/macOS**: Installs to `~/.local/bin` with PATH configuration help\n- **Windows**: Installs to `%USERPROFILE%\\AppData\\Local\\gogen` with PATH setup instructions\n- **Auto-detection**: Automatically chooses the best method for your system\n\n## Usage\n\n### Global Commands and Flags\n\n```bash\ngogen --help                # Show all available commands\ngogen -h                    # Short form of help\ngogen --version             # Show version information\ngogen -v                    # Short form of version\n```\n\n### Global Flags (Available for all commands)\n\n| Flag        | Short | Description               | Default |\n| ----------- | ----- | ------------------------- | ------- |\n| `--help`    | `-h`  | Show help for the command | false   |\n| `--version` | `-v`  | Show version information  | false   |\n| `--verbose` |       | Enable verbose output     | false   |\n\n### Create a New Project\n\nThe `new` command creates a new Go project with proper structure and initialization.\n\n#### Basic Usage\n\nGenerate an API server (default):\n\n```bash\ngogen new --name my-project\n```\n\nGenerate a CLI application:\n\n```bash\ngogen new --name my-cli --template cli\n```\n\nGenerate a web server:\n\n```bash\ngogen new --name my-web-app --template web\n```\n\n#### Advanced Usage\n\nCreate a web project with React frontend:\n\n```bash\ngogen new --name my-fullstack --template web --frontend react\n```\n\nCreate a web project with Vue.js and TypeScript:\n\n```bash\ngogen new --name my-vue-app --template web --frontend vue --ts\n```\n\nCreate an API with Chi router:\n\n```bash\ngogen new --name my-api --template api --router chi\n```\n\nCreate a fullstack project with Chi router, docker, bun runtime and React for the frontend:\n\n```bash\ngogen new --name my-app --docker --template web --router chi --ts\n```\n\nSpecify custom module name and directory:\n\n```bash\ngogen new --name my-project --module github.com/username/my-project --dir custom-dir\n```\n\n#### New Command - All Flags\n\n```bash\ngogen new --help\n```\n\n| Flag           | Short  | Description                                    | Default      |\n| -------------- | ------ | ---------------------------------------------- | ------------ |\n| `--name`       | `-n`   | Project name                                   |              |\n| `--module`     | `-m`   | Go module path                                 | project name |\n| `--template`   | `-t`   | Project template (api, web, cli)               | \"api\"        |\n| `--router`     | `-r`   | Router type (stdlib, chi, gorilla, httprouter) | \"stdlib\"     |\n| `--frontend`   | `--fe` | Frontend framework (react, vue, svelte, etc.)  |              |\n| `--dir`        | `-d`   | Directory name for the project                 | project name |\n| `--typescript` | `--ts` | Use TypeScript for frontend projects           | false        |\n| `--docker`     |        | Create dockerfiles and dockercompose           | false        |\n\n#### Available Templates\n\n- **api** (default) - REST API server with JSON responses\n- **cli** - CLI application using urfave/cli/v2\n- **web** - HTTP web server with optional frontend integration\n\n#### Available Routers\n\n- **stdlib** (default) - Go standard library http.ServeMux\n- **chi** - Chi lightweight router with middleware support\n- **gorilla** - Gorilla Mux with advanced routing features\n- **httprouter** - High-performance HttpRouter\n\n#### Available Frontend Frameworks\n\n- **react** - React with Vite build tool\n- **vue** - Vue.js with Vite\n- **svelte** - Svelte with Vite\n- **solidjs** - SolidJS with Vite\n- **angular** - Angular with Angular CLI\n\n### Install gogen to System PATH\n\nThe `install` command automatically installs gogen to your system PATH for easy access from anywhere.\n\n```bash\n# Auto-detect best installation method\ngogen install\n\n# Force reinstallation\ngogen install --force\n\n# Specify installation method\ngogen install --method binary\n```\n\n#### Router Features\n\n- **stdlib** - Go standard library http.ServeMux with pattern matching\n- **chi** - Lightweight router with built-in middleware (Logger, Recoverer, RequestID)\n- **gorilla** - Full-featured router with path variables and advanced matching\n- **httprouter** - Ultra-fast router with zero memory allocation and path parameters\n\n#### Frontend Framework Details\n\n- **react** - React 18+ with Vite, hot reloading, and modern tooling\n- **vue** - Vue 3 with Composition API, Vite, and TypeScript support\n- **svelte** - Svelte with SvelteKit and Vite integration\n- **solidjs** - SolidJS with fine-grained reactivity and Vite\n- **angular** - Angular with CLI, TypeScript, and modern build tools\n\n## Examples\n\n### Full-Stack Web Application\n\nCreate a complete full-stack application with Go backend and React frontend:\n\n```bash\n# Create web project with React frontend and all features\ngogen new --name my-app --template web --frontend react --typescript \\\n  --router chi --cors --auth --logging --tailwind --testing\n\ncd my-app\n\n# Start the API server (in one terminal)\ncd api\ngo run main.go\n\n# Start the frontend dev server (in another terminal)\ncd frontend\nnpm run dev\n```\n\n### Microservice API\n\nCreate a high-performance API service with comprehensive features:\n\n```bash\n# Create API project with full microservice setup\ngogen new --name my-service --template microservice --router gin \\\n  --module github.com/company/my-service --middleware --cors \\\n  --metrics --rate-limit --swagger --docker\n\ncd my-service\ngo run main.go\n\n# Test the API\ncurl http://localhost:8080/\ncurl http://localhost:8080/health\n```\n\n### CLI Application\n\nCreate a comprehensive CLI tool:\n\n```bash\ngogen new --name my-cli --template cli --module github.com/company/my-cli\n\ncd my-cli\ngo run main.go --help\n```\n\n## Quick Reference\n\n### Commands\n\n| Command         | Description           | Example                                 |\n| --------------- | --------------------- | --------------------------------------- |\n| `gogen new`     | Create a new project  | `gogen new -n my-app -t web --fe react` |\n| `gogen install` | Install gogen to PATH | `gogen install --force`                 |\n\n### Templates\n\n| Template | Description     | Use Case                          |\n| -------- | --------------- | --------------------------------- |\n| `api`    | REST API server | Microservices, APIs, backends     |\n| `web`    | Web server      | Full-stack applications, websites |\n| `cli`    | CLI application | Command-line tools, utilities     |\n\n### Routers\n\n| Router       | Description                 | Best For                      |\n| ------------ | --------------------------- | ----------------------------- |\n| `stdlib`     | Go standard library         | Simple applications, learning |\n| `chi`        | Lightweight with middleware | Most web applications         |\n| `gorilla`    | Full-featured router        | Complex routing requirements  |\n| `httprouter` | High-performance            | High-throughput APIs          |\n\n### Frontend Frameworks\n\n| Framework | Description      | TypeScript | Build Tool  | State Management |\n| --------- | ---------------- | ---------- | ----------- | ---------------- |\n| `react`   | React 18+        | ✅         | Vite        | Redux, Zustand   |\n| `vue`     | Vue 3            | ✅         | Vite        | Pinia, Vuex      |\n| `svelte`  | Svelte/SvelteKit | ✅         | Vite        | Svelte stores    |\n| `solidjs` | SolidJS          | ✅         | Vite        | Built-in stores  |\n| `angular` | Angular          | ✅         | Angular CLI | NgRx, Services   |\n\n## Development\n\n### Prerequisites\n\n- Go 1.21.13 or later\n- Make (optional, for build automation)\n- Node.js and npm (required for frontend features)\n\n### Building from Source\n\n```bash\ngit clone https://github.com/luigimorel/gogen.git\ncd gogen\nmake build\n```\n\n### Development Workflow\n\n```bash\n# Run in development mode with hot reloading\nmake dev\n\n# Run tests\nmake test\n\n# Format and lint code\nmake check\n\n# Build for all platforms\nmake build-all\n```\n\n### Available Make Commands\n\n- `make build` - Build the application\n- `make run` - Build and run the application\n- `make dev` - Start development server with hot reloading\n- `make test` - Run tests\n- `make fmt` - Format code\n- `make lint` - Lint code\n- `make vet` - Vet code\n- `make check` - Run all code quality checks\n- `make clean` - Clean build artifacts\n- `make build-all` - Build for multiple platforms\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Run tests and checks (`make check test`)\n5. Commit your changes (`git commit -m 'Add amazing feature'`)\n6. Push to the branch (`git push origin feature/amazing-feature`)\n7. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluigimorel%2Fgogen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluigimorel%2Fgogen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluigimorel%2Fgogen/lists"}