Skip to content

[Feature]: Add base44 types command for TypeScript type generation #101

Description

@gonengar

Problem Statement

Summary

Add a new base44 types command that generates TypeScript types from local entity schemas, enabling type-safe usage of the @base44/sdk.

Problem

Developers using Base44 define entities in JSON schema files, but lack TypeScript types for:

  • Type-safe data access in frontend code
  • IDE autocomplete when working with entities
  • Compile-time validation of entity properties

Solution

The base44 types command reads local entity schemas and generates:

File Contents
entities.ts Entity interfaces + CreateInput/UpdateInput/Filter types
client.ts Typed SDK client interface matching @base44/sdk API
index.ts Barrel exports

Usage

# Generate types (outputs to src/base44/)
base44 types

# Custom output directory
base44 types --output ./types

# Only generate entity types, skip client wrapper
base44 types --entities-only

### Proposed Solution

_No response_

### Alternatives Considered

_No response_

### Usage Examples

_No response_

### Additional Context

_No response_

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions