Giter Club home page Giter Club logo

gf-cli's Introduction

GoFrame CLI TOOL

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

1. Install

1). Binary

It's recommended using pre-compiled 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/v1.16.3/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/v1.16.3/gf_linux_amd64 && chmod +x gf && ./gf install
  3. Windows

    Manually download, execute it and then follow the instruction.

2). Manually Install

You might need setting the goproxy to make through building.

  1. Latest version

    git clone https://github.com/gogf/gf-cli 
    cd gf-cli && go build main.go && ./main install
    
  2. Specified version

    git clone --branch v1.16.3 https://github.com/gogf/gf-cli 
    cd gf-cli && go build main.go && ./main install
    
  3. 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 [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. 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.

gf-cli's People

Contributors

gqcn avatar zcool321 avatar hailaz avatar playhi avatar housemecn avatar jianchenma avatar qinyuguang778 avatar stardemo avatar syhily avatar notnear avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.