inertia-types

Map Go model fields to TypeScript interfaces and i18n JSON files.

16|11|Updated Jun 12, 2025
One-click install
npx skills add https://github.com/liwoo/goravel-inertia-tw-starter --skill inertia-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inertia-types
Source: https://github.com/liwoo/goravel-inertia-tw-starter/tree/main/.claude/skills/inertia-types
Command: npx skills add https://github.com/liwoo/goravel-inertia-tw-starter --skill inertia-types

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate TypeScript types and i18n namespaces from Goravel Go models to streamline frontend type safety and translations for entities.

Core Features & Use Cases

  • Create TS interfaces that mirror Go models (with camelCase for TS and snake_case from Go JSON).
  • Generate translation namespace JSON files for localization and UI labels.
  • Example: apply the generator when defining a new Goravel entity to automatically scaffold types and translations.

Quick Start

Run the inertia-types tool to generate TS types and translations from your Go models for a Goravel entity.

Frequently Asked Questions about inertia-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types from Go models in a Goravel project?

To generate TypeScript types from Go models, the inertia-types tool maps Go struct fields to TS interfaces with camelCase naming and snake_case JSON tags, outputting them to resources/js/types for frontend integration.

How do I create i18n translation files from Go entities for frontend localization?

Creating i18n translation files from Go entities involves generating namespace JSON resources under resources/js/locales, providing UI labels and translations that align with your TypeScript interfaces for frontend localization.

Does inertia-types support camelCase TypeScript fields alongside snake_case JSON from Go?

Yes, inertia-types supports camelCase TypeScript field names alongside snake_case JSON from Go, automatically mapping the Go model fields to maintain consistency between backend serialization and frontend type safety.

What is the best way to scaffold TypeScript interfaces and translations for a new Goravel entity?

The best way to scaffold TypeScript interfaces and translations for a new Goravel entity is running the inertia-types generator, which simultaneously creates TS types in resources/js/types and i18n JSON namespaces in resources/js/locales.

Can I use inertia-types to map Go data types to TypeScript equivalents automatically?

Yes, you can use inertia-types to automatically map Go data types to TypeScript equivalents, converting Go model field types into their corresponding TS interface properties to streamline frontend type safety.

Do I need a specific frontend directory structure to generate TS types and i18n from Goravel models?

You need the resources/js/types and resources/js/locales directories in your frontend project structure, as inertia-types updates these specific paths to inject the generated TypeScript interfaces and translation JSON files respectively.