EN AR

NiaScript

Intent-Based Programming - Write what you want, not how

import { nia } from 'niascript';

// It's that simple!
const price = await nia`Bitcoin price`;
const news = await nia`5 tech news`;
const analysis = await nia`analyze ${price} with ${news}`;

console.log(analysis.value);
GitHub Examples

Features

🎯

Tagged Template Literals

Write intents as a natural part of JavaScript using backticks. No complex functions needed.

âš¡

Local Processing

Math, dates, and conversions run locally without any API. Fast and free.

🤖

AI Powered

Anything more complex is automatically sent to OpenRouter. Over 100 models available.

🔧

Code Generation

Generate complete Node.js scripts from intents. Auto-saved and executable.

👥

Agent System

Specialized agents for planning, building, reviewing, and testing. They work as a team.

💾

Smart Cache

Repeated results are cached. High performance at low cost.

📊

Dashboard + API

Express server with web dashboard, model selection, and persistent endpoints for every generated script.

🔄

Model Selection

Switch AI models from dashboard or API. Supports OpenAI, Grok, Arcee, and any custom OpenRouter model.

Examples

import { nia } from 'niascript';

// Math (local - no API)
const calc = await nia`calculate 25 * 4`;
console.log(calc.value); // 100

// Date & Time (local)
const date = await nia`what is today's date`;

// Anything else (AI)
const answer = await nia`what is the capital of France`;

Get Started

$ npm install niascript
$ npm run server   # Dashboard on :3003