Everything a script author needs to write, run, and extend KonsolScript (.ks) programs
together LLM APIs (OpenAI, Anthropic Claude, Google Gemini, Ollama) into automated, multi-model workflows.
→ Contributors and plugin authors: see Contributing
From beginner CLI tools to AI-powered pipelines - KonsolScript's modules and plugins cover a wide range of real-world apps:
File, Path, OS)CSV, JSON, List)kse_curl, JSON, File)Regex, kse_curl, JSON)Quick demo - fetch a public API and parse the response:
// curl_json.ks - HTTP fetch + JSON parse demo
//
// Install once, then run:
// minks install kse_curl (from inside curl_plugin/)
// minks helloworld/curl_json.ks
//
// Or load explicitly without installing:
// minks --plugin curl_plugin\kse_curl.dll helloworld\curl_json.ks (Windows)
// minks --plugin ./curl_plugin/kse_curl.so helloworld/curl_json.ks (Linux)
// minks --plugin ./curl_plugin/kse_curl.dylib helloworld/curl_json.ks (Mac)
#include "kse_curl"
Konsol:Print("=== Curl + JSON Demo ===");
// fetch a post from the public JSONPlaceholder API
Var:String response;
Var:Number status;
try {
Curl:Get("https://jsonplaceholder.typicode.com/posts/1", response);
} catch (CurlException e) {
Konsol:Print("fetch failed: ${e.message}");
Konsol:Exit(1);
}
Curl:Status(status);
Konsol:Print("HTTP ${status}");
// parse and extract fields
JSON:Parse(response, post);
Var:Number userId;
Var:Number postId;
Var:String title;
Var:String body;
JSON:Get("userId", post, userId);
JSON:Get("id", post, postId);
JSON:Get("title", post, title);
JSON:Get("body", post, body);
JSON:Free(post);
Konsol:Print("Post #${postId} by user ${userId}");
Konsol:Print("Title: ${title}");
Konsol:Print("---");
Konsol:Print(body);
→ Full test: helloworld/curl_json.ks
→ Hello World demos - fetch + JSON, AI chat, number guessing game, AI log triage
→ Full project ideas - beginner to advanced
→ LLM integration guide - full language reference and system prompt template so any LLM can generate valid KonsolScript for your app
→ Language Reference - types, operators, control flow, functions, classes, error handling, and the full standard library module reference
→ All built-in modules - Konsol, Math, String, File, Time, List, Dictionary, JSON, Path, OS, Regex, Date, Hash, CSV
→ OOP wrappers - object-oriented facades using return-type syntax instead of ByRef
KonsolScript has no garbage collector. Memory is freed immediately and deterministically - no background collector, no pauses, no tuning knobs.
KonsolScript distinguishes memory lifetime (when storage is freed) from visibility scope (where a name can be read or written).
Memory lifetime - all variable types are freed when the enclosing function returns:
| Type | Example | Freed when |
|---|---|---|
| Scalar | Var:String, Var:Number, Var:Boolean |
Enclosing function returns |
| Class instance | Var:MyClass |
Enclosing function returns |
| Collection | List:String, Array:Number, Dictionary |
Enclosing function returns |
Visibility scope - if, else, while, for, and foreach blocks each create their own scope. Variables declared inside a block are not visible outside it:
if (x > 0) {
Var:String label;
String:Set("positive", label);
// label is available here
}
// label is NOT available here
if (x > 0) {
Var:String msg;
String:Set("yes", msg);
} else {
// msg is NOT available here - if and else have separate scopes
}
Outer-scope variables remain visible and writable inside any nested block:
Var:String result;
if (x > 0) {
String:Set("positive", result); // result is from the enclosing scope
}
When a function returns, every variable in its local frame is freed immediately - scalars, class instances, and collections alike. Nothing is marked for later collection; it is freed now.
Variables declared at global scope (outside any function) live for the lifetime of the engine.
Collections declared at global scope are freed only when the engine exits. A global collection that keeps growing without being cleared holds memory for as long as the engine is alive. For long-running server scripts, clear global collections you no longer need:
Dictionary:Clear(myCache)
List:Clear(myLog)
→ minks CLI - how to run scripts, the REPL, flags (--check, --debug, --sandbox), exit codes, and the plugin package manager (minks install / remove / list)
Install a plugin once with minks install kse_<name>, then load it in any script with #include "kse_<name>".
| Plugin | Description |
|---|---|
| kse_curl | HTTP client - GET, POST, PUT, DELETE |
| kse_ws | WebSocket client |
| kse_net | LAN TCP networking |
| kse_sqlite | SQLite database (no external dependency) |
| kse_mysql | MySQL / MariaDB database |
| kse_pg | PostgreSQL client |
| kse_redis | Redis client |
| kse_zip | Zip archive read/write |
| kse_crypto | Cryptography |
| kse_jwt | JSON Web Tokens |
We welcome plugin contributions - see Contributing to get started.