Getting Started with Typr
Typr is a type-safe code generator for JVM languages. It reads your database schemas and OpenAPI specifications, then generates fully-typed code that the compiler can verify.
Private Beta
Typr is currently in private beta. We're working with select teams to refine the experience before public release in early 2026.
Installation (available in beta)
Via Coursier (Recommended)β
cs install typr --channel https://typr.dev/channel
Via Homebrew (macOS)β
brew install oyvindberg/tap/typr
Via npm (Cross-platform)β
npm install -g @typr/cli
Direct Downloadβ
# Download the latest release
curl -L https://github.com/oyvindberg/typr/releases/latest/download/typr -o typr
chmod +x typr
# Or as a JAR file
curl -L https://github.com/oyvindberg/typr/releases/latest/download/typr.jar -o typr.jar
java -jar typr.jar --help
Quick Start (available in beta)
1. Initializeβ
typr init
Creates typr.yaml. You'll be prompted for language and first data source.
2. Configureβ
Edit typr.yaml:
sources:
postgres:
type: postgresql
host: localhost
database: myapp
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
output:
path: ./generated
package: com.myapp
language: java
3. Generateβ
typr
That's it. Running typr without arguments generates code.
4. Useβ
// Generated types are ready to use
UserRow user = userRepo.selectById(new UserId(123));
// Type-safe - can't mix up ID types
// userRepo.selectById(new OrderId(123)); // Compile error!
What's Next?β
- Databases - Database code generation
- REST APIs - OpenAPI code generation
- Unified Types - Share types across boundaries