|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Introducing Type generation: Automate your type definitions with Appwrite" |
| 4 | +description: "Automatically generate types from your collections with support for multiple languages." |
| 5 | +date: 2025-06-24 |
| 6 | +cover: /images/blog/type-generation-feature/cover.png |
| 7 | +timeToRead: 4 |
| 8 | +author: chirag-aggarwal |
| 9 | +category: announcement |
| 10 | +--- |
| 11 | + |
| 12 | +We're excited to announce Appwrite’s newest CLI feature, **Type generation**. Designed specifically to enhance your developer experience. Type generation automates the creation of type definitions directly from your database collections, seamlessly integrating with your preferred programming language. |
| 13 | + |
| 14 | +# Say goodbye to manual mapping |
| 15 | + |
| 16 | +Manually creating and maintaining complex type definitions can be tedious, error-prone, and time-consuming. With Type generation, Appwrite does the heavy lifting for you. Automatically generate accurate and up-to-date type definitions, ensuring your code always syncs with your database schema. |
| 17 | + |
| 18 | +# Effortless multi-language support |
| 19 | + |
| 20 | +Whether you work with PHP, Swift, Dart, TypeScript, JavaScript, Java, or Kotlin, Type generation has you covered. The Appwrite CLI automatically detects your project's language and generates the appropriate type definitions, handling complex scenarios including [Enums](/docs/sdks#enums), class relationships, and language-specific semantics. We will continue to add support for more languages over time. |
| 21 | + |
| 22 | +# Simplified workflow, immediate benefits |
| 23 | + |
| 24 | +Using Type generation is straightforward. |
| 25 | + |
| 26 | +First, ensure you have the [Appwrite CLI](/docs/tooling/command-line/installation#getting-started) installed and your project is [initialised](/docs/tooling/command-line/installation#initialization). Then, run the following command in your terminal to pull collections from your Appwrite project: |
| 27 | + |
| 28 | +```bash |
| 29 | +appwrite pull collections |
| 30 | +``` |
| 31 | + |
| 32 | +To generate types, you can use the Appwrite CLI command: |
| 33 | +```bash |
| 34 | +appwrite types [options] <output-directory> |
| 35 | + |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +# Better experience: |
| 41 | + |
| 42 | +- **Time savings**: Eliminate hours of manual work and dedicate your time to building impactful features. |
| 43 | +- **Reduced errors**: Keep your types consistently aligned with your database schema, drastically reducing outdated and mismatched types. |
| 44 | +- **Faster iterations**: Automatically propagate schema changes, allowing for rapid development and seamless collaboration. |
| 45 | + |
| 46 | +# Built with you in mind |
| 47 | + |
| 48 | +Type generation was built explicitly for developers, addressing key pain points and enhancing your productivity. Whether using Appwrite in a cloud environment or self-hosted, Type generation fits seamlessly into your workflow. |
| 49 | + |
| 50 | +Many other solutions offer type generation limited to TypeScript, Appwrite expands your capabilities with robust multi-language support, ensuring you have flexibility and comprehensive integration, regardless of your preferred technology stack. |
| 51 | + |
| 52 | +By simplifying integration and reducing friction, type generation helps accelerate onboarding and ensures long-term satisfaction, significantly benefiting developer teams and their organizations. |
| 53 | + |
| 54 | +# More resources |
| 55 | + |
| 56 | +- [Visit the documentation to get started](/docs/products/databases/type-generation) |
| 57 | +- [Learn about using the Appwrite CLI](/blog/post/how-to-execute-database-migration-with-appwrite-cli) |
| 58 | +- [Improve your Appwrite developer experience with dev keys](/blog/post/improve-devex-dev-keys) |
0 commit comments