cli

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 3 Imported by: 0

README ΒΆ


Create Go App CLI

Set up a new Go (Golang) full stack app by running one CLI command!

cli versionΒ go versionΒ go coverΒ go reportΒ lisense

⚑️ Quick start

Let's create a new app into ./app folder with Fiber as backend and Preact as frontend:

cgapp create -p ./app -b fiber -f preact

That's all you need to start! πŸ˜‰

βš™οΈ Installation

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

Installation is done by using the go build command with $GOPATH/bin:

go build -i -o $GOPATH/bin/cgapp github.com/create-go-app/cli

Check, that the CLI is installed correctly by the --version (or -v) command:

cgapp --version

# cgapp version X.X.X

~ Alternative installations

We're using a GoReleaser project for shipping standalone Create Go App CLI version to all major desktop platforms: Apple macOS, GNU/Linux, MS Windows. By default, for amd64 (x86_64) architecture.

If you need this version, please go to the repository release page and download zipped archive.

πŸ“š Commands & Options

cgapp [command] [command options] [arguments...]

☝️ Tip you can see all available commands by running command with --help (or -h) option.

create

Creates a new Go app.

cgapp create --help

NAME:
   cgapp create - create a new Go app

USAGE:
   cgapp create [command options] [arguments...]

OPTIONS:
   --path value, -p value       path to create app, ex. ~/projects/my-app (default: ".")
   --backend value, -b value    backend for your app, ex. Fiber, Echo (default: "net/http")
   --frontend value, -f value   frontend for your app, ex. Preact, React.js, React.ts (default: "none")
   --webserver value, -w value  web/proxy server for your app, ex. Nginx (default: "none")
   --database value, -d value   database for your app, ex. Postgres (default: "none")
   --help, -h                   show help

πŸ”” Please note: by default, cgapp create command without any options will create into current folder default backend (net/http) without frontend or configured Docker containers!

πŸ“ Available production-ready app templates

Golang:

JavaScript:

🐳 Available production-ready Docker containers

Web/Proxy server:

Database:

πŸ‘€ User templates & containers

Create Go App CLI provide creation your own template, instead of those prepared by authors. It's easy! πŸ˜‰

Just specify backend (-b), frontend (-f), webserver (-w) and database (-d) with addresses to your repositories and run:

cgapp create \
             -b github.com/user/my-back-template \
             -f gitlab.com/user/my-front-template \
             -w github.com/user/my-webserver-container-template \
             -d bitbucket.org/user/my-database-container-template

πŸ”” Please note: the https:// protocol will add automatically!

πŸ€” FAQ

How to update CLI to latest version?

You can just re-build the CLI. The latest version will be downloaded and installed automatically:

go build -i -o $GOPATH/bin/cgapp github.com/create-go-app/cli

If you're using standalone version, please go to the release page and download archive with a new version.

⭐️ Project assistance

If you want to say thank you or/and support active development create-go-app/cli:

  1. Add a :octocat: GitHub Star to the project.
  2. Twit about project on your Twitter.
  3. Donate some money to project author via PayPal: @paypal.me/koddr.
  4. Join DigitalOcean at our referral link (your profit is $100 and we get $25).
  5. Buy awesome domain name with 5% discount at REG.COM.

Thanks for your support! 😘 Together, we make this project better every day.

~ Sponsors

Logo Description URL
True web artisans logo True web artisans β€” Team who making UX efficiency review, friendly UI design, smart backend microservices, high-quality web apps and many more. https://1wa.co

⚠️ License

MIT Β© Vic ShΓ³stak & True web artisans.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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