AI-powered React component generator
npm install @aitida/aiscriptAIScript is a compiler from human language to code.
Unlike Cursor or Copilot, AIScript separates AI code from human code, just like a compiler separates binary from application code.
This means you don’t need to read confusing AI code. Instead, focus on communicating your goal in english.
Example:
``tsx`
{/ PortfolioWrapper is a sleek modern ux container for the portfolio. It must span the entire page top to bottom /}
{/ PorfolioTitle must be a sleek, modern, well sized title with large and modern font - 'josh dir'. /}
{/ ProjectsGrid is a sleek modern container for the projects. It is a 3 column grid that stretches the screen. It takes children as props. /}
{sites.map(site => {
/* ProjectItem is a sleek, modern item to show off each project to each user.
It has a clearly visible rounded and thick border, large colorful text with a modern font.
Each project button should have its own background color coordinating with text color
All border colors should be the same
All boxes should be the same */
return
})}
This AIScript compiled into the website https://blog.aitida.com/
`bash`
npx @aitida/aiscript
Run this in root of your project to start compiling!Features
- 📝 TypeScript and JavaScript support
- ⚛️ React and Vue.js support
- 🎯 Next.js compatible
- ⚡️ Separates AI code from human code
You'll need an Anthropic API key to use AIScript. You can get one at Anthropic's website.
Set your API key as an environment variable:
`bash`
export ANTHROPIC_API_KEY='your-key-here'
1. In your React components, use the AIC namespace to indicate where you want AI-generated components:
`tsx
// React/Next.js Example (TypeScript)
import { AIC } from './aiscript';
function App() {
return (
`vue
My App
title="Amazing Product"
:price="99.99"
/>