> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# types generate

> Generate TypeScript types from project resources

Generate a TypeScript declaration file (`types.d.ts`) from your local project resources. The command reads your [entities](https://docs.base44.com/developers/backend/resources/entities/overview.md), [functions](https://docs.base44.com/developers/backend/resources/backend-functions/overview.md), [agents](https://docs.base44.com/developers/backend/resources/agents/overview.md), [actors](https://docs.base44.com/developers/backend/resources/actors/overview.md), and [connectors](https://docs.base44.com/developers/references/sdk/docs/interfaces/connectors.md), and produces a type file that augments the `@base44/sdk` module with project-specific types. This gives you autocomplete for resource names, compile-time type checking, and typed data when reading or writing entities.

The generated file is written to `base44/.types/types.d.ts`. If a `tsconfig.json` file exists in your project root, the command automatically adds `base44/.types/*.d.ts` to its `include` array so TypeScript picks up the types without any manual configuration.

> [!NOTE]
>
> Re-run this command whenever you add, remove, or modify a resource to keep the
> types in sync.

## Usage

```bash theme={null}
base44 types generate
```

## What gets generated

**Entities** generate a TypeScript interface for each entity from its JSON schema. Fields are typed with required/optional markers and nested object types. An `EntityTypeRegistry` interface maps each entity name to its generated interface.

**Functions**, **agents**, **actors**, and **connectors** generate name registries only (`FunctionNameRegistry`, `AgentNameRegistry`, `ActorNameRegistry`, and `ConnectorTypeRegistry`). These list the names of your resources so your editor can autocomplete them, but they don't include parameter types, return types, or other configuration details.

## See also

* [Dynamic Types](https://docs.base44.com/developers/references/sdk/getting-started/dynamic-types.md): Learn how to use generated types in your code
* [Entities](https://docs.base44.com/developers/backend/resources/entities/overview.md): Learn about database schema configuration
* [Backend Functions](https://docs.base44.com/developers/backend/resources/backend-functions/overview.md): Create serverless API endpoints
* [Actors](https://docs.base44.com/developers/backend/resources/actors/overview.md): Run shared, live sessions with realtime messages and timers
* [Agent Configurations](https://docs.base44.com/developers/backend/resources/agents/overview.md): Configure AI agents for your app
* [Project Structure](https://docs.base44.com/developers/backend/overview/project-structure.md): How types fit into your project


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.