ServiceStack v8.6!

We’re excited to announce Text to Blazor - our first initiative for harnessing AI to help to rapidly
generating Blazor Apps!

Text to Blazor is a new online project creator that lets you generate a new Blazor CRUD App from just a text description. It queries 5 different high quality AI models to generate 5 different Data Models, APIs, DB Migrations and Admin UIs which you can browse to find the one that best matches your requirements.

Unlike most AI generators, LLMs are only used to generate the initial Data Models within a TypeScript Declaration file which is the best format supported by AI models that’s also the best typed DSL for defining data models with minimal syntax that’s easy for humans to read and write.

New okai tool for Rapid App Development

The new okai npm tool works similar to the online Text to Blazor App generator except it’s a local tool that can add additional functionality to an existing project.

The syntax for adding a new feature to your Web App is npx okai <prompt>, e.g:

npx okai "The kind of Feature you would like to add"

Where it will generate the Data Models, AutoQuery CRUD APIs, DB Migrations and Admin UI for the
selected feature which you’ll see after selecting the LLM Data Models you want to use.

FREE Access to the worlds most popular AI Models

As part of the development of okai for generating Blazor CRUD Apps from a text prompt
using your preferred AI Models, we’ve also made available a generic chat prompt that can be used as a
convenient way to conduct personal research against many of the worlds most popular Large Language Models - for Free!

No API Keys, no Signups, no installs, no cost, you can just start immediately using the npx okai chat script to ask LLMs for assistance:

npx okai chat "command to copy a folder with rsync?"

This will use the default model (currently codestral:22b) to answer your question.

You can also use your preferred model with the -m <model> flag with either the model name or its alias, e.g you can use Microsoft’s PHI-4 14B model with:

npx okai -m phi chat "command to copy folder with rsync?"

As of this time there are 47 different models to choose from which you can view with:

npx okai ls models

Generate CRUD APIs and Admin UIs from existing DBs

This release also enables a new and flexible way to generate AutoQuery CRUD APIs and Admin UIs for an existing database using TypeScript Data Models which serve as the blueprint for generating everything needed to support the feature in your App, including the AutoQuery CRUD APIs, Admin UIs and DB Migrations.

First step is capturing metadata from existing RDBMS tables with the App.json AppTask which uses your App’s configured DB connection to generate the metadata:

dotnet run --AppTasks=App.json

The generated App_Data/App.json metadata can then be converted into TypeScript Data Models with the okai tool:

npx okai convert App_Data/App.json > ../MyApp.ServiceModel/App.d.ts

Where you’ll then be able to use okai’s existing code generation framework to customize the Data Models before generating their CRUD APIs and Admin UIs.


Please checkout the ServiceStack v8.6 Release Notes for more info.