✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!


Create Go App CLI

Create a new production-ready project with backend (Golang), frontend (JavaScript, TypeScript)
and deploy automation (Ansible, Docker) by running one CLI command.

Focus on writing code and thinking of business-logic! The CLI will take care of the rest.

cli version go version go cover go report license

⚡️ Quick start

First of all, download and install Go. Version 1.17 or higher is required.

If you're looking for the Create Go App CLI for Go 1.16, you can find it here.

Installation is done by using the go install command and rename installed binary in $GOPATH/bin:

go install github.com/create-go-app/cli/v3/cmd/cgapp

Also, macOS and GNU/Linux users available way to install via Homebrew:

# Tap a new formula:
brew tap create-go-app/cli

# Installation:
brew install create-go-app/cli/cgapp

Let's create a new project via interactive console UI (or CUI for short) in current folder:

cgapp create

Next, open the generated Ansible inventory file (called hosts.ini) and fill in the variables according to your server configuration. And you're ready to automatically deploy this project:

cgapp deploy

That's all you need to know to start! 🎉

🐳 Docker-way to quick start

If you don't want to install Create Go App CLI to your system, you feel free to using our official Docker image and run CLI from isolated container:

docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/cgapp:latest [COMMAND]

🔔 Please note: the deploy command is currently unavailable in this image.

📖 Project Wiki

The best way to better explore all the features of the Create Go App CLI is to read the project Wiki and take part in Discussions and/or Issues. Yes, the most frequently asked questions (FAQ) are also here.

⚙️ Commands & Options

create

CLI command for create a new project with the interactive console UI.

cgapp create [OPTION]
Option Description Type Default Required?
-t Enables to define custom backend and frontend templates. bool false No

cgapp_create

deploy

CLI command for deploy Docker containers with your project via Ansible to the remote server.

🔔 Make sure that you have Python 3.8+ and Ansible 2.9+ installed on your computer.

cgapp deploy [OPTION]
Option Description Type Default Required?
-k Prompt you to provide the remote user sudo password (a standard Ansible --ask-become-pass option). bool false No

cgapp_deploy

📝 Production-ready project templates

Backend

  • Backend template with Golang built-in net/http package:
    • net/http — simple REST API with CRUD and JWT auth.
  • Backend template with Fiber:
    • fiber — complex REST API with CRUD, JWT auth with renew token, DB and cache.

Frontend

  • Pure JavaScript frontend template:
    • vanilla — generated template with pure JavaScript app.
    • vanilla-ts — generated template with pure TypeScript app.
  • Frontend template with React:
    • react — generated template with a common React app.
    • react-ts — generated template with a TypeScript version of the React app.
  • Frontend template with Preact:
    • preact — generated template with a common Preact app.
    • preact-ts — generated template with a TypeScript version of the Preact app.
  • Frontend template with Vue.js:
    • vue — generated template with a common Vue.js app.
    • vue-ts — generated template with a TypeScript version of the Vue.js app.
  • Frontend template with Svelte:
    • svelte — generated template with a common Svelte app.
    • svelte-ts — generated template with a TypeScript version of the Svelte app.
  • Frontend template with Lit web components:
    • lit-element — generated template with a common Lit app.
    • lit-element-ts — generated template a TypeScript version of the Lit app.

☝️ Frontend part will be generate using awesome tool Vite.js under the hood. So, you'll always get the latest version of React, Preact, Vue, Svelte, Lit or pure JavaScript/TypeScript templates for your project!

Please make sure that you have npm version 7 or higher installed to create the frontend part of the project correctly. If you run the cgapp create command using our Docker image, npm of the correct version is already included.

🚚 Pre-configured Ansible roles

Web/Proxy server

  • Roles for run Docker container with Traefik Proxy:
    • traefik — configured Traefik container with a simple ACME challenge via CA server.
    • traefik-acme-dns — configured Traefik container with a complex ACME challenge via DNS provider.
  • Roles for run Docker container with Nginx:
    • nginx — pure Nginx container with "the best practice" configuration.

✌️ Since Create Go App CLI v2.0.0, we're recommend to use Traefik Proxy as default proxy server for your projects. The main reason: this proxy provides automatic SSL certificates from Let's Encrypt out of the box. Also, Traefik was built on the Docker ecosystem and has a really good looking and useful Web UI.

Database

  • Roles for run Docker container with PostgreSQL:
    • postgres — configured PostgreSQL container with apply migrations for backend.

Cache (key-value storage)

  • Roles for run Docker container with Redis:
    • redis — configured Redis container for backend.

⭐️ Project assistance

If you want to say thank you or/and support active development of Create Go App CLI:

Create Go App - Create a new production-ready project by one CLI command | Product Hunt

Together, we can make this project better every day! 😘

⚠️ License

Create Go App CLI is free and open-source software licensed under the Apache 2.0 License. Official logo was created by Vic Shóstak and distributed under Creative Commons license (CC BY-SA 4.0 International).

Owner
Create Go App
✨ Create a new production-ready project with backend (Golang), frontend (JavaScript, TypeScript) and deploy automation (Ansible, Docker) by running one command!
Create Go App
Comments
  • It creates the project even if I type n and press enter

    It creates the project even if I type n and press enter

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (uname -a): Linux 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
    • Golang (go version): go version go1.18.1 linux/amd64
    • Create Go App CLI (cgapp -v): cgapp version 3.6.1

    Describe the bug:

    Steps to reproduce the behavior:

    1. cgapp create
    2. select fiber
    3. select none
    4. select none
    5. it asks Yes/No, I type n

    Expected behavior: I expect it stop creation, but it creates files:

    backend
    hosts.ini
    Makefile
    playbook.yml
    roles
    
  • Frontend folder was not generated

    Frontend folder was not generated

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (uname -a): Windows 10
    • Golang (go version): go 1.17 windows/amd64
    • Create Go App CLI (cgapp -v): 3.3.1

    Describe the bug:

    I created some projects using cgapp, but none of them create the frontend folder. I tried to create vue and react frontend to clear if was the type of front.

    Steps to reproduce the behavior:

    1. Go to project folder
    2. cgapp create
    3. choose backend framework (fiber)
    4. choose frontend framework (vue/react)
    5. choose web/proxy (nginx)
    6. Confirm with Yes

    Expected behavior:

    I was expecting to see all the folders, but the frontend folder is lacking.

    Screenshots: image

    image

    Additional context:

  • Adding robust web frameworks

    Adding robust web frameworks

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar feature request.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    Is your feature request related to a problem? Please describe.

    Currently the cli only supports net/http and fiber. net/http is great for a lightweight and clean backend but a bit slower to build with. Fiber is a nice framework designed to ease things up for fast development, however does not have a lot of feature support as it is built on top of fasthttp. One of the main issues is that fiver does not support HTTP/2.

    Describe the solution you'd like:

    I propose adding a robust framework that is compatible with the stdlib. Fiber is blazing fast, but faster than necessary at cost of not properly implementing a protocol and incompatibilities is not really the best. So I suggest adding other frameworks such as: Echo , Gin , Chi.

    Describe alternatives you've considered:

    I guess the alternative here is just building it from scratch? Not really any alternative solutions just would be nice to have other frameworks available.

  • Failed without appropriate error on missing node lib.

    Failed without appropriate error on missing node lib.

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (uname -a): Darwin Sebastians-MacBook-Pro.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
    • Golang (go version): go version go1.15.6 darwin/amd64
    • Create Go App CLI (cgapp -v): cgapp version 1.6.10

    Describe the bug:

    When running cgapp create the initiation of the frontend failed. It failed because I didn't have node installed. A better error message here would improve the UX. Steps to reproduce the behavior:

    1. Have system without nodejs installed.
    2. Run cgapp create
    3. Notice the sparse error message.

    Expected behavior:

    A clear error message describing the reason for the error.

    Screenshot image

    Cheers! Thank you for your hard work.

  • Add Database Mysql

    Add Database Mysql

    Add Database Mysql

    • [x] I'm gonna mark the checkboxes like this.
    • [ ] I didn't find in the Create Go App CLI repository's issues section similar feature request.
    • [ ] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [ ] This is not about third-party project, framework, package or technology.

    image

  • Getting error dial tcp: no such host

    Getting error dial tcp: no such host

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (Darwin mofodoxs-MacBook-Pro-13.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64):
    • Golang (go version go1.17.2 darwin/amd64):
    • Create Go App CLI (cgapp version 3.1.1):

    Describe the bug:

    How do I run the backend application. I've followed the instructions from the README.md in the backend folder but I kept getting this error:

    migrate -path /Users/mofodox/Documents/projects/cgapptest/backend/platform/migrations -database "postgres://postgres:password@cgapp-postgres/postgres?sslmode=disable" up
    error: dial tcp: lookup cgapp-postgres on 192.168.1.254:53: no such host
    make: *** [migrate.up] Error 1
    

    Steps to reproduce the behavior:

    1. Run the cgapp create command
    2. Choose the options available
    3. Rename the .env.example to .env (backend folder)
    4. Installed golang-migrate, gosec, swagger
    5. Run the application using the make command: make docker.run

    Thank you!

  • Frontend folder is empty

    Frontend folder is empty

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (uname -a): Linux abc 5.11.0-7614-generic #15~1618626693~20.10~ecb25cd-Ubuntu SMP Thu Apr 22 16:00:45 UTC x86_64 x86_64 x86_64 GNU/Linux
    • Golang (go version): go1.16.4
    • Create Go App CLI (cgapp -v): 2.1.1

    Describe the bug:

    After creating a project, the frontend folder is empty. Output from create command:

    ❯ cgapp create
    
    Create a new project via Create Go App CLI v2.1.1...
    
    [?] Choose a backend framework: fiber
    [?] Choose a frontend framework/library: vue
    [?] Choose a web/proxy server: nginx
    [?] If everything is okay, can I create this project for you? ;) Yes
    
    [OK] Backend was created with template `fiber`!
    [OK] Frontend was created with template `vue`!
    [OK] Web/Proxy server configuration for `nginx` was created!
    [OK] Ansible inventory, playbook and roles for deploying was created!
    
    [INFO] Completed in 2 seconds!
    
    * Please put credentials into the Ansible inventory file (`hosts.ini`) before you start deploying a project!
    * Visit https://vitejs.dev/guide/ for more info about using the `vue` frontend template!
    * A helpful documentation and next steps with your project is here https://create-go.app/
    
    Have a happy new project! :)
    

    Steps to reproduce the behavior:

    1. cgapp create
    2. Choose fiber
    3. Choose vue
    4. Choose nginx
    5. Choose Yes

    Expected behavior:

    Something existing in frontend folder.

  • React TypeScript Template

    React TypeScript Template

    Hello,

    I'd like to propose good React TypeScript template for your CLI. Let's make it a part of your org. I ready to make transfer. If you have issues of the template, let's discuss it. @koddr

  • No `Frontend` folder gets created when `react-ts` is selected as frontend framework/library

    No `Frontend` folder gets created when `react-ts` is selected as frontend framework/library

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS : Linux windows 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    • Golang (go version): go version go1.18.3 linux/amd64
    • Create Go App CLI (cgapp -v): cgapp version 3.6.2

    Describe the bug:

    If you follow the steps below, there is no frontend folder that gets generated for the react-ts framework/library

    Steps to reproduce the behavior:

    1. mkdir GO-PROJECT
    2. cd GO-PROJECT
    3. cgapp create
    4. Select fiber as backend framework
    5. Select react-ts as frontend framework/library
    6. Select traefik-acme-dns as web/proxy server
    7. Click enter to create project
    8. No frontend folder is created

    Expected behavior:

    The project bootstraps properly including the frontend directory

    Screenshots:

    Image when running the commands image

    Image of directory structure after commands, notice frontend is missing: image

  • Vite create err

    Vite create err

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (uname -a): Window 11
    • Golang (go version): go1.16.7
    • Create Go App CLI (cgapp -v): 3.0.0

    Describe the bug:

    
    Create a new project via Create Go App CLI v3.0.0...
    
    [?] Choose a backend framework: fiber
    [?] Choose a frontend framework/library: vue-ts
    [?] Choose a web/proxy server: nginx
    [?] If everything is okay, can I create this project for you? ;) Yes
    
    [OK] Backend was created with template `github.com/create-go-app/fiber-go-template`!
    Error: [ERROR] [ERROR] Error: EPERM: operation not permitted, mkdir 'C:\Users\Kudou'
    command not found: create-vite
    
    Usage:
      cgapp create [flags]
    
    Aliases:
      create, new
    
    Flags:
      -h, --help       help for create
      -t, --template   enables to use custom backend and frontend templates
    

    I was install vite , vue ,... as the global of npm. But when select vue-ts , it say command not found "create-vite" Steps to reproduce the behavior:

    1. Go to ...
    2. Click on ...
    3. ...
    4. See error

    Expected behavior:

    Screenshots:

    Additional context:

  • Error: [ERROR] [ERROR] When creating new app

    Error: [ERROR] [ERROR] When creating new app

    Required check list:

    • [x] I'm gonna mark the checkboxes like this.
    • [x] I didn't find in the Create Go App CLI repository's issues section similar bug.
    • [x] I understand, that the Create Go App CLI is Open Source and not-for-profit product.
    • [x] This is not about third-party project, framework, package or technology.

    My environment:

    • OS (uname -a): Darwin not.your.bussiness.net 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
    • Golang (go version): go version go1.17.1 darwin/amd64
    • Create Go App CLI (cgapp -v): cgapp version 3.0.0

    Describe the bug:

    It will create the backend directory but no frontend. Tried with different options for the front end choices with the same result/output.

    Steps to reproduce the behavior:

    Create a new project

    % cgapp create                                                                            /tmp/test-go
    
    
    Create a new project via Create Go App CLI v3.0.0...
    
    [?] Choose a backend framework: fiber
    [?] Choose a frontend framework/library: svelte-ts
    [?] Choose a web/proxy server: traefik
    [?] If everything is okay, can I create this project for you? ;) Yes
    
    [OK] Backend was created with template `github.com/create-go-app/fiber-go-template`!
    Error: [ERROR] [ERROR] 
    Usage:
      cgapp create [flags]
    
    Aliases:
      create, new
    
    Flags:
      -h, --help       help for create
      -t, --template   enables to use custom backend and frontend templates
    
    

    Expected behavior:

    Have a fully working application

📦 CLI for setting up a Go WebAssembly frontend app
📦 CLI for setting up a Go WebAssembly frontend app

Simple CLI for setting up Go WebAssembly frontend app. What's included ??️ Dev Server with live reload ??️ TinyGo for small WebAssembly output ➡ Git s

Dec 3, 2022
Project-2 - Create a project that calls service created above, pass text and prints JSON output returned from the service

Project Assignment Steps to run the project: First Download the repo present her

Jan 27, 2022
A fork of k3sup that lets you quickly deploy RKE2 clusters via the CLI.

k2sup This is an awful hack of a fork of Alex Ellis' k3sup - a light-weight utility to get from zero to KUBECONFIG, originally with K3s but now with R

Dec 12, 2022
List of serverless functions for AWS S3. Easy deploy with Vercel CLI

List of serverless functions for AWS S3. Easy deploy with Vercel CLI

Jan 22, 2022
Create new commands from your shell history or terminal.

overdub Create new commands from your shell history or terminal. TODO list for initial release Filter out unlikely commands (e.g. package managers) fr

Aug 9, 2022
Package command provide simple API to create modern command-line interface

Package command Package command provide simple API to create modern command-line interface, mainly for lightweight usage, inspired by cobra Usage pack

Jan 16, 2022
Node is where client will send data to, create block send to miner, create block send to parent and receive tick from validator and do validate

Node Receive Tick from validator Validate POH of tick send result to validator Receive confirm block from validator Send Checked block to validator Ho

Dec 31, 2021
The go mod init command initializes and writes a new go.mod file in the current directory

go mod: The go mod init command initializes and writes a new go.mod file in the current directory, in effect creating a new module rooted at the curre

Nov 21, 2021
An os/exec like interface for running a command in a container, and being able to easily interact with stdin, stdout, and other adjustments

dockerexec An "os/exec" like interface for running a command in a container, and being able to easily interact with stdin, stdout, and other adjustmen

Jul 14, 2022
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.
Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine.

Vaku Vaku is a CLI and API for running path- and folder-based operations on the Vault Key/Value secrets engine. Vaku extends the existing Vault CLI an

Nov 28, 2022
It is an easy and fast tool to install your packages with just one command.

Trouxa It is an easy and fast tool to install your packages with just one command. What means "Trouxa"? In portuguese, Trouxa means something like a "

Sep 29, 2022
Runc: a CLI tool for spawning and running containers on Linux according to the OCI specification

runc Introduction runc is a CLI tool for spawning and running containers on Linux according to the OCI specification. This repo contains a lightly mod

Dec 16, 2021
K-Mesh is an experimental Knative distribution which provides a fresh, CLI-focused, holistic user experience of running and managing Knative.

K-Mesh is an experimental Knative distribution which provides a fresh, CLI-focused, holistic user experience of running and managing Knative. N

Feb 14, 2022
One-line-at-a-time was a hobby project inspired by the character Dwight K. Schrute of 'The Office'
One-line-at-a-time was a hobby project inspired by the character Dwight K. Schrute of 'The Office'

One Line at a Time Introduction One-line-at-a-time was a hobby project inspired by the character Dwight K. Schrute of 'The Office'. His efficient usag

Dec 13, 2021
top in container - Running the original top command in a container
top in container - Running the original top command in a container

Running the original top command in a container will not get information of the container, many metrics like uptime, users, load average, tasks, cpu, memory, are about the host in fact. topic(top in container) will retrieve those metrics from container instead, and shows the status of the container, not the host.

Dec 2, 2022
Esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another.

esdump Introduction esdump is a migration CLI written in Go for migrating index mapping and data from one elasticsearch to another. Compatibility Elas

Jul 23, 2022
Jan 27, 2022
Allows you to collect all pprof profiles with one command.

Collect Allows you to collect all pprof profiles with one command. Installation Just go-get it: $ go get github.com/tommsawyer/collect/cmd/collect Mot

Aug 24, 2022
git-glimpse is a command-line tool that is aimed at generating a git prompt like the one from zsh-vcs-prompt.

Git GoGlimpse git-glimpse is a command-line tool that is aimed at generating a git prompt like the one from zsh-vcs-prompt. The particularity of this

Jan 27, 2022