Skip to content

Hatchback v0.1.8

Choose a tag to compare

@nachovoss nachovoss released this 12 Jan 16:47
· 15 commits to main since this release

🏎️ Hatchback v0.1.8

πŸš€ New Features

  • Database Import (inspect): You can now import existing databases into Hatchback!
    • hatchback inspect --url <db_url>: Generates SQLAlchemy 2.0 models from your database tables.
    • hatchback inspect --scaffold --url <db_url>: Automatically generates the full clean architecture (Models, Schemas, Repositories, Services, Routes) for every table in your database.
  • Version Command: Added hatchback --version to check your current CLI version.

πŸ› οΈ Improvements

  • Smart Scaffolding: Enhanced make and inspect logic to automatically handle singular/plural naming conventions (e.g., table users -> Model User).
  • Clean Imports: The model generator now automatically cleans unused imports and separates class logic for cleaner code.
  • Dependencies: Added sqlacodegen and psycopg2-binary to core requirements.

πŸ› Fixes

  • Fixed issues where sqlacodegen would generate multiple classes in a single file or include unwanted Base definitions.
  • Corrected import issues in the CLI command registration.