1 Star 1 Fork 0

spwx820 / gf-cli

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

GF-CLI

English | 简体中文

gf-cli是一款强大的GoFrame开发工具链,使得我们开发基于GoFrame框架的项目更加便捷。

1. 安装

1). 预编译二进制

我们推荐大家安装指定平台预编译的二进制文件:

下载完成后,通过gf install命令安装。

  1. Mac

    wget https://goframe.org/cli/darwin_amd64/gf && chmod +x gf && ./gf install

    如果您的终端使用的是zsh, 您需要执行alias gf=gf命令以便解决gf工具名称和git fetch简化指令冲突的问题。

  2. Linux

    wget https://goframe.org/cli/linux_amd64/gf && chmod +x gf && ./gf install
  3. Windows

    下载后执行,随后根据提示执行安装。

2). 手动编译安装

  1. 最新版本
    git clone https://github.com/gogf/gf-cli 
    cd gf-cli && go build main.go && ./main install
  2. 指定版本
    git clone --branch v0.7.3 https://github.com/gogf/gf-cli 
    cd gf-cli && go build main.go && ./main install

注意:在gf gen命令中,由于sqliteoracle数据库需要cgogcc支持,因此预编译的二进制中不提供对这两个数据库的支持,您需要手动修改源码,去掉对应源码文件中指定数据库类型的import注释后手动编译支持。

2. 命令

$ gf
USAGE
    gf COMMAND [ARGUMENT] [OPTION]

COMMAND
    env        show current Golang environment variables
    get        install or update GF to system in default...
    gen        automatically generate go files for ORM models...
    mod        extra features for go modules...
    run        running go codes with hot-compiled-like feature...
    init       initialize an empty GF project at current working directory...
    help       show more information about a specified command
    pack       packing any file/directory to a resource file, or a go file...
    build      cross-building go project for lots of platforms...
    docker     create a docker image for current GF project...
    swagger    swagger feature for current project...
    update     update current gf binary to latest one (might need root/admin permission)
    install    install gf binary to system (might need root/admin permission)
    version    show current binary version info

OPTION
    -y         all yes for all command without prompt ask
    -?,-h      show this help or detail for specified command
    -v,-i      show version information

ADDITIONAL
    Use 'gf help COMMAND' or 'gf COMMAND -h' for detail about a command, which has '...'
    in the tail of their comments.

3. 文档

完善详尽的中文文档请参考GoFrame官网板块:开发工具

4. FAQ

1). gf run 命令报错 pipe: too many open files

请执行ulimit -n 65535命令扩展您当前终端会话支持的最大文件打开数,随后再执行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.

简介

暂无描述 展开 收起
Go 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

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

搜索帮助