All Projects → create-go-app → Cli

create-go-app / Cli

Licence: apache-2.0
✨ A powerful CLI for the Create Go App project. Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Cli

Curriculum
Overview of the different modules and learning goals of the program.
Stars: ✭ 40 (-86.3%)
Mutual labels:  cli, backend, frontend
Rust Cli Boilerplate
Rust project boilerplate for CLI applications
Stars: ✭ 108 (-63.01%)
Mutual labels:  cli-app, cli, boilerplate-template
Drone Ssh
Drone plugin for executing remote ssh commands
Stars: ✭ 155 (-46.92%)
Mutual labels:  cli, docker-image, docker-container
Curriculum
Dive into our 7-month web development program covering HTML, CSS, Javascript, Node, and React!
Stars: ✭ 453 (+55.14%)
Mutual labels:  cli, backend, frontend
Mongo Seeding
The ultimate solution for populating your MongoDB database.
Stars: ✭ 375 (+28.42%)
Mutual labels:  cli-app, cli, docker-image
Bbrun
Run Bitbucket Pipelines locally
Stars: ✭ 127 (-56.51%)
Mutual labels:  cli-app, cli
Natrium
A pre-build (Swift) script to alter your Xcode project at pre-build-time per environment, build configuration and target.
Stars: ✭ 131 (-55.14%)
Mutual labels:  cli-app, cli
Ohshitgit
⁉️Oh shit! A cli tool to help you unfuck your git mistakes
Stars: ✭ 135 (-53.77%)
Mutual labels:  cli-app, cli
Tty
Toolkit for developing sleek command line apps.
Stars: ✭ 2,329 (+697.6%)
Mutual labels:  cli-app, cli
Terminal layout
The project help you to quickly build layouts in terminal,cross-platform(一个跨平台的命令行ui布局工具)
Stars: ✭ 98 (-66.44%)
Mutual labels:  cli-app, cli
Git Tidy
Tidy up stale git branches.
Stars: ✭ 137 (-53.08%)
Mutual labels:  cli-app, cli
Ahoy
Create self-documenting cli programs from YAML files. Easily wrap bash, grunt, npm, docker, (anything) to standardize your processes and make the lives of the people working on your project better.
Stars: ✭ 201 (-31.16%)
Mutual labels:  cli-app, cli
Jsonfui
jsonfui is an interactive command-line JSON viewer.
Stars: ✭ 125 (-57.19%)
Mutual labels:  cli-app, cli
Ostap
CLI tool that fast checks if your bundle contains multiple versions of the same package, only by looking in package.json.
Stars: ✭ 117 (-59.93%)
Mutual labels:  cli-app, frontend
Kosko
Organize Kubernetes manifests in JavaScript.
Stars: ✭ 133 (-54.45%)
Mutual labels:  cli-app, cli
Gcli
🖥 Go CLI application, tool library, running CLI commands, support console color, user interaction, progress display, data formatting display, generate bash/zsh completion add more features. Go的命令行应用,工具库,运行CLI命令,支持命令行色彩,用户交互,进度显示,数据格式化显示,生成bash/zsh命令补全脚本
Stars: ✭ 188 (-35.62%)
Mutual labels:  cli-app, cli
Cat Names
🐈 Get popular cat names
Stars: ✭ 226 (-22.6%)
Mutual labels:  cli-app, cli
Tldr
Golang command line client for tldr https://github.com/tldr-pages/tldr
Stars: ✭ 210 (-28.08%)
Mutual labels:  cli-app, cli
3llo
3llo - Trello interactive CLI aplication
Stars: ✭ 245 (-16.1%)
Mutual labels:  cli-app, cli
python3-docker-devenv
Docker Start Guide with Python Development Environment
Stars: ✭ 13 (-95.55%)
Mutual labels:  docker-container, docker-image


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.16 or higher is required.

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

go install -ldflags="-s -w" github.com/create-go-app/cli && mv $GOPATH/bin/cli $GOPATH/bin/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) into current folder:

cgapp create

Okay, it works! Now, you can run this project on your local machine or deploy to a remote server. Project works in isolated Docker containers and automates via Ansible playbook:

cgapp deploy

That's all you need 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

With this Docker image, you do not have to worry about installing tools/CLI of frontend UI libraries/frameworks. Everything is already included: create-react-app, preact-cli, vue-cli, ng-cli and degit (for Svelte and Sapper).

Available commands for official Docker image:

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

📺 Video screencast

A short video screencast to introduce main features of the Create Go App CLI.

youtube preview
🔗 https://youtu.be/5-DNZFU9TOQ

📖 Official Documentation

Unfortunately, we are unable to include all helpful documentation to the README file. That's why, the best way to better explore all the features of the Create Go App CLI is to read the Official Documentation and explore Discussions.

🔥 We've put together a subject index specifically for you, so you can find any answer you want in seconds!

⚙️ Commands & Options

init

CLI command for generate a default .cgapp.yml config file in current folder:

cgapp init
Generated config file
# Project config.
project:
  # Backend for your project.
  # (Required)
  # String:
  #   - `net/http`
  #   - `fiber`
  # User template: supported, set to URL (without protocol),
  # like `github.com/user/template`
  - backend: fiber

  # Frontend for your project.
  # (Optional, to skip set to `none`)
  # String:
  #   - `react`
  #     - `react:<template>`
  #   - `preact`
  #     - `preact:<template>`
  #   - `vue`
  #     - `vue:<user/repo>` (for preset from GitHub)
  #     - `vue:<gitlab|bitbucket>:<user/repo>` (for presets from others)
  #   - `angular`
  #   - `svelte`
  #   - `sapper`
  #     - `sapper:<webpack>`
  # User template: supported, set to URL (without protocol),
  # like `github.com/user/template`
  - frontend: svelte

  # Web/Proxy server for your project.
  # (Optional, to skip set to `none`)
  # String: `nginx`
  # User template: supported, set to URL (without protocol),
  # like `github.com/user/template`
  - webserver: nginx

# Automation config.
roles:
  # Ansible roles for deploy your project.
  # (Optional, to skip set to empty or comment)
  # Objects list.
  - deploy:
    # Username of remote's server or local's user.
    # (Required)
    username: root

    # If you need to deploy (or run) a project asking for a password
    # for the user, set `become` to `true`. This is equivalent of
    # `--ask-become-pass`, a standard Ansible argument
    # to ask for a privilege escalation password.
    # (Optional)
    become: true

    # Host name from your inventory file (usually, at /etc/ansible/hosts).
    # (Required)
    host: localhost

    # Name of Docker network
    # (Required)
    network: cgapp_network

    # Port for backend Docker container (both in and out).
    # (Required)
    backend_port: 5000

    # Filename of Ansible playbook in the root of the Create Go App project.
    # If you want to rename it, do it, but not to change destination of file!
    # (Required)
    playbook: deploy-playbook.yml

create

CLI command to create a new project with the selected configuration.

There's two ways to create a new project:

  • [x] With an interactive console UI (or CUI).
  • [x] From configuration file (by default, in $PWD/.cgapp.yml).

Create with the interactive console UI

Run create command without any arguments:

cgapp create

Create from the config file

Run create command with --use-config (or -c) argument:

cgapp create --use-config

deploy

CLI command for deploy Docker containers with your project to a remote server.

☝️ You should only run this command from the root folder of your project, which created with the cgapp create command! It's a necessary condition for everything to work perfectly.

There's, also, two ways to deploy your project:

  • [x] With an interactive console UI (or CUI).
  • [x] From configuration file (by default, in $PWD/.cgapp.yml).

Deploy with the interactive console UI

Run deploy command without any arguments:

cgapp deploy

Deploy from the config file

Run deploy command with --use-config (or -c) argument:

cgapp deploy --use-config

🤔 Why another CLI?

When we started this project, we asked ourselves this question too and... came to the conclusion, that approximately 8 out of 10 routine operations at the start of a new project and/or the deployment of an existing one can be automated. And it would be better to have all the necessary functions inside one CLI. That's why we transferred all our experience to the Create Go App CLI, which we use ourselves!

So, yes, this CLI gives you the ability to prepare everything you need to start a new project (as create-react-app for the React.js ecosystem does) and deploy an existing project to a remote server in configured and fully isolated Docker containers.

📝 Production-ready project templates

Backend:

  • [x] net/http — Backend template with Golang built-in net/http package.
  • [x] fiber — Backend template with Fiber.
  • [ ] echo (WIP) — Backend template with Echo.
  • [ ] gin (WIP) — Backend template with Gin.

Frontend:

  • [x] reactReact frontend app.
    • react:<template> — CRA generated template for React app.
  • [x] preactPreact frontend app.
    • preact:<template> — Preact CLI generated template for Preact app.
  • [x] vueVue.js frontend app.
    • vue:<user/repo> — Preset for generating Vue.js app from GitHub.
    • vue:<gitlab|bitbucket>:<user/repo> — Preset for generating Vue.js app from GitLab/BitBucket/etc.
  • [x] angularAngular frontend app.
  • [x] svelteSvelte frontend app.
  • [x] sapperSapper frontend app for static websites.
    • sapper:<webpack> — Preset for generating Sapper with Webpack bundler.

☝️ Please note, that since version v1.3.0, frontend templates (in the classical sense) are not supported by the Create Go App CLI. Those templates, that we created (react-js, react-ts and preact-js), are still available, but only for use as user's custom templates.

Now, the frontend part of your project will be generated using official CLI from the authors of each frontend UI library/framework (under the hood). So, you'll always get the latest version of React, Preact, Vue.js, Angular, Svelte or Sapper for your project from their authors!

🐳 Configured Docker containers

Web/Proxy server:

👤 Custom templates & containers?

Create Go App CLI provide works with your own custom templates, instead of those prepared by authors. Just specify backend, frontend and webserver with addresses to repositories in configuration file (.cgapp.yml):

project:
  - backend: github.com/user1/my-template-1
  - frontend: gitlab.com/user2/my-template-2
  - webserver: bitbucket.org/user3/my-template-3
# ...

☝️ The https:// protocol will be added automatically!

👵 How to install older version?

You can do it by using a version suffix in go install command:

go install github.com/create-go-app/[email protected]

☝️ Don't forget to rename binary after installation, according to the version you have installed! This must be done to avoid confusion with the latest version.

For example: mv $GOPATH/bin/cli $GOPATH/bin/cgapp_v1_6_0 and run it by cgapp_v1_6_0.

Found all available CLI versions on our pkg.go.dev page.

⭐️ Project assistance

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

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).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].