English | 简体中文
gf-cli
is a powerful CLI tool for building GoFrame application with convenience.
It's recommended using pre-compiled binaries:
Linux (amd64)
: https://goframe.org/cli/linux_amd64/gfMac (amd64)
: https://goframe.org/cli/darwin_amd64/gfWindows (amd64)
: https://goframe.org/cli/windows_amd64/gf.exe- More...
After downloads, please use gf install
command to install gf binary to system binary path.
-
Mac
wget https://goframe.org/cli/darwin_amd64/gf && chmod +x gf && ./gf install
If you're using
zsh
, you might need rename your alias by commandalias gf=gf
to resolve the conflicts betweengf
andgit fetch
. -
Linux
wget https://goframe.org/cli/linux_amd64/gf && chmod +x gf && ./gf install
-
Windows
Manually download, execute it and then follow the instruction.
You might need setting the goproxy to make through building.
- Latest version
git clone https://github.com/gogf/gf-cli cd gf-cli && go build main.go && ./main install
- Specified version
git clone --branch v0.7.3 https://github.com/gogf/gf-cli cd gf-cli && go build main.go && ./main install
- Database
sqlite
andoracle
are not support ingf gen
command in default as it needscgo
andgcc
, you can manually make some changes to the source codes and do the building.
$ 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.
Please use ulimit -n 65535
to enlarge your system configuration for max open files for current terminal shell session, and then gf run
.