Add three new example scripts demonstrating the fswatch, sysinfo, and udp modules with file watching, system metrics, and UDP echo server/client patterns. Reorder the manual API sidebar navigation to list modules alphabetically, removing deprecated entries like websocket, tls, net, json, regex, jinja, os, signal, subprocess, sqlite, and timer while adding argparse, dataset, fswatch, and html.
211 lines
11 KiB
HTML
211 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<!-- retoor <retoor@molodetz.nl> -->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Wren-CLI Manual</title>
|
|
<link rel="stylesheet" href="css/style.css">
|
|
</head>
|
|
<body>
|
|
<button class="mobile-menu-toggle">Menu</button>
|
|
<div class="container">
|
|
<aside class="sidebar">
|
|
<div class="sidebar-header">
|
|
<h1><a href="index.html">Wren-CLI</a></h1>
|
|
<div class="version">v0.4.0</div>
|
|
</div>
|
|
<nav class="sidebar-nav">
|
|
<div class="section">
|
|
<span class="section-title">Getting Started</span>
|
|
<ul>
|
|
<li><a href="getting-started/index.html">Overview</a></li>
|
|
<li><a href="getting-started/installation.html">Installation</a></li>
|
|
<li><a href="getting-started/first-script.html">First Script</a></li>
|
|
<li><a href="getting-started/repl.html">Using the REPL</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section">
|
|
<span class="section-title">Language</span>
|
|
<ul>
|
|
<li><a href="language/index.html">Syntax Overview</a></li>
|
|
<li><a href="language/classes.html">Classes</a></li>
|
|
<li><a href="language/methods.html">Methods</a></li>
|
|
<li><a href="language/control-flow.html">Control Flow</a></li>
|
|
<li><a href="language/fibers.html">Fibers</a></li>
|
|
<li><a href="language/modules.html">Modules</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section">
|
|
<span class="section-title">API Reference</span>
|
|
<ul>
|
|
<li><a href="api/index.html">Overview</a></li>
|
|
<li><a href="api/string.html">String</a></li>
|
|
<li><a href="api/number.html">Num</a></li>
|
|
<li><a href="api/argparse.html">argparse</a></li>
|
|
<li><a href="api/base64.html">base64</a></li>
|
|
<li><a href="api/crypto.html">crypto</a></li>
|
|
<li><a href="api/dataset.html">dataset</a></li>
|
|
<li><a href="api/datetime.html">datetime</a></li>
|
|
<li><a href="api/dns.html">dns</a></li>
|
|
<li><a href="api/env.html">env</a></li>
|
|
<li><a href="api/fswatch.html">fswatch</a></li>
|
|
<li><a href="api/html.html">html</a></li>
|
|
<li><a href="api/http.html">http</a></li>
|
|
<li><a href="api/io.html">io</a></li>
|
|
<li><a href="api/jinja.html">jinja</a></li>
|
|
<li><a href="api/json.html">json</a></li>
|
|
<li><a href="api/markdown.html">markdown</a></li>
|
|
<li><a href="api/math.html">math</a></li>
|
|
<li><a href="api/net.html">net</a></li>
|
|
<li><a href="api/os.html">os</a></li>
|
|
<li><a href="api/pathlib.html">pathlib</a></li>
|
|
<li><a href="api/regex.html">regex</a></li>
|
|
<li><a href="api/scheduler.html">scheduler</a></li>
|
|
<li><a href="api/signal.html">signal</a></li>
|
|
<li><a href="api/sqlite.html">sqlite</a></li>
|
|
<li><a href="api/subprocess.html">subprocess</a></li>
|
|
<li><a href="api/sysinfo.html">sysinfo</a></li>
|
|
<li><a href="api/tempfile.html">tempfile</a></li>
|
|
<li><a href="api/timer.html">timer</a></li>
|
|
<li><a href="api/tls.html">tls</a></li>
|
|
<li><a href="api/udp.html">udp</a></li>
|
|
<li><a href="api/uuid.html">uuid</a></li>
|
|
<li><a href="api/wdantic.html">wdantic</a></li>
|
|
<li><a href="api/web.html">web</a></li>
|
|
<li><a href="api/websocket.html">websocket</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section">
|
|
<span class="section-title">Tutorials</span>
|
|
<ul>
|
|
<li><a href="tutorials/index.html">Tutorial List</a></li>
|
|
<li><a href="tutorials/http-client.html">HTTP Client</a></li>
|
|
<li><a href="tutorials/websocket-chat.html">WebSocket Chat</a></li>
|
|
<li><a href="tutorials/database-app.html">Database App</a></li>
|
|
<li><a href="tutorials/template-rendering.html">Templates</a></li>
|
|
<li><a href="tutorials/cli-tool.html">CLI Tool</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="section">
|
|
<span class="section-title">How-To Guides</span>
|
|
<ul>
|
|
<li><a href="howto/index.html">How-To List</a></li>
|
|
<li><a href="howto/http-requests.html">HTTP Requests</a></li>
|
|
<li><a href="howto/json-parsing.html">JSON Parsing</a></li>
|
|
<li><a href="howto/regex-patterns.html">Regex Patterns</a></li>
|
|
<li><a href="howto/file-operations.html">File Operations</a></li>
|
|
<li><a href="howto/async-operations.html">Async Operations</a></li>
|
|
<li><a href="howto/error-handling.html">Error Handling</a></li>
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
</aside>
|
|
<main class="content">
|
|
<div class="hero">
|
|
<h1>Wren-CLI Manual</h1>
|
|
<p>A complete reference for the Wren scripting language command-line interface with networking, async I/O, and extended module support.</p>
|
|
<div class="hero-buttons">
|
|
<a href="getting-started/index.html" class="primary-btn">Get Started</a>
|
|
<a href="api/index.html" class="secondary-btn">API Reference</a>
|
|
</div>
|
|
</div>
|
|
|
|
<article>
|
|
<h2>What is Wren-CLI?</h2>
|
|
<p>Wren-CLI is a command-line interface for the <a href="https://wren.io">Wren programming language</a>, extended with powerful modules for networking, file I/O, databases, and more. It provides an async event loop powered by libuv, making it suitable for building servers, automation scripts, and command-line tools.</p>
|
|
|
|
<div class="card-grid">
|
|
<div class="card">
|
|
<h3><a href="getting-started/index.html">Getting Started</a></h3>
|
|
<p>Install Wren-CLI, write your first script, and learn the basics of the language.</p>
|
|
</div>
|
|
<div class="card">
|
|
<h3><a href="language/index.html">Language Reference</a></h3>
|
|
<p>Learn about classes, methods, control flow, fibers, and the module system.</p>
|
|
</div>
|
|
<div class="card">
|
|
<h3><a href="api/index.html">API Reference</a></h3>
|
|
<p>Complete documentation for all 32 built-in modules including HTTP, WebSocket, and SQLite.</p>
|
|
</div>
|
|
<div class="card">
|
|
<h3><a href="tutorials/index.html">Tutorials</a></h3>
|
|
<p>Step-by-step guides for building real applications with Wren-CLI.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Available Modules</h2>
|
|
<p>Wren-CLI provides a rich set of modules for common programming tasks:</p>
|
|
|
|
<h3>Networking</h3>
|
|
<div class="module-grid">
|
|
<a href="api/http.html" class="module-card">http</a>
|
|
<a href="api/websocket.html" class="module-card">websocket</a>
|
|
<a href="api/tls.html" class="module-card">tls</a>
|
|
<a href="api/net.html" class="module-card">net</a>
|
|
<a href="api/udp.html" class="module-card">udp</a>
|
|
<a href="api/dns.html" class="module-card">dns</a>
|
|
</div>
|
|
|
|
<h3>Data Processing</h3>
|
|
<div class="module-grid">
|
|
<a href="api/json.html" class="module-card">json</a>
|
|
<a href="api/base64.html" class="module-card">base64</a>
|
|
<a href="api/regex.html" class="module-card">regex</a>
|
|
<a href="api/jinja.html" class="module-card">jinja</a>
|
|
<a href="api/crypto.html" class="module-card">crypto</a>
|
|
</div>
|
|
|
|
<h3>System</h3>
|
|
<div class="module-grid">
|
|
<a href="api/os.html" class="module-card">os</a>
|
|
<a href="api/env.html" class="module-card">env</a>
|
|
<a href="api/signal.html" class="module-card">signal</a>
|
|
<a href="api/subprocess.html" class="module-card">subprocess</a>
|
|
<a href="api/io.html" class="module-card">io</a>
|
|
<a href="api/pathlib.html" class="module-card">pathlib</a>
|
|
<a href="api/sysinfo.html" class="module-card">sysinfo</a>
|
|
<a href="api/fswatch.html" class="module-card">fswatch</a>
|
|
</div>
|
|
|
|
<h3>Data & Time</h3>
|
|
<div class="module-grid">
|
|
<a href="api/sqlite.html" class="module-card">sqlite</a>
|
|
<a href="api/datetime.html" class="module-card">datetime</a>
|
|
<a href="api/timer.html" class="module-card">timer</a>
|
|
<a href="api/math.html" class="module-card">math</a>
|
|
<a href="api/scheduler.html" class="module-card">scheduler</a>
|
|
</div>
|
|
|
|
<h2>Quick Example</h2>
|
|
<pre><code>import "http" for Http
|
|
import "json" for Json
|
|
|
|
var response = Http.get("https://api.github.com/users/wren-lang")
|
|
var data = Json.parse(response.body)
|
|
|
|
System.print("User: %(data["login"])")
|
|
System.print("Repos: %(data["public_repos"])")</code></pre>
|
|
|
|
<h2>Features</h2>
|
|
<ul>
|
|
<li><strong>Async I/O</strong> - Non-blocking operations powered by libuv</li>
|
|
<li><strong>HTTP/HTTPS</strong> - Full HTTP client with TLS support</li>
|
|
<li><strong>WebSocket</strong> - Client and server WebSocket support</li>
|
|
<li><strong>SQLite</strong> - Embedded database for persistent storage</li>
|
|
<li><strong>Templates</strong> - Jinja2-compatible template engine</li>
|
|
<li><strong>Regex</strong> - Full regular expression support</li>
|
|
<li><strong>Cross-platform</strong> - Runs on Linux, macOS, and FreeBSD</li>
|
|
</ul>
|
|
</article>
|
|
|
|
<footer class="page-footer">
|
|
<span></span>
|
|
<a href="getting-started/index.html" class="next">Getting Started</a>
|
|
</footer>
|
|
</main>
|
|
</div>
|
|
<script src="js/main.js"></script>
|
|
</body>
|
|
</html>
|