☄️ Comet - Blazing-Fast, Schema-First ORM for Go

A lightweight, Prisma-inspired ORM for Go that prioritizes simplicity, speed, and type-safety.

Features
- Schema-first development with
.cmt files
- Fast, type-safe query building with fluent API
- Built-in CLI for codegen, migrations, and seeding
- Multiple database backends (PostgreSQL, MySQL, SQLite)
- Minimal dependencies, perfect for microservices
- Goroutine-optimized for async patterns
Quick Start
# Install ☄️ Comet CLI
go install github.com/nitrix4ly/comet/cli@latest
# Initialize project
mkdir myapp && cd myapp
go mod init myapp
# Create schema
cat > schema/schema.cmt << EOF
model User {
id Int @id @auto
email String @unique
name String
createdAt DateTime @default(now())
}
EOF
# Generate models
comet gen
# Run migrations
comet migrate
Documentation
See docs/GUIDE.md for complete setup and usage instructions.
Example Usage
import "myapp/models"
// Find users
users, err := models.User.Find().
Where("email", "=", "hello@comet.dev").
All(ctx)
// Create user
user := &models.User{
Email: "john@example.com",
Name: "John Doe",
}
err = user.Save(ctx)
Architecture
- cli/ - Command-line interface
- core/ - Core types and query builder
- gen/ - Code generation from schemas
- drivers/ - Database drivers
- schema/ - Schema definitions
- testz/ - Example applications
Contributing
- Fork the repository
- Create your feature branch
- Add tests for new functionality
- Submit a pull request
License
MIT License - see LICENSE file for details.
Built with ❤️ by Nitrix