feat(v1.5.0): Full-Stack Web Engine, F-Strings, Cyber OSINT & Terminal UI Suite
This commit is contained in:
1 parent
619492bdbf
commit
f90ea8cdd1
13 files changed
+766
-26
No files matched your search
+26
-21
@@ -1,11 +1,11 @@
|
||||
# 📦 AiraLang Standard Library Modules Directory
|
||||
> **Official Module Catalog for AiraLang (v1.4.4 Cross-Platform & System Edition)**
|
||||
> **Author & Creator:** Adam Eehan (Founder & CEO, Aira Group of Technology) 👑
|
||||
> **Official Module Catalog for AiraLang (v1.5.0 Full-Stack Web & Cyber OSINT Edition)**
|
||||
> **Author & Creator:** Er. Adam Eehan (Founder & CEO, Aira Group of Technology) 👑
|
||||
|
||||
---
|
||||
|
||||
## 🌟 Overview
|
||||
AiraLang features 16 built-in standard library modules engineered natively for speed, AI capabilities, cyber security recon, system operations, and developer joy.
|
||||
AiraLang features 22 built-in standard library modules engineered natively for full-stack web serving, AI capabilities, cyber security recon, system operations, and terminal aesthetics.
|
||||
|
||||
All modules are loaded natively via the `import` statement:
|
||||
```aira
|
||||
@@ -18,23 +18,28 @@ import "<module_name>";
|
||||
|
||||
| # | Module | Category | Primary Purpose | Key Methods |
|
||||
|---|---|---|---|---|
|
||||
| 1 | [`ai`](./ai.md) | Artificial Intelligence | Universal LLM engine (OpenAI, DeepSeek, Claude, Gemini, Groq, Ollama, OpenRouter, etc.) | `ask()`, `set_provider()`, `set_endpoint()`, `set_key()`, `providers()` |
|
||||
| 2 | [`system`](./system.md) / `hardware` | PC & Hardware Telemetry | Cross-platform GPU, CPU, RAM, battery, and OS hardware telemetry | `info()`, `gpu()`, `battery()`, `ram()`, `cpu()` |
|
||||
| 3 | [`android`](./android.md) / `droidsec` | Mobile Security & Recon | Android device integrity audit, root detection, and static APK security analyzer | `device_info()`, `audit_device()`, `audit_apk()`, `audit_package()`, `check_root()` |
|
||||
| 4 | [`sec`](./sec.md) | Cybersecurity | Port scanning, header auditing, subdomain discovery | `scan_ports()`, `audit_headers()`, `subdomains()`, `crack_md5()` |
|
||||
| 5 | [`proposal`](./proposal.md) | Fun & Cyber-Prank | Automated HTTP 500 love timeout & AI sentiment checker | `ask()`, `set_key()`, `set_system()`, `wish()`, `set_wish()` |
|
||||
| 6 | [`http`](./http.md) | Networking | Web requests, REST APIs, and file downloads | `get()`, `post()`, `download()`, `status()` |
|
||||
| 7 | [`file`](./file.md) | System I/O | Read, write, append, and inspect local files | `read()`, `write()`, `append()`, `exists()`, `delete()` |
|
||||
| 8 | [`os`](./os.md) | System | Shell commands, environment variables, CLI args, directories | `cmd()`, `env()`, `cwd()`, `listdir()`, `mkdir()`, `args()`, `is_windows()` |
|
||||
| 9 | [`math`](./math.md) | Mathematics | Math functions, trigonometry, and constants | `sqrt()`, `pow()`, `abs()`, `random()`, `round()`, `pi`, `e` |
|
||||
| 10 | [`time`](./time.md) | System | Epoch time, timestamps, and execution delays | `now()`, `time()`, `sleep()` |
|
||||
| 11 | [`json`](./json.md) | Data | Parsing and serialization of JSON payloads | `parse()`, `stringify()`, `mkstring()` |
|
||||
| 12 | [`crypto`](./crypto.md) | Security | Cryptographic hashes and encoding utilities | `md5()`, `sha256()`, `sha1()`, `base64_encode()`, `base64_decode()` |
|
||||
| 13 | [`string`](./string.md) | Utilities | Advanced text manipulation and transformation | `split()`, `replace()`, `upper()`, `lower()`, `trim()`, `join()` |
|
||||
| 14 | [`sqlite`](./sqlite.md) | Database | Lightweight embedded SQL relational database | `open()`, `query()`, `execute()`, `close()` |
|
||||
| 15 | [`net`](./net.md) | Networking | Host pings, TCP port checks, and IP discovery | `ping()`, `port_open()`, `local_ip()`, `fetch()` |
|
||||
| 16 | [`thread`](./thread.md) | Concurrency | Thread spawning, worker pools, and parallel execution | `spawn()`, `join()`, `pool()`, `sleep()` |
|
||||
| 17 | [`youtube`](./youtube.md) / `yt` | Media & Video | YouTube video/audio download engine via APM with progressive stream resolution | `get()`, `stream()`, `download()`, `title`, `duration` |
|
||||
| 1 | [`serve`](./serve.md) / `server` | Web Backend | Native Micro Web Server for building REST APIs | `route()`, `get()`, `post()`, `start()` |
|
||||
| 2 | [`term`](./term.md) / `ui` | Terminal Aesthetics | ANSI colors, stylized boxes, ASCII data tables, braille spinners | `color()`, `rainbow()`, `box()`, `table()`, `spinner()`, `clear()` |
|
||||
| 3 | [`webhook`](./webhook.md) | Event Automation | Instant JSON webhook dispatcher and background listener | `send()`, `listen()` |
|
||||
| 4 | [`bot`](./bot.md) / `telegram` | Messaging Bots | Telegram Bot API and Discord webhook notifications | `telegram_send()`, `discord_send()` |
|
||||
| 5 | [`env`](./env.md) / `dotenv` | Secrets & Config | `.env` file loader and environment variable manager | `load()`, `get()`, `set()`, `all()` |
|
||||
| 6 | [`ai`](./ai.md) | Artificial Intelligence | Universal LLM engine (OpenAI, DeepSeek, Claude, Gemini, Groq, Ollama, OpenRouter, etc.) | `ask()`, `set_provider()`, `set_endpoint()`, `set_key()`, `providers()` |
|
||||
| 7 | [`sec`](./sec.md) | Cybersecurity | Port scanning, header auditing, subdomain recon, SSL inspection, DNS lookup | `scan_ports()`, `audit_headers()`, `subdomains()`, `ssl_check()`, `dns_lookup()`, `crack_md5()` |
|
||||
| 8 | [`crypto`](./crypto.md) | Security | Cryptographic hashes, JWT signing/verifying, UUIDs, Base64 | `jwt_sign()`, `jwt_verify()`, `uuid()`, `hmac()`, `sha256()`, `md5()`, `base64_encode()` |
|
||||
| 9 | [`system`](./system.md) / `hardware` | PC & Hardware Telemetry | Cross-platform GPU, CPU, RAM, battery, and OS hardware telemetry | `info()`, `gpu()`, `battery()`, `ram()`, `cpu()` |
|
||||
| 10 | [`android`](./android.md) / `droidsec` | Mobile Security & Recon | Android device integrity audit, root detection, and static APK security analyzer | `device_info()`, `audit_device()`, `audit_apk()`, `audit_package()`, `check_root()` |
|
||||
| 11 | [`proposal`](./proposal.md) | Fun & Cyber-Prank | Automated HTTP 500 love timeout & AI sentiment checker | `ask()`, `set_key()`, `set_system()`, `wish()`, `set_wish()` |
|
||||
| 12 | [`http`](./http.md) | Networking | Web requests, REST APIs, and file downloads | `get()`, `post()`, `download()`, `status()` |
|
||||
| 13 | [`file`](./file.md) | System I/O | Read, write, append, and inspect local files | `read()`, `write()`, `append()`, `exists()`, `delete()` |
|
||||
| 14 | [`os`](./os.md) | System | Shell commands, environment variables, CLI args, directories | `cmd()`, `env()`, `cwd()`, `listdir()`, `mkdir()`, `args()`, `is_windows()` |
|
||||
| 15 | [`math`](./math.md) | Mathematics | Math functions, trigonometry, and constants | `sqrt()`, `pow()`, `abs()`, `random()`, `round()`, `pi`, `e` |
|
||||
| 16 | [`time`](./time.md) | System | Epoch time, timestamps, and execution delays | `now()`, `time()`, `sleep()` |
|
||||
| 17 | [`json`](./json.md) | Data | Parsing and serialization of JSON payloads | `parse()`, `stringify()`, `mkstring()` |
|
||||
| 18 | [`string`](./string.md) | Utilities | Advanced text manipulation and transformation | `split()`, `replace()`, `upper()`, `lower()`, `trim()`, `join()` |
|
||||
| 19 | [`sqlite`](./sqlite.md) | Database | Lightweight embedded SQL relational database | `open()`, `query()`, `execute()`, `close()` |
|
||||
| 20 | [`net`](./net.md) | Networking | Host pings, TCP port checks, and IP discovery | `ping()`, `port_open()`, `local_ip()`, `fetch()` |
|
||||
| 21 | [`thread`](./thread.md) | Concurrency | Thread spawning, worker pools, and parallel execution | `spawn()`, `join()`, `pool()`, `sleep()` |
|
||||
| 22 | [`youtube`](./youtube.md) / `yt` | Media & Video | YouTube video/audio download engine via APM | `get()`, `stream()`, `download()`, `title`, `duration` |
|
||||
|
||||
---
|
||||
*Maintained by the AiraLang Core Engineering Team. Created by Adam Eehan.*
|
||||
*Maintained by the AiraLang Core Engineering Team. Created by Er. Adam Eehan.*
|
||||
@@ -0,0 +1,27 @@
|
||||
# 🤖 AiraLang Module: `bot`
|
||||
|
||||
The `bot` module provides 1-line notification and messaging integrations for Telegram and Discord bots.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Functions
|
||||
|
||||
### 1. `bot.telegram_send(bot_token, chat_id, message, parse_mode="HTML")`
|
||||
Sends a message via the official Telegram Bot API.
|
||||
```airalang
|
||||
import "bot";
|
||||
|
||||
let token = "123456:ABC-DEF...";
|
||||
let chat = "987654321";
|
||||
bot.telegram_send(token, chat, "<b>AiraLang Alert:</b> Port scan finished!");
|
||||
```
|
||||
|
||||
### 2. `bot.discord_send(webhook_url, content, username="Aira Bot", avatar_url=null)`
|
||||
Dispatches an alert to a Discord channel via incoming webhook.
|
||||
```airalang
|
||||
bot.discord_send(
|
||||
"https://discord.com/api/webhooks/...",
|
||||
"Deployment completed on Vercel! 🚀",
|
||||
username="Aira CI/CD"
|
||||
);
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
# 🛡️ AiraLang Module: `env`
|
||||
|
||||
The `env` module provides seamless `.env` file loading and secure environment variable access.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Functions
|
||||
|
||||
### 1. `env.load(filepath=".env")`
|
||||
Loads key-value pairs from a `.env` file into the environment. Returns `true` if loaded, `false` if file does not exist.
|
||||
```airalang
|
||||
import "env";
|
||||
|
||||
env.load(".env");
|
||||
```
|
||||
|
||||
### 2. `env.get(key, default=null)`
|
||||
Retrieves an environment variable.
|
||||
```airalang
|
||||
let key = env.get("GEMINI_API_KEY", "default_key");
|
||||
```
|
||||
|
||||
### 3. `env.set(key, value)`
|
||||
Sets an environment variable in the current process.
|
||||
```airalang
|
||||
env.set("APP_MODE", "development");
|
||||
```
|
||||
|
||||
### 4. `env.all()`
|
||||
Returns a dictionary of all current environment variables.
|
||||
@@ -0,0 +1,43 @@
|
||||
# 🌐 AiraLang Module: `serve`
|
||||
|
||||
The `serve` module provides a native, zero-dependency micro web server engine directly inside AiraLang. Build REST APIs, microservices, and webhook endpoints with minimal code.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Functions
|
||||
|
||||
### 1. `serve.route(path, handler_fn, method="GET")`
|
||||
Registers a route endpoint. `handler_fn` receives a request dictionary containing `path`, `method`, `query`, `body`, and `headers`.
|
||||
```airalang
|
||||
import "serve";
|
||||
|
||||
serve.route("/api/hello", fn(req) {
|
||||
return {
|
||||
"status": "ok",
|
||||
"message": "Hello from AiraLang Web Engine!",
|
||||
"client_path": req["path"]
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
### 2. `serve.get(path, handler_fn)`
|
||||
Shortcut to register a `GET` route.
|
||||
```airalang
|
||||
serve.get("/api/status", fn(req) {
|
||||
return {"status": "online", "uptime": "100%"};
|
||||
});
|
||||
```
|
||||
|
||||
### 3. `serve.post(path, handler_fn)`
|
||||
Shortcut to register a `POST` route.
|
||||
```airalang
|
||||
serve.post("/api/echo", fn(req) {
|
||||
return {"received": req["body"]};
|
||||
});
|
||||
```
|
||||
|
||||
### 4. `serve.start(port=8080, host="0.0.0.0", background=false)`
|
||||
Starts the HTTP server. If `background=true`, the server runs in a daemon thread so the script can continue executing.
|
||||
```airalang
|
||||
serve.start(port=8080);
|
||||
```
|
||||
@@ -0,0 +1,50 @@
|
||||
# 🎨 AiraLang Module: `term`
|
||||
|
||||
The `term` module provides native terminal styling, ANSI colors, ASCII bounding boxes, data tables, animated spinners, and screen controls for building high-aesthetic CLI and cyber reconnaissance tools.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Functions
|
||||
|
||||
### 1. `term.color(color_name, text)`
|
||||
Returns text formatted with the specified ANSI color.
|
||||
* **Colors supported:** `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `bright_red`, `bright_green`, `bright_cyan`, `bold`, `dim`, `italic`, `underline`.
|
||||
```airalang
|
||||
import "term";
|
||||
say term.color("green", "Audit Passed Successfully!");
|
||||
```
|
||||
|
||||
### 2. `term.rainbow(text)`
|
||||
Returns text with alternating bright rainbow color grading.
|
||||
```airalang
|
||||
say term.rainbow("AIRALANG v1.5.0 - CYBER ENGINE");
|
||||
```
|
||||
|
||||
### 3. `term.box(title, content, color="cyan", width=50)`
|
||||
Renders a stylized Unicode framed box in the terminal.
|
||||
```airalang
|
||||
term.box("SECURITY SCAN REPORT", [
|
||||
"Target: google.com",
|
||||
"Open Ports: 80, 443",
|
||||
"Status: SECURE"
|
||||
], "cyan");
|
||||
```
|
||||
|
||||
### 4. `term.table(headers, rows)`
|
||||
Renders structured tabular data in an ASCII grid table.
|
||||
```airalang
|
||||
term.table(["Port", "Service", "State"], [
|
||||
["22", "SSH", "Open"],
|
||||
["80", "HTTP", "Open"],
|
||||
["443", "HTTPS", "Open"]
|
||||
]);
|
||||
```
|
||||
|
||||
### 5. `term.spinner(message="Working...", seconds=1.5)`
|
||||
Displays an asynchronous animated terminal braille spinner.
|
||||
```airalang
|
||||
term.spinner("Inspecting SSL certificate...", seconds=2);
|
||||
```
|
||||
|
||||
### 6. `term.clear()`
|
||||
Clears the active terminal screen.
|
||||
@@ -0,0 +1,29 @@
|
||||
# ⚡ AiraLang Module: `webhook`
|
||||
|
||||
The `webhook` module enables instant event-driven webhook dispatching and lightweight background webhook receivers.
|
||||
|
||||
---
|
||||
|
||||
## 📌 Functions
|
||||
|
||||
### 1. `webhook.send(url, payload, headers=null, timeout=10)`
|
||||
Sends an HTTP POST JSON payload to the target webhook URL.
|
||||
```airalang
|
||||
import "webhook";
|
||||
|
||||
let res = webhook.send("https://webhook.site/test", {
|
||||
"event": "alert",
|
||||
"user": "adam",
|
||||
"timestamp": "2026-10-12"
|
||||
});
|
||||
say f"Webhook response status: {res['status']}";
|
||||
```
|
||||
|
||||
### 2. `webhook.listen(port, callback_handler)`
|
||||
Spins up a background HTTP webhook listener. Any incoming POST request payload is parsed and passed to `callback_handler`.
|
||||
```airalang
|
||||
webhook.listen(5000, fn(req) {
|
||||
say f"Received webhook on {req['path']}: {req['body']}";
|
||||
return {"status": "processed"};
|
||||
});
|
||||
```
|
||||
Reference in new issue
Block a user