Getting Started
NAIDE uses one readable syntax for people and tools. It combines familiar control flow, optional type annotations, built-in application features, diagnostics, tests, and code generation for 15 targets. Hosted CI compiles and runs a representative program for every target; feature and framework coverage still varies by target.
Installation
Install the CLI globally via npm:
npm install -g naider
This gives you the naide command. Verify it works:
naide --version
Create a Project
Scaffold a new NAIDE project with init:
naide init my-app
cd my-app
npm install
npm run check
npm run dev
This creates a project directory with a starter .naide file and package.json.
Your First App
Create a file called app.naide:
# app.naide
server app port 3000:
get "/":
ret {message: "Hello from NAIDE"}
get "/greet/:name" (req, res):
ret {hello: req.params.name}
Run this simple HTTP server directly with NaideVM, NAIDE's interpreter:
naide app.naide
See the NaideVM comparison page for measured runtime, process-startup, and memory results against Node/V8, Bun/JavaScriptCore, and CPython.
For embedded workloads, NaideVM also offers experimental, opt-in native machine-code tiers on Windows x64. They target selected guarded hot functions and require the native bridge; the benchmark results are fixture-specific and do not imply that the default interpreter or general applications outperform V8.
Your server is now running at http://localhost:3000. Visit /greet/world to see {"hello":"world"}.
Check before running
Scaffolded projects include a check script. It catches supported type mismatches before starting the app:
npm run check
This checker is intentionally partial: expressions with unknown types may be treated as any. A clean check is helpful feedback, not a proof of correctness or runtime safety.
See the Output
To see what NAIDE generates without running it:
naide --emit app.naide
To write the output to a file:
naide -o app.mjs app.naide
Compile to Other Targets
NAIDE can generate code for 15 targets. Hosted CI compiles and runs a representative program for every target, but this does not imply full language-feature or framework parity. Use -t or --target to choose an output:
naide app.naide -t python # Python
naide app.naide -t bun # Bun
naide app.naide -t ts # TypeScript
naide app.naide -t go # Go
naide app.naide -t java # Java
naide app.naide -t rust # Rust
naide app.naide -t cpp # C++
naide app.naide -t c # C
naide app.naide -t csharp # C#
naide app.naide -t kotlin # Kotlin
naide app.naide -t swift # Swift
naide app.naide -t dart # Dart
naide app.naide -t php # PHP
naide app.naide -t ruby # Ruby
Watch Mode
Auto-restart on file changes during development:
naide -w app.naide
Build a Project
Transpile all .naide files to JavaScript:
naide build
Output goes to dist/ by default. You can specify source and output directories:
naide build src/ dist/
Editor Support
Install the VS Code extension with one command:
naide vscode
This provides syntax highlighting, LSP diagnostics, autocomplete, and hover docs for .naide files. Restart VS Code after installation.
For other editors, start the Language Server:
naide lsp
REPL
Start an interactive session to experiment with NAIDE syntax:
$ naide
NAIDE REPL v2.0.10 -- type NAIDE code; use .compile to inspect JavaScript output
Type .exit to quit, .eval to toggle eval mode
>>> str name = "hello"
const name = "hello";
>>> fn add(int a, int b) -> int:
... ret a + b
...
function add(a, b) {
return a + b;
}
Type .eval to switch to evaluation mode, which runs the code instead of showing the JavaScript output.
Deploy
Generate Docker deployment files:
naide deploy
Then build and run the container:
docker build -t my-naide-app .
docker run -p 3000:3000 my-naide-app
Quick Syntax Tour
Here are some of NAIDE's key syntax features to get you started:
Type Inference with auto
auto name = "hello" # inferred as str
auto count = 42 # inferred as int
auto items = [1, 2, 3] # inferred as list
Destructuring
auto {name, age} = user # object destructuring
auto [a, b] = items # array destructuring
Class Inheritance
schema Animal:
str name
fn speak() -> str:
ret "{self.name} speaks"
schema Dog extends Animal:
init(str name):
self.name = name
fn speak() -> str:
ret "{self.name} barks"
Pipe Operator
list result = items
|> filter((x) => x > 0)
|> map((x) => x * 2)
|> sort()
Optional Chaining & Null Coalescing
str name = user?.profile?.name ?? "Anonymous"
MCP Server
NAIDE includes a built-in stdio MCP server using the stateless 2026-07-28 protocol. It advertises capabilities with server/discover and requires protocol metadata on each request; legacy initialize-based clients are not supported:
naide-mcp
The naide_search tool retrieves evidence across the bundled specification, guides, examples, compiler/runtime source, and MCP/LSP/VS Code integrations. It returns file and line references and never searches arbitrary workspace files or installed dependencies. Use it with naide_context and naide_spec before deciding a feature is unsupported; source matches do not imply full target parity.
Next Steps
- Syntax Reference — learn the full language including all 40+ built-in functions
- Server & API — build web servers and APIs
- Bots — build Discord, Slack, Telegram, LINE bots
- AI / LLM — integrate AI into your apps
- CLI Reference — all commands, flags, and 15 compilation targets
- Playground — try NAIDE in your browser