Skip to content

Installation

Arsfy edited this page May 24, 2026 · 1 revision

Installation

Requirements

  • Go 1.26 or newer.
  • A database supported by GCORM: PostgreSQL, MySQL, or SQLite.
  • A database/sql driver in your application.

The CLI is named gco.

Install With Go

The recommended install method is:

go install github.com/arsfy/gcorm/cmd/gco@latest

Make sure your Go binary directory is on PATH:

go env GOPATH

The installed binary is usually under:

$(go env GOPATH)/bin/gco

Verify the install:

gco version
gco help

Install From Source

From a local checkout:

go run ./cmd/gco help
go build ./cmd/gco

Source builds are useful for development, but normal users should prefer go install or release archives.

Release Archives

If you download a prebuilt binary from GitHub Releases, place it on your PATH and run:

gco version

Manual release binaries must be updated manually. The gco upgrade command is reserved for binaries installed with:

go install github.com/arsfy/gcorm/cmd/gco@version

Database Drivers For Your Application

GCORM generates code that uses database/sql. Your application must import a driver for the database you connect to.

PostgreSQL:

go get github.com/jackc/pgx/v5/stdlib
import _ "github.com/jackc/pgx/v5/stdlib"

MySQL:

go get github.com/go-sql-driver/mysql
import _ "github.com/go-sql-driver/mysql"

SQLite:

go get modernc.org/sqlite
import _ "modernc.org/sqlite"

Connection URL Examples

PostgreSQL:

postgresql://user:password@localhost:5432/app?sslmode=disable
postgres://user:password@localhost:5432/app?sslmode=disable

MySQL:

user:password@tcp(localhost:3306)/app?parseTime=true
mysql://user:password@localhost:3306/app?parseTime=true

SQLite:

file:./data/app.db?cache=shared&mode=rwc
sqlite://./data/app.db
./data/app.db

Clone this wiki locally