GoFrame (gogf/gf): A Go Application Framework That Also Ships a CLI
A powerful framework for faster, easier, and more efficient project development.
At a glance
- What is it?
- GoFrame is an MIT-licensed Go framework that can be used whole or component by component, with a `gf` CLI for scaffolding and running projects. It is a reasonable fit for teams that want one toolkit for HTTP, ORM, config and OpenTelemetry tracing in a single module.
- Who is it for?
- Adopt GoFrame if you are building a Go service and want HTTP, ORM, configuration, logging and OpenTelemetry tracing to come from one dependency tree rather than four or five separate libraries, and if you are comfortable with a framework that owns conventions beyond net/http.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 6 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What GoFrame Is For, and Who Should Pick It Up
GoFrame describes itself as "a powerful framework for faster, easier, and more efficient project development," and the README adds a second sentence that matters more than the first: you can use it as a full application framework, or pick individual components as needed. That dual framing is the honest description of the project. It is not a router with middleware bolted on, and it is not a micro-framework that stops at HTTP. The repository layout shows the breadth: database/, net/, os/, encoding/, crypto/, i18n/, text/, util/, debug/, errors/, frame/ and container/ sit at the top level, alongside a cmd/ directory that holds the `gf` CLI.
The audience is therefore a team building a Go backend service that expects to need several of those things at once. If you are writing an HTTP API that talks to a database, reads configuration from a file, writes structured logs and emits traces, GoFrame intends to supply all of that from one module. The alternative in the Go ecosystem is assembling a router, an ORM, a config library and an OpenTelemetry wiring layer yourself, then keeping their versions compatible. GoFrame's pitch is that the assembly is already done.
It is a weaker fit for narrow problems. A command-line tool with no server component gains little from a framework whose centre of gravity is net/ and database/. A library that other people import should think hard before depending on a framework with this many transitive dependencies, because those dependencies become your consumers' dependencies.
The Mechanism: One Module, Many Subpackages, and a CLI
The module path is github.com/gogf/gf/v2, and go.mod declares go 1.23.0. The direct dependency list is short enough to read in one sitting: BurntSushi/toml, clbanning/mxj/v2, emirpasic/gods/v2, fatih/color, fsnotify, gorilla/websocket, grokify/html-strip-tags-go, magiconair/properties, olekukonko/tablewriter, three go.opentelemetry.io modules (otel, otel/sdk, otel/trace), golang.org/x/net, golang.org/x/text and gopkg.in/yaml.v3.
That list tells you how the framework is put together. Configuration parsing is not invented in-house; TOML, YAML, properties and MXJ (for XML and JSON) are wrapped. File watching comes from fsnotify, which is what you would expect a config-reload feature to sit on. WebSocket support comes from gorilla/websocket. Tracing is wired to the OpenTelemetry SDK rather than a bespoke tracer, which is the right call if you already run an OTLP collector. The topics list on the repository includes opentelemetry, tracing, logging, orm, microservice and kubernetes, and the dependency set is consistent with that: the tracing topic is backed by real otel packages, not a marketing label.
The `gf` CLI lives in cmd/gf and is installed separately from the library. The Makefile shows the maintainers' own workflow around it: `make version to=vX.Y.Z` runs `$(MAKE) -C cmd/gf pack` before calling .make_version.sh, so the CLI is packed as part of a release. The same Makefile exposes `make tidy`, which runs .make_tidy.sh across every folder containing a go.mod, and `make lint`, which runs golangci-lint with the repository's .golangci.yml. A repository with a tidy target that walks submodules and a lint target with a committed config is a repository that expects contributors to run both.
Installing GoFrame and Serving a First Route
The README states that GoFrame requires Go 1.23 or later, which matches the go 1.23.0 line in go.mod. In an existing module, the framework is added with a single go get. The -u flag is the one the README shows, so it will upgrade the module to the latest version rather than pinning whatever is already in your go.sum.
go get -u github.com/gogf/gf/v2The CLI is a separate install and is fetched from the cmd/gf path with @latest.
go install github.com/gogf/gf/cmd/gf/v2@latestThe smallest working server is four lines of setup inside main. The README's example binds a handler to the root path, sets the port explicitly to 8000, and calls Run.
package main
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
func main() {
s := g.Server()
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Write("Hello World!")
})
s.SetPort(8000)
s.Run()
}To run it, the README initialises a module, tidies dependencies and runs the file. After `go run main.go`, opening http://127.0.0.1:8000 should return the string written by the handler.
go mod init hello
go mod tidy
go run main.goIf you would rather start from a scaffold than from a blank file, the CLI does that too. `gf init hello` creates a project directory, and `gf run main.go` runs it from inside that directory.
gf init hello
cd hello && gf run main.goOne detail worth noticing in the example: the default server is obtained through g.Server() from the frame package, and the port is set explicitly. The README does not state what port is used when SetPort is omitted, so if you copy the example and remove that line, confirm the actual listening port in your own logs rather than assuming 8000.
Where GoFrame Gets in the Way
The strongest argument against GoFrame for some teams is the same as the argument for it: it is a framework, and frameworks have opinions. The README's own example already shows one. You do not construct an http.Server and hand it a handler; you call g.Server() and get a framework-managed instance whose lifecycle, configuration and logging are owned by the framework. That is convenient until you need to do something the framework did not anticipate, at which point you are reading source rather than composing standard library types.
The dependency surface is the second constraint. The direct requirements in go.mod pull in a chain of indirect ones, including go.opentelemetry.io/auto/sdk, go-logr/logr, google/uuid and several mattn and olekukonko packages. For a service, that is unremarkable. For a library that will be imported by other people's binaries, it is a decision to make deliberately, because you are exporting that tree to your users. A project that only needs a router and JSON encoding will find net/http plus encoding/json weighs far less.
The documentation model is the third thing to plan around. The README does not document the API. It points at the official site at goframe.org, an English site at goframe.org/en, a mirror at goframe.org.cn, a mirror at pages.goframe.org, an offline PDF build in a separate repository, and GoDoc at pkg.go.dev. If your team works offline or behind a proxy that does not reach those hosts, the offline documentation repository is the path the README offers, and it is worth fetching before you start rather than after.
Finally, the README does not document rollback, migration between major versions, or a deprecation policy. There is no statement in the README about how long a v2 line will be supported. If your organisation requires a written support window before adopting a dependency, that information is not in this README, and you should look for it in the release notes or the documentation site before you commit.
GoFrame Compared With a Router-First Stack
The obvious alternative in the Go world is a router-first stack: net/http or a lightweight router such as Fiber or chi, plus separately chosen libraries for ORM, configuration and tracing. The difference is not quality, it is where the decisions get made.
With a router-first stack, you pick each piece and you own the integration. Your config loader is whatever you chose, your ORM is whatever you chose, and the OpenTelemetry wiring is code you wrote or copied. Upgrades are independent: a new router release does not force an ORM upgrade. The cost is that you maintain the glue, and glue is where version conflicts and subtle behavioural mismatches live.
GoFrame inverts that. The integration is the product. Configuration formats, tracing and the HTTP server are designed to work together, and the `gf` CLI adds scaffolding on top. Upgrades move the whole set at once, which is simpler to reason about and harder to stage. If you need to stay on an older version of one component for a compatibility reason, the framework's coherence works against you.
A second comparison point is the standard library itself. For a service that exposes a handful of endpoints and talks to one database, net/http with a thin handler layer is genuinely sufficient, and GoFrame's value proposition is mostly about what you would otherwise write yourself. The framework earns its place when the list of things you would otherwise write yourself gets long: config in multiple formats, file watching for reload, tracing, structured logging, an ORM, and a scaffolding tool. Below that threshold, the framework is overhead.
Maintenance, Releases and Licence
The repository is not archived. Its last push was on 2026-09-17, and the most recent release listed is v2.10.3 from 2026-08-26, preceded by v2.10.2 and v2.10.1, both released on 2026-05-14. The gap between v2.10.1 and v2.10.2 on the same day suggests a patch released quickly after another, which is normal for a project of this size.
Upgrade cost is dominated by the module's breadth. Because GoFrame ships HTTP, database, config, encoding, crypto, i18n and tracing packages from one module, a version bump moves all of them together. You cannot take a tracing fix without also taking whatever changed in net/ or database/. The repository does provide tooling that makes the maintainers' own release process visible: `make branch to=vX.Y.Z` creates a fix/ branch from master, `make version to=vX.Y.Z` packs cmd/gf and rewrites version files, and `make tag to=vX.Y.Z` creates and pushes an annotated tag. Those targets are for maintainers, not consumers, but they show the release path is scripted rather than manual.
The licence is MIT, stated in both the README and the LICENSE file at the repository root. The README adds that it is "100% free and open-source, forever." MIT is permissive: it allows commercial use, modification and redistribution provided the copyright notice and permission notice are preserved. That is a statement about the licence text, not legal advice. If your organisation has rules about attribution in distributed binaries, the practical obligation is that the MIT notice travels with the code, and the transitive dependencies listed in go.mod carry their own licences, which you should enumerate from your own go.sum rather than assume.
Editorial conclusion
Adopt GoFrame if you are building a Go service and want HTTP, ORM, configuration, logging and OpenTelemetry tracing to come from one dependency tree rather than four or five separate libraries, and if you are comfortable with a framework that owns conventions beyond net/http. Do not adopt it if your project is a small CLI, a library with no server component, or a codebase where the standard library and a thin router are already the house style; the component-by-component story only pays off when you actually want several of the components. Before committing, verify three things in your own environment: that your Go toolchain is 1.23 or later, since go.mod declares go 1.23.0; that the transitive dependency set pulled in by go get -u github.com/gogf/gf/v2 is acceptable to your security review, because the module brings in OpenTelemetry SDK packages, gorilla/websocket, fsnotify and several encoding libraries; and that the API surface you plan to depend on is documented on pkg.go.dev for the version you pin, because the README points to the official site and GoDoc rather than reproducing the API. The repository's last push was on 2026-09-17 and the most recent release listed is v2.10.3 from 2026-08-26, so you are choosing a project with recent activity, not an abandoned tree.
Frequently asked questions
What Go version does GoFrame need?
The README states that GoFrame requires Go 1.23 or later, and go.mod declares go 1.23.0, so the two agree. A toolchain older than 1.23 will not build the module.
How do I install the GoFrame CLI?
The README installs it with go install github.com/gogf/gf/cmd/gf/v2@latest, separately from the framework module itself. Once installed, gf init hello scaffolds a project and gf run main.go runs it.
Can I use GoFrame as a full framework and also take only some of its components?
The README says you can use it as a full application framework, or pick individual components as needed. The repository layout supports that, with separate top-level directories such as database/, net/, encoding/ and crypto/.
What licence is GoFrame released under?
The README and the LICENSE file at the repository root state the MIT License. The README also describes it as free and open-source.
Where is the GoFrame API documented?
The README points to the official site at goframe.org, an English version at goframe.org/en, mirrors at goframe.org.cn and pages.goframe.org, an offline PDF build, and GoDoc at pkg.go.dev/github.com/gogf/gf/v2. The README itself does not reproduce the API reference.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/gogf-gf)