This getting started tutorial shows a simple example on how to use repogen. You can also see the working code inside `examples` directory for more information.
### Step 1: Download and install repogen
Run this command in your terminal to download and install repogen
```
$ go get github.com/sunboyy/repogen
```
### Step 2: Write a repository specification
Write repository specification as an interface in the same file as the model struct. There are 4 types of operations that are currently supported and are determined by the first word of the method name. Single-entity and multiple-entity modes are determined be the first return value. More complex queries can also be written.
```go
// You write this interface specification (comment is optional)
type UserRepository interface {
// InsertOne stores userModel into the database and returns inserted ID if insertion
You can also write the above command in the `go:generate` format inside Go files in order to generate the implementation when `go generate` command is executed.