plainscript-lang 1.0.2 → 1.0.3-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +194 -736
  2. package/compiler/cli.js +13 -17
  3. package/compiler/generator.js +93 -21
  4. package/compiler/version.js +1 -1
  5. package/docs/CAPABILITY_GAP_AUDIT.md +98 -536
  6. package/docs/PLAINSCRIPT-SPEC.md +308 -557
  7. package/docs/index.html +101 -599
  8. package/docs/website/script.js +59 -1029
  9. package/docs/website/style.css +74 -656
  10. package/examples/ai-providers.pln +7 -0
  11. package/examples/arrays.pln +4 -12
  12. package/examples/async-errors.pln +18 -0
  13. package/examples/auth-api.pln +3 -50
  14. package/examples/auth-sessions.pln +32 -0
  15. package/examples/basics.pln +14 -0
  16. package/examples/bots.pln +13 -0
  17. package/examples/cache-and-jobs.pln +6 -28
  18. package/examples/cache-schedule.pln +22 -0
  19. package/examples/collections.pln +15 -0
  20. package/examples/concurrency.pln +12 -43
  21. package/examples/conditions.pln +22 -0
  22. package/examples/database.pln +6 -39
  23. package/examples/day2.pln +6 -6
  24. package/examples/day3.pln +4 -10
  25. package/examples/deployment.pln +3 -9
  26. package/examples/email-send.pln +3 -22
  27. package/examples/error-handling.pln +6 -54
  28. package/examples/expressions.pln +7 -40
  29. package/examples/file-uploads.pln +5 -34
  30. package/examples/files-and-config.pln +5 -46
  31. package/examples/files.pln +12 -0
  32. package/examples/football-backend/app.pln +21 -20
  33. package/examples/functions.pln +17 -0
  34. package/examples/hello.pln +2 -3
  35. package/examples/http-client.pln +3 -44
  36. package/examples/http.pln +11 -0
  37. package/examples/id-verification/app.pln +4 -3
  38. package/examples/id-verification/make-sample-id.js +29 -42
  39. package/examples/json.pln +11 -0
  40. package/examples/loops.pln +13 -11
  41. package/examples/modules/app.pln +3 -16
  42. package/examples/modules/main.pln +4 -0
  43. package/examples/modules/math.pln +5 -16
  44. package/examples/objects.pln +3 -11
  45. package/examples/ocr.pln +22 -0
  46. package/examples/packages.pln +6 -0
  47. package/examples/record-kinds.pln +6 -42
  48. package/examples/records.pln +15 -0
  49. package/examples/rest-api-fetch.pln +6 -90
  50. package/examples/rest-api.pln +5 -65
  51. package/examples/scheduled-tasks.pln +4 -23
  52. package/examples/search-and-filter.pln +4 -34
  53. package/examples/server.pln +5 -24
  54. package/examples/sessions-and-cookies.pln +4 -50
  55. package/examples/sqlite.pln +23 -0
  56. package/examples/start.pln +2 -2
  57. package/examples/stdlib.pln +4 -41
  58. package/examples/telegram-ai-bot.pln +19 -0
  59. package/examples/telegram-bot.pln +4 -40
  60. package/examples/testing.pln +13 -0
  61. package/examples/web-api.pln +27 -0
  62. package/examples/web-app.pln +4 -16
  63. package/examples/websocket-server.pln +5 -26
  64. package/examples/websocket.pln +13 -0
  65. package/examples/whatsapp-bot/pairing.pln +4 -5
  66. package/examples/whatsapp-bot/qr.pln +7 -3
  67. package/package.json +2 -2
package/docs/index.html CHANGED
@@ -1,613 +1,115 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>PlainScript - When even a simple sentence can be code</title>
7
- <meta name="description" content="PlainScript is an Intent-Oriented Programming Language. Write code that reads like plain English and compiles to JavaScript.">
8
- <meta name="keywords" content="PlainScript, programming language, intent-oriented, JavaScript, compiler, plain English code">
9
- <link rel="canonical" href="https://ayoistooslick.github.io/plainscript/">
10
-
11
- <meta property="og:type" content="website">
12
- <meta property="og:title" content="PlainScript - When even a simple sentence can be code">
13
- <meta property="og:description" content="PlainScript is an Intent-Oriented Programming Language. Write code that reads like plain English and compiles to JavaScript.">
14
- <meta property="og:image" content="https://ayoistooslick.github.io/plainscript/logo.jpg">
15
- <meta property="og:url" content="https://ayoistooslick.github.io/plainscript/">
16
-
17
- <meta name="twitter:card" content="summary_large_image">
18
- <meta name="twitter:title" content="PlainScript - When even a simple sentence can be code">
19
- <meta name="twitter:description" content="PlainScript is an Intent-Oriented Programming Language. Write code that reads like plain English and compiles to JavaScript.">
20
- <meta name="twitter:image" content="https://ayoistooslick.github.io/plainscript/logo.jpg">
21
-
22
- <link rel="preconnect" href="https://fonts.googleapis.com">
23
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
24
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
25
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
26
-
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="description" content="PlainScript 1.0.3-beta language reference and examples">
7
+ <title>PlainScript 1.0.3-beta</title>
27
8
  <link rel="stylesheet" href="website/style.css">
28
- <meta name="theme-color" content="#0a0a0a">
29
9
  </head>
30
10
  <body>
31
-
32
- <!-- Navigation -->
33
- <nav class="site-nav">
34
- <div class="nav-container">
35
- <a href="#" class="nav-logo">
36
- <img src="logo.jpg" alt="PlainScript Logo">
37
- <span class="logo-word">PlainScript</span>
38
- <span class="logo-ver">v1.0.2</span>
11
+ <header class="site-nav">
12
+ <div class="container nav-inner">
13
+ <a class="nav-logo" href="#">
14
+ <img src="logo.jpg" alt="" class="nav-logo-image">
15
+ <span>PlainScript</span>
16
+ <span class="logo-ver">1.0.3-beta</span>
39
17
  </a>
40
- <div class="nav-links">
18
+ <nav class="nav-links" aria-label="Primary navigation">
19
+ <a href="#quickstart">Quick start</a>
41
20
  <a href="#language">Language</a>
42
- <a href="#examples">Examples</a>
43
- <a href="#library">Library</a>
44
- <a href="#cli">CLI</a>
45
- <a href="#packages">Packages</a>
46
- <a href="#faq">FAQ</a>
47
- </div>
48
- <div class="nav-actions">
49
- <a href="https://github.com/ayoistooslick/plainscript" class="btn btn-outline" target="_blank" rel="noopener">
50
- <i class="fab fa-github"></i> GitHub
51
- </a>
52
- <a href="https://www.npmjs.com/package/plainscript-lang" class="btn btn-primary" target="_blank" rel="noopener">
53
- <i class="fab fa-npm"></i> npm
54
- </a>
55
- </div>
56
- <button id="nav-hamburger" class="nav-hamburger" aria-label="Toggle menu">
57
- <i class="fas fa-bars"></i>
58
- </button>
59
- </div>
60
- </nav>
61
-
62
- <!-- Mobile Menu -->
63
- <div id="mobile-menu" class="mobile-menu">
64
- <div class="mobile-menu-links">
65
- <a href="#language">Language</a>
66
- <a href="#examples">Examples</a>
67
- <a href="#library">Library</a>
68
- <a href="#cli">CLI</a>
69
- <a href="#packages">Packages</a>
70
- <a href="#faq">FAQ</a>
71
- </div>
72
- <div class="mobile-menu-actions">
73
- <a href="https://github.com/ayoistooslick/plainscript" class="btn btn-outline mobile-menu-btn" target="_blank" rel="noopener">
74
- <i class="fab fa-github"></i> GitHub
75
- </a>
76
- <a href="https://www.npmjs.com/package/plainscript-lang" class="btn btn-primary mobile-menu-btn" target="_blank" rel="noopener">
77
- <i class="fab fa-npm"></i> npm
78
- </a>
79
- </div>
80
- </div>
81
-
82
- <!-- Three.js Background Canvas -->
83
- <canvas id="bg-canvas"></canvas>
84
-
85
- <!-- Hero Section -->
86
- <section class="hero">
87
- <div class="hero-content">
88
- <div class="hero-badge">v1.0.2: intent-oriented, TypeScript-capable</div>
89
- <h1 class="hero-title">
90
- Write code that<br>
91
- reads like <span class="green">Plain English</span>
92
- </h1>
93
- <p class="hero-subtitle">
94
- PlainScript is an Intent-Oriented Programming Language. You describe what you want; the compiler decides how to implement it in JavaScript.
95
- </p>
96
- <div class="hero-actions">
97
- <a href="#quickstart" class="btn btn-primary btn-lg">Get Started</a>
98
- <a href="https://github.com/ayoistooslick/plainscript" class="btn btn-outline btn-lg" target="_blank" rel="noopener">View on GitHub</a>
99
- </div>
100
- <div class="hero-code">
101
- <div class="code-window">
102
- <div class="code-window-header">
103
- <div class="code-window-dots">
104
- <span class="dot red"></span>
105
- <span class="dot yellow"></span>
106
- <span class="dot green"></span>
107
- </div>
108
- <span class="code-window-title">app.pln</span>
109
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
110
- </div>
111
- <div class="code-window-body">
112
- <pre><code>web app
113
- route get "/"
114
- reply "Hello, World!"
115
- done
116
-
117
- print "Server is running"</code></pre>
118
- </div>
119
- </div>
120
- <div class="code-window">
121
- <div class="code-window-header">
122
- <div class="code-window-dots">
123
- <span class="dot red"></span>
124
- <span class="dot yellow"></span>
125
- <span class="dot green"></span>
126
- </div>
127
- <span class="code-window-title">Compiled Output (JavaScript)</span>
128
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
129
- </div>
130
- <div class="code-window-body">
131
- <pre><code>const express = require("express");
132
- const app = express();
133
- app.get("/", (req, res) => {
134
- res.send("Hello, World!");
135
- });
136
- app.listen(3000);
137
- console.log("Server is running");</code></pre>
138
- </div>
139
- </div>
140
- </div>
141
- </div>
142
- </section>
143
-
144
- <!-- Stats Row -->
145
- <section class="stats-row">
146
- <div class="stat-item">
147
- <div class="stat-number">40+</div>
148
- <div class="stat-label">Keywords</div>
149
- </div>
150
- <div class="stat-item">
151
- <div class="stat-number">35+</div>
152
- <div class="stat-label">Built-in Functions</div>
153
- </div>
154
- <div class="stat-item">
155
- <div class="stat-number">6</div>
156
- <div class="stat-label">Versions</div>
157
- </div>
158
- <div class="stat-item">
159
- <div class="stat-number">&lt; 1s</div>
160
- <div class="stat-label">Compile Time</div>
161
- </div>
162
- </section>
163
-
164
- <!-- Features Section -->
165
- <section id="language" class="section">
166
- <div class="container">
167
- <div class="section-tag">Language Features</div>
168
- <h2 class="section-title">Built for developer happiness</h2>
169
- <div class="features-grid">
170
- <div class="feature-card">
171
- <div class="feature-icon">
172
- <i class="fas fa-lightbulb"></i>
173
- </div>
174
- <h3 class="feature-title">Intent-Oriented</h3>
175
- <p class="feature-desc">Describe what you want. The compiler figures out the how.</p>
176
- </div>
177
- <div class="feature-card">
178
- <div class="feature-icon">
179
- <i class="fas fa-cube"></i>
180
- </div>
181
- <h3 class="feature-title">Package System</h3>
182
- <p class="feature-desc">use express, use sqlite, one line to import any npm package.</p>
183
- </div>
184
- <div class="feature-card">
185
- <div class="feature-icon">
186
- <i class="fas fa-database"></i>
187
- </div>
188
- <h3 class="feature-title">Built-in Database</h3>
189
- <p class="feature-desc">database, query, insert, first-class SQLite with native or WebAssembly.</p>
190
- </div>
191
- <div class="feature-card">
192
- <div class="feature-icon">
193
- <i class="fas fa-terminal"></i>
194
- </div>
195
- <h3 class="feature-title">CLI Tools</h3>
196
- <p class="feature-desc">plainscript build, plainscript run, plainscript doctor, everything you need.</p>
197
- </div>
198
- <div class="feature-card">
199
- <div class="feature-icon">
200
- <i class="fas fa-paint-brush"></i>
201
- </div>
202
- <h3 class="feature-title">Formatter</h3>
203
- <p class="feature-desc">plainscript fmt auto-formats your code consistently.</p>
204
- </div>
205
- </div>
206
- </div>
207
- </section>
208
-
209
- <!-- Code Examples Section -->
210
- <section id="examples" class="section section--alt">
211
- <div class="container">
212
- <div class="section-tag">See it in action</div>
213
- <h2 class="section-title">PlainScript vs JavaScript</h2>
214
-
215
- <!-- Web Server -->
216
- <div class="compare-pair">
217
- <div class="compare-label">
218
- <i class="fas fa-server"></i> Web Server
219
- </div>
220
- <div class="compare-grid">
221
- <div class="code-window">
222
- <div class="code-window-header">
223
- <div class="code-window-dots">
224
- <span class="dot red"></span>
225
- <span class="dot yellow"></span>
226
- <span class="dot green"></span>
227
- </div>
228
- <span class="code-window-title">PlainScript</span>
229
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
230
- </div>
231
- <div class="code-window-body">
232
- <pre><code>web app
233
- route get "/"
234
- print "Hello, World!"
235
- done
236
-
237
- route get "/users"
238
- print json
239
- count is 3
240
- end
241
- end
242
-
243
- print "Server running on port 3000"</code></pre>
244
- </div>
245
- </div>
246
- <div class="code-window">
247
- <div class="code-window-header">
248
- <div class="code-window-dots">
249
- <span class="dot red"></span>
250
- <span class="dot yellow"></span>
251
- <span class="dot green"></span>
252
- </div>
253
- <span class="code-window-title">Express.js</span>
254
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
255
- </div>
256
- <div class="code-window-body">
257
- <pre><code>const express = require("express");
258
- const app = express();
259
-
260
- app.get("/", (req, res) => {
261
- res.send("Hello, World!");
262
- });
263
-
264
- app.get("/users", (req, res) => {
265
- res.json(users);
266
- });
267
-
268
- app.listen(3000, () => {
269
- console.log("Server running on port 3000");
270
- });</code></pre>
271
- </div>
272
- </div>
273
- </div>
274
- </div>
275
-
276
- <!-- Database -->
277
- <div class="compare-pair">
278
- <div class="compare-label">
279
- <i class="fas fa-database"></i> Database
280
- </div>
281
- <div class="compare-grid">
282
- <div class="code-window">
283
- <div class="code-window-header">
284
- <div class="code-window-dots">
285
- <span class="dot red"></span>
286
- <span class="dot yellow"></span>
287
- <span class="dot green"></span>
288
- </div>
289
- <span class="code-window-title">PlainScript</span>
290
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
291
- </div>
292
- <div class="code-window-body">
293
- <pre><code>database "app.db"
294
-
295
- remember results as query
296
- SELECT * FROM users WHERE active = 1
297
- done
298
-
299
- for each user in results
300
- show user.name
21
+ <a href="#capabilities">Capabilities</a>
22
+ <a href="#library">Examples</a>
23
+ </nav>
24
+ </div>
25
+ </header>
26
+
27
+ <main>
28
+ <section class="hero">
29
+ <div class="container hero-content">
30
+ <p class="hero-badge">1.0.3-beta: intent-oriented Node.js programming</p>
31
+ <h1 class="hero-title">Code that reads like plain English.</h1>
32
+ <p class="hero-lead">Describe what you want. PlainScript compiles it to readable JavaScript while keeping the language small, direct, and checkable.</p>
33
+ <div class="hero-actions">
34
+ <a class="button button-primary" href="#quickstart">Start building</a>
35
+ <a class="button button-secondary" href="#library">Browse examples</a>
36
+ </div>
37
+ <pre class="code-window"><code>remember name as "Ada"
38
+ if name contains "A"
39
+ show `Hello, ${name}!`
301
40
  done</code></pre>
302
- </div>
303
- </div>
304
- <div class="code-window">
305
- <div class="code-window-header">
306
- <div class="code-window-dots">
307
- <span class="dot red"></span>
308
- <span class="dot yellow"></span>
309
- <span class="dot green"></span>
310
- </div>
311
- <span class="code-window-title">better-sqlite3</span>
312
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
313
- </div>
314
- <div class="code-window-body">
315
- <pre><code>const Database = require("better-sqlite3");
316
- const db = new Database("app.db");
317
-
318
- const results = db.prepare(
319
- "SELECT * FROM users WHERE active = 1"
320
- ).all();
321
-
322
- results.forEach((user) => {
323
- console.log(user.name);
324
- });</code></pre>
325
- </div>
326
- </div>
327
- </div>
328
41
  </div>
42
+ </section>
43
+
44
+ <section id="quickstart" class="section">
45
+ <div class="container">
46
+ <p class="section-tag">Quick start</p>
47
+ <h2 class="section-title">Check first, then build.</h2>
48
+ <div class="three-column">
49
+ <article class="info-card"><span class="card-number">01</span><h3>Write</h3><p>Create a <code>.pln</code> file with readable declarations and blocks.</p></article>
50
+ <article class="info-card"><span class="card-number">02</span><h3>Check</h3><p>Run <code>plainscript check file.pln</code> to validate imports and generated JavaScript.</p></article>
51
+ <article class="info-card"><span class="card-number">03</span><h3>Build</h3><p>Run <code>plainscript build</code> to emit standalone files in <code>dist/</code>.</p></article>
52
+ </div>
53
+ <pre class="code-window"><code>npx plainscript new hello
54
+ cd hello
55
+ npx plainscript check
56
+ npx plainscript build
57
+ npm start</code></pre>
58
+ </div>
59
+ </section>
60
+
61
+ <section id="language" class="section section--alt">
62
+ <div class="container">
63
+ <p class="section-tag">Language</p>
64
+ <h2 class="section-title">A focused grammar for real programs.</h2>
65
+ <div class="feature-grid">
66
+ <article class="feature-card"><h3>Variables</h3><p><code>remember name as "Ada"</code> and readable assignment with <code>becomes</code>.</p></article>
67
+ <article class="feature-card"><h3>Conditions</h3><p>Use <code>is at least</code>, <code>contains</code>, <code>between</code>, and logical operators.</p></article>
68
+ <article class="feature-card"><h3>Functions</h3><p>Define functions with <code>make</code>, return with <code>give</code>, and close with <code>done</code>.</p></article>
69
+ <article class="feature-card"><h3>Records</h3><p>Model data with record kinds and readable constructors.</p></article>
70
+ <article class="feature-card"><h3>Web apps</h3><p>Declare routes, JSON responses, sessions, cookies, uploads, and auth.</p></article>
71
+ <article class="feature-card"><h3>Data and async</h3><p>Use SQLite, HTTP, files, schedules, concurrency, and WebSockets.</p></article>
72
+ <article class="feature-card"><h3>AI providers</h3><p>Call Groq and other OpenAI-compatible providers with environment-backed keys.</p></article>
73
+ </div>
74
+ </div>
75
+ </section>
76
+
77
+ <section id="capabilities" class="section">
78
+ <div class="container">
79
+ <p class="section-tag">Capabilities</p>
80
+ <h2 class="section-title">The compiler covers the full path.</h2>
81
+ <div class="capability-list">
82
+ <span>JSON</span><span>SQLite and SQL</span><span>HTTP client</span><span>Auth and sessions</span><span>Files</span><span>Packages</span><span>Async</span><span>Errors</span><span>Concurrency</span><span>WebSockets</span><span>Cache</span><span>Bots</span><span>OCR</span><span>Tests</span><span>Modules</span>
83
+ </div>
84
+ </div>
85
+ </section>
86
+
87
+ <section id="library" class="section section--alt">
88
+ <div class="container">
89
+ <p class="section-tag">Feature library</p>
90
+ <h2 class="section-title">Current, checked examples.</h2>
91
+ <p class="section-lead">These snippets use the grammar accepted by PlainScript 1.0.3-beta.</p>
92
+ <div class="library-toolbar">
93
+ <label class="sr-only" for="lib-search">Search examples</label>
94
+ <input id="lib-search" class="lib-search-input" type="search" placeholder="Search examples">
95
+ <div id="lib-filters" class="lib-filters" aria-label="Filter examples"></div>
96
+ </div>
97
+ <div id="lib-grid" class="lib-grid"></div>
98
+ <p id="lib-empty" class="lib-empty" hidden>No examples match your search.</p>
99
+ </div>
100
+ </section>
101
+
102
+ <section class="section">
103
+ <div class="container split">
104
+ <div><p class="section-tag">Reference</p><h2 class="section-title">Use the compiler as the authority.</h2></div>
105
+ <div><p>Read the <a href="PLAINSCRIPT-SPEC.md">language specification</a> and the <a href="../knowledge.md">AI coding specification</a>. The repository's <code>examples/</code> directory is the executable reference set.</p><p>Validate a file with <code>node compiler/cli.js check path/to/file.pln</code>.</p></div>
106
+ </div>
107
+ </section>
108
+ </main>
329
109
 
330
- </div>
331
- </section>
332
-
333
- <!-- Quickstart Section -->
334
- <section id="quickstart" class="section">
335
- <div class="container">
336
- <div class="section-tag">Get Started</div>
337
- <h2 class="section-title">Up and running in 30 seconds</h2>
338
- <div class="quickstart-steps">
339
- <div class="quickstart-step">
340
- <div class="step-number">1</div>
341
- <div class="step-content">
342
- <h3 class="step-title">Install</h3>
343
- <div class="code-block">
344
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
345
- <pre><code>npm install --save-dev plainscript-lang</code></pre>
346
- </div>
347
- </div>
348
- </div>
349
- <div class="quickstart-step">
350
- <div class="step-number">2</div>
351
- <div class="step-content">
352
- <h3 class="step-title">Create</h3>
353
- <div class="code-block">
354
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
355
- <pre><code>plainscript new my-app</code></pre>
356
- </div>
357
- <p class="step-note">Then write your code in <code>src/app.pln</code></p>
358
- </div>
359
- </div>
360
- <div class="quickstart-step">
361
- <div class="step-number">3</div>
362
- <div class="step-content">
363
- <h3 class="step-title">Run</h3>
364
- <div class="code-block">
365
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
366
- <pre><code>plainscript run</code></pre>
367
- </div>
368
- </div>
369
- </div>
370
- </div>
371
- </div>
372
- </section>
373
-
374
- <!-- CLI Section -->
375
- <section id="cli" class="section section--alt">
376
- <div class="container">
377
- <div class="section-tag">Command Line</div>
378
- <h2 class="section-title">Your development workflow</h2>
379
- <div class="cli-grid">
380
- <div class="cli-item">
381
- <div class="cli-cmd">plainscript build</div>
382
- <div class="cli-desc">Compile your PlainScript files to JavaScript.</div>
383
- </div>
384
- <div class="cli-item">
385
- <div class="cli-cmd">plainscript run</div>
386
- <div class="cli-desc">Build and execute your application in one step.</div>
387
- </div>
388
- <div class="cli-item">
389
- <div class="cli-cmd">plainscript new <name></div>
390
- <div class="cli-desc">Scaffold a new PlainScript project with defaults.</div>
391
- </div>
392
- <div class="cli-item">
393
- <div class="cli-cmd">plainscript fmt</div>
394
- <div class="cli-desc">Auto-format all PlainScript files in your project.</div>
395
- </div>
396
- <div class="cli-item">
397
- <div class="cli-cmd">plainscript check</div>
398
- <div class="cli-desc">Syntax check your code without emitting output.</div>
399
- </div>
400
- <div class="cli-item">
401
- <div class="cli-cmd">plainscript doctor</div>
402
- <div class="cli-desc">Diagnose issues with your PlainScript installation.</div>
403
- </div>
404
- <div class="cli-item">
405
- <div class="cli-cmd">plainscript install</div>
406
- <div class="cli-desc">Install all detected dependencies.</div>
407
- </div>
408
- <div class="cli-item">
409
- <div class="cli-cmd">plainscript start</div>
410
- <div class="cli-desc">Build src/app.pln and run its dist/ output.</div>
411
- </div>
412
- <div class="cli-item">
413
- <div class="cli-cmd">plainscript add <pkg></div>
414
- <div class="cli-desc">Add a package to your project.</div>
415
- </div>
416
- <div class="cli-item">
417
- <div class="cli-cmd">plainscript remove <pkg></div>
418
- <div class="cli-desc">Remove a package from your project.</div>
419
- </div>
420
- <div class="cli-item">
421
- <div class="cli-cmd">plainscript update</div>
422
- <div class="cli-desc">Update all installed npm packages.</div>
423
- </div>
424
- <div class="cli-item">
425
- <div class="cli-cmd">plainscript version</div>
426
- <div class="cli-desc">Print the compiler version.</div>
427
- </div>
428
- <div class="cli-item">
429
- <div class="cli-cmd">plainscript help</div>
430
- <div class="cli-desc">Print help text.</div>
431
- </div>
432
- </div>
433
- </div>
434
- </section>
435
-
436
- <!-- Packages Section -->
437
- <section id="packages" class="section">
438
- <div class="container">
439
- <div class="section-tag">Ecosystem</div>
440
- <h2 class="section-title">Works with the npm ecosystem</h2>
441
- <div class="code-block--wide">
442
- <button class="code-copy" aria-label="Copy code"><i class="far fa-copy"></i></button>
443
- <pre><code>use express
444
- use sqlite
445
- use fs
446
- use path
447
- use crypto
448
- use axios
449
- use dotenv</code></pre>
450
- </div>
451
- <p class="packages-note">
452
- Any npm package can be imported with the <code>use</code> keyword. PlainScript compiles your code to JavaScript, so the entire npm ecosystem is available to you. No wrappers, no adapters, no limits.
453
- </p>
454
- </div>
455
- </section>
456
-
457
- <!-- Language Library Section -->
458
- <section id="library" class="section">
459
- <div class="container">
460
- <div class="section-tag">Language Reference</div>
461
- <h2 class="section-title">PlainScript Feature Library</h2>
462
- <p class="section-lead">Every feature of PlainScript with working code examples. Search to find exactly what you need.</p>
463
-
464
- <div class="lib-search-wrap">
465
- <div class="lib-search">
466
- <i class="fas fa-search lib-search-icon"></i>
467
- <input type="text" id="lib-search" class="lib-search-input" placeholder='Search features... (e.g. "database", "loop", "server")'>
468
- <span class="lib-search-count" id="lib-count"></span>
469
- </div>
470
- <div class="lib-filters" id="lib-filters">
471
- <button class="lib-filter active" data-cat="all">All</button>
472
- <button class="lib-filter" data-cat="variables">Variables</button>
473
- <button class="lib-filter" data-cat="strings">Strings</button>
474
- <button class="lib-filter" data-cat="numbers">Numbers</button>
475
- <button class="lib-filter" data-cat="booleans">Booleans</button>
476
- <button class="lib-filter" data-cat="conditionals">Conditionals</button>
477
- <button class="lib-filter" data-cat="loops">Loops</button>
478
- <button class="lib-filter" data-cat="functions">Functions</button>
479
- <button class="lib-filter" data-cat="arrays">Arrays</button>
480
- <button class="lib-filter" data-cat="objects">Objects</button>
481
- <button class="lib-filter" data-cat="imports">Imports</button>
482
- <button class="lib-filter" data-cat="server">Server</button>
483
- <button class="lib-filter" data-cat="database">Database</button>
484
- <button class="lib-filter" data-cat="cache">Cache</button>
485
- <button class="lib-filter" data-cat="http">HTTP</button>
486
- <button class="lib-filter" data-cat="filesystem">File System</button>
487
- <button class="lib-filter" data-cat="logging">Logging</button>
488
- <button class="lib-filter" data-cat="datetime">Date & Time</button>
489
- <button class="lib-filter" data-cat="errors">Error Handling</button>
490
- <button class="lib-filter" data-cat="async">Async</button>
491
- <button class="lib-filter" data-cat="auth">Auth & Security</button>
492
- <button class="lib-filter" data-cat="telegram">Telegram</button>
493
- <button class="lib-filter" data-cat="whatsapp">WhatsApp</button>
494
- <button class="lib-filter" data-cat="websocket">WebSocket</button>
495
- <button class="lib-filter" data-cat="email">Email</button>
496
- <button class="lib-filter" data-cat="upload">Uploads</button>
497
- <button class="lib-filter" data-cat="cli">CLI</button>
498
- <button class="lib-filter" data-cat="data">Data</button>
499
- <button class="lib-filter" data-cat="ai">AI</button>
500
- <button class="lib-filter" data-cat="reflection">Reflection</button>
501
- <button class="lib-filter" data-cat="binary">Binary & Crypto</button>
502
- <button class="lib-filter" data-cat="concurrency">Concurrency</button>
503
- <button class="lib-filter" data-cat="generators">Generators</button>
504
- <button class="lib-filter" data-cat="testing">Testing</button>
505
- <button class="lib-filter" data-cat="pattern">Pattern Match</button>
506
- <button class="lib-filter" data-cat="config">Config & Env</button>
507
- <button class="lib-filter" data-cat="process">Process & CLI</button>
508
- <button class="lib-filter" data-cat="paths">Paths</button>
509
- <button class="lib-filter" data-cat="regex">Regex</button>
510
- </div>
511
- </div>
512
-
513
- <div class="lib-grid" id="lib-grid"></div>
514
- <div class="lib-empty" id="lib-empty" style="display:none">
515
- <i class="fas fa-search"></i>
516
- <p>No features match your search.</p>
517
- </div>
518
- </div>
519
- </section>
520
-
521
- <!-- FAQ Section -->
522
- <section id="faq" class="section section--alt">
523
- <div class="container">
524
- <div class="section-tag">FAQ</div>
525
- <h2 class="section-title">Frequently asked questions</h2>
526
- <div class="faq-list">
527
- <details class="faq-item">
528
- <summary class="faq-question">What is PlainScript?</summary>
529
- <div class="faq-answer">
530
- <p>PlainScript is an Intent-Oriented Programming Language that compiles to JavaScript. It lets you write code using plain English-like syntax, while the compiler handles the underlying implementation details.</p>
531
- </div>
532
- </details>
533
- <details class="faq-item">
534
- <summary class="faq-question">How is PlainScript different from JavaScript?</summary>
535
- <div class="faq-answer">
536
- <p>PlainScript focuses on intent rather than implementation. Instead of writing low-level JavaScript, you describe what you want to accomplish. The compiler translates your intent into optimized JavaScript code.</p>
537
- </div>
538
- </details>
539
- <details class="faq-item">
540
- <summary class="faq-question">Can I use npm packages with PlainScript?</summary>
541
- <div class="faq-answer">
542
- <p>Yes. Use the <code>use</code> keyword to import any npm package. Since PlainScript compiles to JavaScript, the entire npm ecosystem is fully compatible with your PlainScript projects.</p>
543
- </div>
544
- </details>
545
- <details class="faq-item">
546
- <summary class="faq-question">Does PlainScript have built-in database support?</summary>
547
- <div class="faq-answer">
548
- <p>Yes. PlainScript includes first-class SQLite support with the <code>database</code>, <code>query</code>, and <code>insert</code> keywords. It works with both native SQLite and WebAssembly builds.</p>
549
- </div>
550
- </details>
551
- <details class="faq-item">
552
- <summary class="faq-question">Is PlainScript production-ready?</summary>
553
- <div class="faq-answer">
554
- <p>PlainScript is currently in active development and is not yet at a stable production release. We recommend trying it out for personal projects and prototypes. Check the GitHub repository for the latest status and roadmap.</p>
555
- </div>
556
- </details>
557
- </div>
558
- </div>
559
- </section>
560
-
561
- <!-- Footer -->
562
110
  <footer class="site-footer">
563
- <div class="container">
564
- <div class="footer-top">
565
- <div class="footer-brand">
566
- <img src="logo.jpg" alt="PlainScript" class="footer-logo">
567
- <span class="footer-name">PlainScript</span>
568
- </div>
569
- <div class="footer-tagline">Write code that reads like plain English.</div>
570
- </div>
571
- <div class="footer-divider"></div>
572
- <div class="footer-grid">
573
- <div class="footer-col">
574
- <h4 class="footer-heading">Resources</h4>
575
- <ul class="footer-links">
576
- <li><a href="#quickstart">Quickstart</a></li>
577
- <li><a href="#language">Language</a></li>
578
- <li><a href="#examples">Examples</a></li>
579
- <li><a href="#cli">CLI Reference</a></li>
580
- </ul>
581
- </div>
582
- <div class="footer-col">
583
- <h4 class="footer-heading">Language</h4>
584
- <ul class="footer-links">
585
- <li><a href="#language">Features</a></li>
586
- <li><a href="#packages">Packages</a></li>
587
- <li><a href="#faq">FAQ</a></li>
588
- </ul>
589
- </div>
590
- <div class="footer-col">
591
- <h4 class="footer-heading">Community</h4>
592
- <ul class="footer-links">
593
- <li><a href="https://github.com/ayoistooslick/plainscript" target="_blank" rel="noopener">GitHub</a></li>
594
- <li><a href="https://www.npmjs.com/package/plainscript-lang" target="_blank" rel="noopener">npm</a></li>
595
- <li><a href="https://github.com/ayoistooslick/plainscript/issues" target="_blank" rel="noopener">Issue Tracker</a></li>
596
- </ul>
597
- </div>
598
- </div>
599
- <div class="footer-bottom">
600
- <p>&copy; 2026 PlainScript. Built by Ayokunle.</p>
601
- <span class="footer-badge">v1.0.2</span>
602
- </div>
603
- </div>
111
+ <div class="container footer-bottom"><span>PlainScript</span><span>1.0.3-beta</span></div>
604
112
  </footer>
605
-
606
- <!-- Scripts -->
607
- <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
608
- <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/gsap.min.js"></script>
609
- <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.5/ScrollTrigger.min.js"></script>
610
113
  <script src="website/script.js"></script>
611
-
612
114
  </body>
613
- </html>
115
+ </html>