Pre-AlphaMetaScript is in early design phase. The compiler is not yet available.Join Discord for updates
MetaScript

Quick Start

Get up and running with MetaScript in under 5 minutes. No complex setup required.

1. Create a new project

Run the create command to scaffold a new MetaScript project:

npm create metascript@latest my-app

2. Navigate to your project

Change into the project directory:

cd my-app

3. Run the dev server

Start the development server with hot reload:

npm run dev

4. Write your first MetaScript

Open src/main.ms and try the @derive macro:

@derive(Eq, Clone, Debug)
class User {
  name: string
  age: number
}

const alice = new User(name: "Alice", age: 30)
const clone = alice.clone()

console.log(alice.equals(clone))  // true
console.log(alice.toString())     // User { name: "Alice", age: 30 }

Pro tip: Run msc expand src/main.ms to see what code the @derive macro generates. This is a great way to understand how compile-time metaprogramming works.

What's Next?