v0.1.0

From Strapi to your Astro in seconds
_

Generate types, services, and Astro Actions automatically.

pnpm dlx strapi2front@latest

GitHub Repo

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-layer: types/, services/, actions/
  • > by-feature: collections/{name}/*
  • > You decide how to organize your code
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, Astro Actions
  │
   Detected Configuration
  │ Framework: Astro v5.16.15
  │ TypeScript: enabled
  │ Package Manager: pnpm Setup complete!v Created strapi.config.ts
  │ v Updated .env with Strapi credentials
  │
  │ Next steps:1. Run npx strapi2front sync to generate types
  │  2. Import types from src/strapi/types
  │  3. Import services from src/strapi/services
  │
  └ Happy Coding!