Skip to content

Quick Start

Get up and running with Noorle plugins in 5 minutes.

Prerequisites

Before you begin, ensure you have:

  1. Noorle CLI installed:
bash
curl -L cli.noorle.dev | sh
  1. A Noorle account (for deployment):
bash
noorle login

Create Your First Plugin

Step 1: Initialize from Template

bash
# List available templates
noorle plugin list-templates

# Create with specific template
noorle plugin init my-first-plugin --template python

# Or use interactive selection
noorle plugin init my-first-plugin

Available templates:

  • python - Rapid development with familiar syntax
  • typescript - Type-safe JavaScript with better IDE support
  • javascript - Quick prototyping with minimal setup
  • go - Simple syntax with great concurrency
  • rust - Maximum performance and safety

Step 2: Install Dependencies

bash
cd my-first-plugin

# Check what's needed
noorle plugin prepare --check

# Install dependencies
noorle plugin prepare

This installs:

  • Language toolchain (Python/Node/Rust/Go)
  • WebAssembly tools (wasm-tools, wasmtime)
  • Project dependencies

Step 3: Understand the Structure

Every plugin has:

tree
my-first-plugin/
├── app.*                # Your plugin implementation
├── wit/world.wit        # WebAssembly interface (API definition)
├── build.sh             # Build script
├── prepare.sh           # Dependency installer
├── noorle.yaml          # Plugin configuration (optional)
└── dist/                # Build output
    ├── plugin.wasm      # Compiled WebAssembly component
    └── *.npack          # Deployment archive

Step 4: Define Your API

Edit wit/world.wit to define your plugin's functions:

wit
package noorle:my-first-plugin;

world my-first-plugin {
    /// Process data and return result
    export process: func(input: string) -> result<string, string>;
}

Important: Comments in WIT files become tool descriptions in Noorle!

Step 5: Implement Your Logic

Python Example

python
# app.py
import wit_world
from wit_world.types import Ok, Err

class WitWorld(wit_world.WitWorld):
    def process(self, input: str) -> wit_world.Result[str, str]:
        if not input:
            return Err("Input cannot be empty")
        return Ok(f"Processed: {input}")

TypeScript Example

typescript
// app.ts
export function process(input: string): Result<string, string> {
    if (!input) {
        return { tag: 'err', val: "Input cannot be empty" };
    }
    return { tag: 'ok', val: `Processed: ${input}` };
}

Step 6: Build Your Plugin

bash
noorle plugin build

This:

  1. Runs build.sh from your template
  2. Compiles to WebAssembly component
  3. Creates .npack archive in dist/

Step 7: Test Locally

bash
# Test with wasmtime
wasmtime run dist/plugin.wasm --invoke process "test data"

# Or use the included test script (if available)
./test.sh

Step 8: Deploy to Noorle

bash
# Deploy the plugin
noorle plugin deploy

# Or build and deploy in one command
noorle plugin publish

Your plugin is now:

  • ✅ Deployed to the platform
  • ✅ Auto-versioned (v1 for first deployment)
  • ✅ Available to AI agents via MCP
  • ✅ Ready to use

What's Next?

Customize Your Plugin

  1. Update the WIT interface - Add more functions
  2. Implement business logic - Add your specific functionality
  3. Configure permissions - Edit noorle.yaml if needed
  4. Add dependencies - Language-specific package files
  5. Test thoroughly - Local testing before deployment

Learn More

Example Ideas

Start with these simple plugin ideas:

  • Text Processor - Format, validate, or transform text
  • Data Validator - Check JSON schemas or data formats
  • API Wrapper - Wrap external APIs with clean interfaces
  • Calculator - Domain-specific calculations
  • Formatter - Convert between data formats

Troubleshooting

Build Fails

bash
# Ensure dependencies are installed
noorle plugin prepare

# Clean build
rm -rf dist/ && noorle plugin build

Deployment Fails

bash
# Check authentication
noorle login

# Verify build output exists
ls -la dist/*.npack

Need Help?