v0.5.3

From Strapi to your Astro in seconds_

Generate types, services, and Astro Actions automatically.

pnpm dlx strapi2front@latest

Type-safe

  • > TypeScript types from your real schema
  • > Collections, Singles, Components & Relations
  • > Full autocomplete in your IDE

Actions

  • > Pre-configured actions with Zod
  • > Full CRUD for every Content Type
  • > Built-in error handling

I18N Ready

  • > Detects your Strapi locales
  • > Generates Locale types automatically
  • > locale parameter in services

Flexible Architecture

  • > by-feature: collections/{name}/*
  • > Screaming architecture out of the box
  • > Co-located types, schemas, services & actions
SOON

Auth Support

  • > Login and register with Strapi multiples providers
  • > Generates auth helpers
  • > Works with Strapi Users & Permissions
SOON
Next.js TansTack Start Svelte React Nuxt.js

Multi-Framework Support

  • > Built for Astro today. Ready for your stack tomorrow
  • > One CLI. Every modern frontend framework

Your Astro code, automated

Don't waste time defining interfaces
strapi2front reads the Strapi schema
and generates native Astro Actions.

$ npx strapi2front@latest
   Project configuration detected
  ┌ strapi2front setup
  │
    Detected Configuration ─────╮
  │                              │
  │  Framework: Astro v^5.16.15  │
  │  TypeScript: enabled         │
  │  Package Manager: pnpm       │
  │                              │
  ├──────────────────────────────╯
  │
   What is your Strapi URL?
  │ http://localhost:1337 What is your Strapi API token?
  │ YOUR API TOKEN What version of Strapi are you using?
  │ Strapi v5
  │
   Where should we generate the Strapi files?
  │ src/strapi
  │
   What would you like to generate?
  │ Types, Services, Schemas, Astro Actions
  │
   Setup complete!v Created strapi.config.ts
  │ v Updated .env with Strapi credentials
  │ v Created output directory src/strapi
  │
  │ Next steps:1. Run npx strapi2front sync to generate files
  │  2. Import from src/strapi/collections/*
  │  3. Import services from src/strapi/collections/*.service
  │
  └ Happy Coding!