--
← Back to blog
CLI Flags, MCP Server, WASM Playground, and Tooling

CLI Flags, MCP Server, WASM Playground, and Tooling

Command-Line Interface

NSL is a single executable with multiple modes:

nsl program.nsl             # run a program
nsl --compile program.nsl   # compile to bytecode (.nslc)
nsl --vm program.nslc       # execute bytecode
nsl --repl                  # interactive REPL
nsl --mcp                   # start MCP server (for AI tools)

Built-in Test Framework

No test library needed. Test blocks are part of the language:

test "math operations"
    expect 1 + 1 == 2
    expect 2 * 3 == 6, "multiplication"
    expect abs(-5) == 5

test "string operations"
    let s = "hello"
    expect len(s) == 5
    expect upper(s) == "HELLO"
    expect contains(s, "ell")

Tests run automatically with summary output:

PASSED: math operations (3/3)
PASSED: string operations (3/3)
-- 2 tests, 6 assertions, 0 failures --

NSL itself is tested with 1,983 tests across 14 test files.

MCP Server

NSL includes a Model Context Protocol (MCP) server that exposes NSL's capabilities to AI tools like Claude Code:

  • mcp__nsl__file -- Read, write, edit, glob, diff, search files
  • mcp__nsl__find -- Grep, symbols, semantic search, fuzzy find
  • mcp__nsl__do -- Run shell commands, evaluate NSL code
  • mcp__nsl__gpu -- Create tensors, matmul, activations, kernel launch
  • mcp__nsl__ai -- Embeddings, similarity, tokenize
  • mcp__nsl__net -- HTTP requests, web search, content extraction
  • mcp__nsl__browser -- Browser automation, screenshots, DevTools
  • mcp__nsl__data -- Parse/query JSON, CSV, YAML, XML
  • mcp__nsl__transform -- Batch find-and-replace across files
  • mcp__nsl__system -- System info, env vars, paths
  • mcp__nsl__benchmark -- Performance measurement
  • mcp__nsl__memory -- CPU/GPU memory management
  • Each tool supports parallel operations and auto-corrects typos in op names.

    WASM Playground

    NSL compiles to WebAssembly for browser execution. The playground on neuralsymboliclanguage.com lets you write and run NSL programs with zero installation.

    The WASM build includes:

  • Full interpreter with all 177 keywords
  • All built-in functions
  • Cognitive primitives and knowledge graph
  • Pattern matching and concurrency
  • Selected stdlib modules

File Formats

| Extension | Format | Purpose |

|-----------|--------|--------|

| .nsl | Source code | NSL programs |

| .nslc | Bytecode | Compiled VM programs |

| .nsd | NSD text | Human-friendly structured data |

| .nsdb | NSD binary | Machine-friendly structured data |

| .ncf | NCF binary | Compressed serialization with signing |

| .npme | NPME binary | Prediction engine state |

40 Stdlib Modules

All built in, no package manager:

math string file dir path json xml yaml csv http crypto regex time db sys os net html color uuid base64 url shell log async buffer event signal test debug tensor grad optim tokenizer train prediction py memory nsd ncf

All Posts