Project Icon

cli

全栈Web应用快速开发和部署工具

Create Go App CLI整合了Golang后端、JavaScript/TypeScript前端以及Ansible/Docker部署自动化。这个命令行工具支持多种流行框架,提供交互式界面,并内置Ansible配置,有效简化了全栈Web应用的开发和部署流程。

Create Go App

Create Go App CLI

Go version Go report Code coverage Wiki License

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

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

⚡️ Quick start

First, download and install Go. Version 1.20 or higher is required.

❗️ Note: If you're looking for the Create Go App CLI for other Go versions: 1.16, 1.17.

Installation is done by using the go install command:

go install github.com/create-go-app/cli/v4/cmd/cgapp@latest

Or see the repository's Release page, if you want to download a ready-made deb, rpm, apk or Arch Linux package.

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

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

# Installation:
brew install create-go-app/tap/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]
OptionDescriptionTypeDefaultRequired?
-tEnables to define custom backend and frontend templates.boolfalseNo

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]
OptionDescriptionTypeDefaultRequired?
-kPrompt you to provide the remote user sudo password (a standard Ansible --ask-become-pass option).boolfalseNo

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.
  • Backend template with go-chi:
    • chi — a basic application with health check.

Frontend

Frontend part will be generated using awesome tool Vite.js under the hood.

So, you'll always get the latest version of React, Preact, Vue, Svelte, Solid, Lit, Qwik, or pure JavaScript/TypeScript templates for your project.

NameDescriptionJavaScriptTypescript
PureA pure JavaScript/Typescript appvanillavanilla-ts
ReactA common React appreactreact-ts
React (with SWC)A React app with SWCreact-swcreact-swc-ts
PreactA common Preact apppreactpreact-ts
Vue.jsA common Vue.js appvuevue-ts
SvelteA common Svelte appsveltesvelte-ts
SolidA common Solid appsolidsolid-ts
LitA common Lit applitlit-ts
QwikA common Qwik appqwikqwik-ts

The Next.js and Nuxt frontend parts will be generated using the latest create-next-app and nuxi utilities.

NameDescriptionJavaScriptTypescript
Next.jsA common Next.js appnextnext-ts
NuxtA common Nuxt v3 app-nuxt

❗️ 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 recommended 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:

  • Add a GitHub Star to the project.
  • Tweet about project on your Twitter for all of your friends and colleagues.
  • Write interesting articles about project on Dev.to, or personal blog.
  • Join DigitalOcean at our referral link (your profit is $100 and we get $25).
  • Leave a review on our ProductHunt page.

Product Hunt

🏆 A win-win cooperation

And now, I invite you to participate in this project! Let's work together to create the most useful tool for developers on the web today.

  • Issues: ask questions and submit your features.
  • Pull requests: send your improvements to the current.

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

🔥 Other projects of the authors

![gowebly logo][gowebly_img_url]

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

[gowebly_img_url]:

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号