2 Star 6 Fork 6

John / gf-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

GoFrame CLI TOOL

This repo. is archived and moved to https://github.com/gogf/gf/tree/master/cmd/gf for better maintenance.

gf is a powerful CLI tool for building GoFrame application with convenience.

1. Install

1). Manually Install

You might need setting the goproxy to make through building. Please make sure your Golang version > v1.15.

  1. Latest version

    go install github.com/gogf/gf-cli/v2/gf@master
  2. Specified version

    go install github.com/gogf/gf-cli/v2/gf@v2.0.0-beta
  3. Check installation

    gf -v

2). PreBuilt Binary

You can also install gf tool using pre-built binaries: https://github.com/gogf/gf-cli/releases

After downloads, please use gf_xxx_xxx install command to install gf binary to system binary path.

  1. Mac

    wget -O gf https://github.com/gogf/gf-cli/releases/download/v2.0.0-rc/gf_darwin_amd64 && chmod +x gf && ./gf install

    If you're using zsh, you might need rename your alias by command alias gf=gf to resolve the conflicts between gf and git fetch.

  2. Linux

    wget -O gf https://github.com/gogf/gf-cli/releases/download/v2.0.0-rc/gf_linux_amd64 && chmod +x gf && ./gf install
  3. Windows

    Manually download, execute it and then follow the instruction.

  4. Database sqlite and oracle are not support in gf gen command in default as it needs cgo and gcc, you can manually make some changes to the source codes and do the building.

2. Commands

$ gf
USAGE
    gf COMMAND [OPTION]

COMMAND
   env        show current Golang environment variables
   run        running go codes with hot-compiled-like feature
   gen        automatically generate go files for dao/do/entity/pb/pbentity
   tpl        template parsing and building commands
   init       create and initialize an empty GoFrame project
   pack       packing any file/directory to a resource file, or a go file
   build      cross-building go project for lots of platforms
   docker     build docker image for current GoFrame project
   install    install gf binary to system (might need root/admin permission)
   version    show version information of current binary

OPTION
   -y, --yes       all yes for all command without prompt ask
   -v, --version   show version information of current binary
   -d, --debug     show internal detailed debugging information
   -h, --help      more information about this command

ADDITIONAL
    Use "gf COMMAND -h" for details about a command.

3. FAQ

1). Command gf run returns pipe: too many open files

Please use ulimit -n 65535 to enlarge your system configuration for max open files for current terminal shell session, and then gf run.

MIT License Copyright (c) 2018 john@goframe.org https://goframe.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

gf-cli是一款强大的GoFrame开发工具链,使得我们开发基于GoFrame框架的项目更加便捷。 展开 收起
Go 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/johng/gf-cli.git
git@gitee.com:johng/gf-cli.git
johng
gf-cli
gf-cli
master

搜索帮助