Release AiraLang v1.4.4: Windows UTF-8 fix, system module, and VS Code extension
This commit is contained in:
1 parent
79bf41cb56
commit
580f420abf
14 files changed
+659
-35
No files matched your search
+17
-16
@@ -1,11 +1,11 @@
|
||||
# 📦 AiraLang Standard Library Modules Directory
|
||||
> **Official Module Catalog for AiraLang (v1.4.1 Aira Cyber & AI Edition)**
|
||||
> **Official Module Catalog for AiraLang (v1.4.4 Cross-Platform & System Edition)**
|
||||
> **Author & Creator:** Adam Eehan (Founder & CEO, Aira Group of Technology) 👑
|
||||
|
||||
---
|
||||
|
||||
## 🌟 Overview
|
||||
AiraLang features 15 built-in standard library modules engineered natively for speed, AI capabilities, cyber security recon, system operations, and developer joy.
|
||||
AiraLang features 16 built-in standard library modules engineered natively for speed, AI capabilities, cyber security recon, system operations, and developer joy.
|
||||
|
||||
All modules are loaded natively via the `import` statement:
|
||||
```aira
|
||||
@@ -19,20 +19,21 @@ 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 | [`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()` |
|
||||
| 3 | [`sec`](./sec.md) | Cybersecurity | Port scanning, header auditing, subdomain discovery | `scan_ports()`, `audit_headers()`, `subdomains()`, `crack_md5()` |
|
||||
| 4 | [`proposal`](./proposal.md) | Fun & Cyber-Prank | Automated HTTP 500 love timeout & AI sentiment checker | `ask()`, `set_key()`, `set_system()`, `wish()`, `set_wish()` |
|
||||
| 5 | [`http`](./http.md) | Networking | Web requests, REST APIs, and file downloads | `get()`, `post()`, `download()`, `status()` |
|
||||
| 6 | [`file`](./file.md) | System I/O | Read, write, append, and inspect local files | `read()`, `write()`, `append()`, `exists()`, `delete()` |
|
||||
| 7 | [`os`](./os.md) | System | Shell commands, environment variables, directories | `cmd()`, `env()`, `cwd()`, `listdir()`, `mkdir()`, `platform()` |
|
||||
| 8 | [`math`](./math.md) | Mathematics | Math functions, trigonometry, and constants | `sqrt()`, `pow()`, `abs()`, `random()`, `round()`, `pi`, `e` |
|
||||
| 9 | [`time`](./time.md) | System | Epoch time, timestamps, and execution delays | `now()`, `time()`, `sleep()` |
|
||||
| 10 | [`json`](./json.md) | Data | Parsing and serialization of JSON payloads | `parse()`, `stringify()`, `mkstring()` |
|
||||
| 11 | [`crypto`](./crypto.md) | Security | Cryptographic hashes and encoding utilities | `md5()`, `sha256()`, `sha1()`, `base64_encode()`, `base64_decode()` |
|
||||
| 12 | [`string`](./string.md) | Utilities | Advanced text manipulation and transformation | `split()`, `replace()`, `upper()`, `lower()`, `trim()`, `join()` |
|
||||
| 13 | [`sqlite`](./sqlite.md) | Database | Lightweight embedded SQL relational database | `open()`, `query()`, `execute()`, `close()` |
|
||||
| 14 | [`net`](./net.md) | Networking | Host pings, TCP port checks, and IP discovery | `ping()`, `port_open()`, `local_ip()`, `fetch()` |
|
||||
| 15 | [`thread`](./thread.md) | Concurrency | Thread spawning, worker pools, and parallel execution | `spawn()`, `join()`, `pool()`, `sleep()` |
|
||||
| 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()` |
|
||||
|
||||
---
|
||||
*Maintained by the AiraLang Core Engineering Team. Created by Adam Eehan.*
|
||||
@@ -0,0 +1,93 @@
|
||||
# 💻 `system` Module (AiraLang Cross-Platform Hardware & OS)
|
||||
|
||||
Native cross-platform system diagnostic, hardware telemetry, and host environment inspection module. Companion module to `android`, designed for PC, Laptop, and Server environments (Windows, Linux, and Termux).
|
||||
|
||||
Can be imported as either:
|
||||
```aira
|
||||
import "system";
|
||||
# or
|
||||
import "hardware";
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Functions & Capabilities
|
||||
|
||||
### 1. `system.info()`
|
||||
Returns comprehensive hardware and operating system telemetry in a unified dictionary:
|
||||
- `platform`: Host OS platform identifier (`win32`, `linux`, etc.)
|
||||
- `cpu`: CPU details (name, core count, architecture)
|
||||
- `ram`: System memory metrics (total GB, available GB, used GB, percent used)
|
||||
- `gpu`: GPU profile (NVIDIA model, VRAM total, free VRAM, driver version, status)
|
||||
- `battery`: Power source and battery percentage
|
||||
|
||||
```aira
|
||||
import "system";
|
||||
let info = system.info();
|
||||
say "Platform: " + info.platform;
|
||||
say "CPU: " + info.cpu.name;
|
||||
say "RAM: " + info.ram.total_gb + " GB";
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. `system.gpu()`
|
||||
Detects dedicated and integrated graphics processing units, querying NVIDIA SMI on modern GPUs (e.g. RTX 3050, 4060, etc.):
|
||||
- `name`: Full GPU brand and model
|
||||
- `total_vram_mb`: Total video memory in Megabytes
|
||||
- `free_vram_mb`: Available free VRAM
|
||||
- `driver_version`: Installed NVIDIA driver version
|
||||
- `temperature_c`: Current GPU die temperature in Celsius
|
||||
- `status`: `"active"` or `"integrated_or_unavailable"`
|
||||
|
||||
```aira
|
||||
import "system";
|
||||
let gpu = system.gpu();
|
||||
say "GPU Model: " + gpu.name;
|
||||
if (gpu.total_vram_mb > 0) {
|
||||
say "VRAM: " + gpu.total_vram_mb + " MB";
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3. `system.battery()`
|
||||
Inspects battery and charging status via native Windows Kernel32 / Linux power supply APIs:
|
||||
- `percentage`: Battery state of charge (0 - 100%)
|
||||
- `is_charging`: Boolean whether power is connected
|
||||
- `power_source`: Detailed power source status
|
||||
|
||||
```aira
|
||||
import "system";
|
||||
let bat = system.battery();
|
||||
say "Battery: " + bat.percentage + "% | Charging: " + bat.is_charging;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. `system.ram()`
|
||||
Queries live RAM memory allocation:
|
||||
- `total_gb`: Total physical RAM
|
||||
- `available_gb`: Available free memory
|
||||
- `used_gb`: Currently utilized memory
|
||||
- `percent_used`: Memory load percentage (0 - 100)
|
||||
|
||||
```aira
|
||||
import "system";
|
||||
let mem = system.ram();
|
||||
say "RAM: " + mem.used_gb + " / " + mem.total_gb + " GB (" + mem.percent_used + "% used)";
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 5. `system.cpu()`
|
||||
Queries CPU architecture, core topology, and model identifier:
|
||||
- `cores`: Logical core count
|
||||
- `name`: Processor identifier string
|
||||
- `architecture`: Machine architecture
|
||||
|
||||
```aira
|
||||
import "system";
|
||||
let cpu = system.cpu();
|
||||
say "CPU: " + cpu.name + " (" + cpu.cores + " Cores)";
|
||||
```
|
||||
Reference in new issue
Block a user