🚀 Welcome to newOS4
tutorial in the terminal to start a 2-minute interactive tour!
🖥️ Terminal OS
Full virtual filesystem with ls, cd, cat, touch, edit, find, grep and 50+ Unix-like commands.
🤖 AI Assistant
Built-in AI agent with tool calling, skills, memory, and 28 tools. Just type ai "your question".
🧩 Module System
40+ modules including cron, mindmap, calculator, voice, WebDAV, themes, and shell scripting.
📚 Skills
Self-improving AI remembers workflows and teaches you new capabilities — type skill-list to see what's installed.
🔤 First 6 Commands
📋 Workflow
- Type
help— see every available command - Type
ls— browse files in your virtual drive - Type
touch hello.txt— create a file - Type
edit hello.txt— write something and save - Type
ai "summarize this"— let AI analyze your files - Type
status— check system health
🔧 Quick Start
Type help to see all 130+ commands grouped by category. Use help <command> for details on a specific one.
The 📋 Quick Commands panel (Ctrl+K) has clickable cards for common tasks.
For the full reference, switch to the 📘 User Guide tab — it covers every module, filesystem, AI, skills, configuration, and all extended modules in detail.
🔧 Module Development API
Ext Module Structure
Modules are ES6 classes with 3 required and 1 optional method:
class MyModule {
constructor() { this.commands = {}; this.terminal = null; }
requirements() { return { met: true, missing: [] }; }
getHelpInfo() { return { 'mycmd': 'mycmd — What it does' }; }
registerCommands() { this.commands['mycmd'] = (args) => { /* ... */ }; }
}
// Auto-register:
if (typeof window.webx11 !== 'undefined' && window.webx11) {
webx11.moduleManager.registerModule(new MyModule(), 'url');
}
VFS (Virtual FileSystem) API
Access via this.terminal.fs:
| Method | Returns | Description |
|---|---|---|
readFile(path) | string or null | Read file content |
writeFile(path, content) | boolean | Write string to file |
ls(path) | array | List directory entries |
mkdir(path) | boolean | Create directory |
rm(path) | boolean | Remove file |
rmdir(path) | boolean | Remove empty directory |
touch(path) | boolean | Create empty file |
cd(path) | boolean | Change current directory |
pwd() | string | Current directory path |
mv(old, new) | boolean | Move/rename file |
cp(src, dst) | boolean | Copy file |
AI Tool Definition Format
Add tools to module-aiassist.js in getToolDefinitions() (around line 300):
{
type: 'function',
function: {
name: 'my_tool',
description: 'What it does — AI reads this to decide when to call it.',
parameters: { type: 'object', properties: {
paramName: { type: 'string', description: 'What this param does' }
}, required: ['paramName'] }
}
}
Then add a case 'my_tool': handler in runTool() (around line 1000). Return JSON.stringify(...).
Skill Format
Skills are markdown files with YAML frontmatter, stored in /skills/ in VFS:
---
name: my-skill
description: Brief description
tags: [tag1, tag2]
---
# Skill Body
Instructions, examples, and workflows here.
OllamaManager API
| Property/Method | Description |
|---|---|
.endpoint | Current Ollama API URL |
.currentModel | Active model name |
.models | Array of available models |
.connected | Boolean connection state |
.connect() | Connect to Ollama, load models |
.chatWithTools() | AI chat with tool calling support |
window.webx11 Global
The terminal instance is exposed globally as window.webx11 (aliased as webx11). This gives access to everything:
webx11.fs // VFS instance
webx11.moduleManager // Module registry
webx11.ollamaManager // Ollama connection
webx11.security // Security manager
webx11.executeCommand(cmd) // Run a terminal command programmatically
webx11.print(text, type) // Print to terminal output
webx11.tutorialModule // Tutorial progress (if active)
webx11.inputField // DOM input element
⛅ Overview
WebX11 v4.2 is a browser-based Unix-like terminal — dynamic modules, AI assistant (Ollama), persistent virtual filesystem, web search, voice input, code editor, and a full skill system. Everything runs client-side in your browser.
🧩 26 Core + 14 Ext
Modules loaded at startup. Shell with pipes, redirects, vars, and scripts.
🤖 Agent with Tools
28 tools — file ops, web search, skills, modules. Destructive action confirmations with inline bar + countdown.
📚 Skills System
Persistent procedural memory. Create, patch, search, export skills for repeatable workflows.
💾 VFS + Sessions
Virtual filesystem persists in localStorage. Save/load/export sessions.
🎤 Voice Input
Speech recognition in the terminal. Works in Chrome, Edge, Safari.
🌐 Web Search
SearXNG + DuckDuckGo fallback + URL fetch/extract. All built-in.
☁️ WebDAV Sync
Push, pull, backup VFS to any WebDAV server.
📱 Mobile First
Touch-optimized. srcdoc HTML preview works on mobile.
✏️ Text Editor
Inline VFS editor — edit <path> opens a modal with save/cancel.
🔗 Aliases
ll, h, cls built-in. Define custom aliases with alias x=y.
🚀 Quick Start
- Open
index.htmlin Chrome/Edge - Watch the splash screen load modules
- Type
help+ Enter - Use the quick-action buttons above the input area
First Commands
# List VFS files ls # List files faster ll # Connect to Ollama AI ollamaconnect # Chat with AI ai what's in this directory? # Create a file put hello.txt Hello World # Edit a file edit hello.txt # Search the web search quantum computing # Find files find hello # Compare two files diff a.txt b.txt
- Enter — Execute
- Tab — Cycle autocomplete
- ↑/↓ — Command history
- Esc — Hide autocomplete / stop AI
- | — Pipe:
ls | grep hello
📖 Full Command Reference
System
| Command | Description | Example |
|---|---|---|
help | Show all commands | help |
clear / cls | Clear terminal | cls |
echo | Print text | echo Hello |
mem | Show memory usage | mem |
status | System status | status |
font-size | Change font size (8–32) | font-size 16 |
load-local | Load module from VFS or URL | load-local modules/ext/calc.js |
startup-modules | Open startup module selector | startup-modules |
preview | Preview HTML in iframe | preview test.html |
factory-reset | Reset config | factory-reset |
reset-vfs | Reset VFS | reset-vfs |
AI Assistant
| Command | Description | Example |
|---|---|---|
ai / ask | Chat with AI (tool-calling) | ai create a notes file |
ai-clear | Reset conversation context | ai-clear |
ai-system | View/set system prompt | ai-system |
ai-context | Show conversation memory | ai-context |
ai-allow | Allow pending destructive action | ai-allow |
ai-deny | Deny pending destructive action | ai-deny |
ai-stop | Cancel running AI request | ai-stop |
Smart Context
| Command | Description | Example |
|---|---|---|
context | Set active profile | context expert |
contexts | List profiles | contexts |
context-new | Create profile | context-new myprofile |
context-delete | Delete profile | context-delete old |
smart-ask | Ask with current profile | smart-ask explain this |
Dynamic Prompts
| Command | Description | Example |
|---|---|---|
prompt | Use saved template | prompt summarize |
prompt-save | Save template | prompt-save myprompt |
prompt-list | List saved prompts | prompt-list |
prompt-delete | Delete prompt | prompt-delete old |
prompt-var | Set template variable | prompt-var name Alice |
prompt-vars | List variables | prompt-vars |
Skills
| Command | Description | Example |
|---|---|---|
skill-list | List all skills | skill-list |
skill-view | View skill content | skill-view web-scraper |
skill-create | Create a skill | skill-create name desc "steps" tags |
skill-patch | Update a skill | skill-patch name "new content" |
skill-delete | Delete a skill | skill-delete oldskill |
skill-export | Export skill to JSON | skill-export myskill |
skill-import | Import skill from JSON | skill-import |
skill-sync | Rebuild skill index | skill-sync |
Config
| Command | Description | Example |
|---|---|---|
config | Get a config value | config |
config-set | Set a config value | config-set key value |
config-list | List all config | config-list |
config-delete | Delete a config entry | config-delete key |
config-export | Export config as JSON | config-export |
config-reset | Reset all config | config-reset |
📁 Filesystem
All VFS files persist in localStorage. ls, cd, pwd work like a real terminal. Clickable output — tap a file to cat, tap a dir to cd.
| Command | Description | Example |
|---|---|---|
ls / ll | List files | ll |
cd | Change directory | cd notes |
pwd | Print working directory | pwd |
cat | View file | cat readme.txt |
put | Create file with content | put hello.txt Hello World |
edit | Open in modal editor | edit notes.md |
rm | Delete file | rm temp.txt |
mkdir | Create directory | mkdir projects |
rmdir | Remove directory | rmdir empty |
mv | Move/rename | mv old.txt new.txt |
cp | Copy file | cp a.txt b.txt |
touch | Create empty file | touch newfile.txt |
tree | Directory tree | tree |
find | Recursive file search | find .txt |
diff | Compare two files | diff a.txt b.txt |
grep | Search file contents | grep hello *.txt |
head | First N lines | head file.txt 10 |
tail | Last N lines | tail file.txt 10 |
sort | Sort file lines | sort file.txt |
wc | Count lines/words/chars | wc file.txt |
du | Disk usage | du |
upload | Upload file from device | upload |
download | Download file | download file.txt |
vfs-export | Download VFS as JSON | vfs-export |
vfs-import | Import VFS from JSON | vfs-import |
🤖 AI Assistant
How It Works
- Type
ai <request> - AI loads relevant skills + recent session memory
- Decides which tools to call (up to 8 turns)
- Destructive tools trigger an inline confirm bar — no dark overlay
- 120s countdown: yellow → bold red at 30s → pulsing at 10s
- Type
ai-allow/ai-denyor tap the buttons - After complex tasks, AI suggests creating a skill
write_file, delete_file, run_command, make_directory, edit_module all require confirmation before executing.
Available Tools
| Tool | Description | Destructive? |
|---|---|---|
list_files | List VFS directory | ❌ |
read_file | Read file (8k trunc) | ❌ |
write_file | Write to file | ✅ |
make_directory | Create directory | ✅ |
delete_file | Delete file/dir | ✅ |
get_status | System status | ❌ |
get_help | List commands | ❌ |
web_search | SearXNG + DDG | ❌ |
web_fetch | Extract URL content | ❌ |
run_command | Execute terminal cmd | ✅ |
load_skills | Search relevant skills | ❌ |
create/patch/list_skills | Skill management | ❌ |
view/edit/test/reload | Module operations | edit ✅ |
user_get/set/list/forget | User profile | ❌ |
session_save/load/recent/stats | Session memory | ❌ |
Sound Notification
A short "ding" plays via WebAudio when AI finishes. Toggle with the 🔊 Sound button in quick-actions. Persists in localStorage.
📚 Skills System
/skills/. The AI auto-loads relevant skills at task start. Create skills after complex workflows (3+ tool calls) to save the approach.
Format
--- name: web-scrape-and-summarize description: Scrape a URL and summarize tags: [web, research] category: general --- ## Steps 1. Use web_fetch(url) to get content 2. Present a concise summary 3. Save with create_skill
Commands
# List all skills skill-list # Create a skill skill-create my-skill "Does X" "Steps to do X" "tag1,tag2" # View / patch / delete skill-view my-skill skill-patch my-skill "Updated steps" skill-delete my-skill # Export / Import skill-export my-skill skill-import
Auto-Creation
When the AI encounters the same tool error 3+ times, a workaround skill is auto-created. Every 20 messages, skills are audited for staleness.
🤖 Ollama
Setup
# Install & pull a model curl -fsSL https://ollama.com/install.sh | sh ollama pull llama2 # Start Ollama ollama serve # In WebX11 ollamaconnect
Commands
| Command | Description |
|---|---|
ollamaconnect | Connect to Ollama |
ollamasetproxy | Set remote endpoint |
ollamamodels | List models |
ollamasetmodel | Set active model |
ollamadisconnect | Disconnect |
ollama | Open Ollama Manager UI |
models | List all models |
model-info | Model details |
model-pull | Pull a model |
model-delete | Delete a model |
model-run | Run model with prompt |
OLLAMA_ORIGINS="*" ollama serve
🌐 Search & Web
| Command | Module | Description | Example |
|---|---|---|---|
search / s | SearXNG | Web search | search raspberry pi |
ddg / duck | DDG | DuckDuckGo fallback | ddg news today |
fetch / web | Fetcher | Fetch URL content | fetch https://example.com |
extract | Fetcher | Clean readable text | extract https://news.article |
images | SearXNG | Image search | images cats |
The AI agent also has web_search and web_fetch tools using the same APIs.
🎤 Voice & Sound
- Tap 🎤 to start listening — button pulses green
- Say your command — recognized text fills the input
- Tap again or wait to stop
- Red flash indicates failure
Sound
Toggle AI response "ding" with the 🔊 Sound button. Persists in localStorage.
⚙️ Configuration
All config values stored as webx11_config_* in localStorage. Use the ⚙ Config button or CLI commands.
Notable Keys
| Key | Description | Values |
|---|---|---|
webx11_config_ai_sound | AI sound toggle | on, off |
webx11_config_voice_visible | Mic button visibility | on, off |
Persisted State
| Key | Description |
|---|---|
webx11_filesystem | VFS JSON |
webx11_modules | Loaded module URLs |
webx11_ollama_endpoint | Ollama API URL |
webx11_ollama_model | Selected model |
webx11_startup_modules | Startup selection |
webx11_font_size | Font size (8–32) |
webx11_command_history | Command history |
webx11_terminal_output | Persisted output |
webx11_ai_context | AI conversation history |
webx11_user_profile | AI user profile |
webx11_aliases | User-defined aliases |
🧩 Module System
Commands
| Command | Description |
|---|---|
modules | Open Module Manager UI |
loadmod <url> | Load module from URL |
removemod <name> | Remove a module |
listmods | List all loaded modules |
Boot Order
- Splash screen with ⚙ gear
- Foundation:
virtual-fs.js→module-manager.js→ollama-manager.js→terminal.js - Built-in modules loaded async
- Ext modules loaded if selected
- Splash hides, terminal ready
Code Editor
The AI can edit_module(name) to copy source into the Code Editor modal. Edit inline, then 💾 Save & Test to load live from /_mods/. Use test_module without reloading the page.
🧰 Extended Modules
WebDAV Sync
| Command | Description |
|---|---|
webdav-config | Configure server |
webdav-status | Connection status |
webdav-ls | List remote dir |
webdav-push | Push file |
webdav-pull | Pull file |
webdav-backup | Backup VFS |
webdav-restore | Restore VFS |
webdav-backup-list | List backups |
webdav-browser | Visual file explorer modal |
webdav-explorer | Interactive text browser |
Calculator & Cron
| Command | Module | Description |
|---|---|---|
calc | calc.js | Evaluate math / unit conversion |
cron-every | cron.js | Schedule a command |
cron-list | cron.js | List scheduled jobs |
cron-stop | cron.js | Stop a job |
cron-clear | cron.js | Clear all jobs |
Theme, WPM & Mindmap
| Command | Module | Description |
|---|---|---|
theme | theme.js | Set color theme (dark, light, amber, cyber, …) |
wpm | wpm.js | Package manager |
mindmap | mindmap.js | Show file structure as mindmap |
Server Monitor
| Command | Description |
|---|---|
server | Add server to monitor |
servers | List monitored servers |
server-check | Ping a server |
server-remove | Remove server |
monitor | Toggle auto-monitoring |
IO / Backup
| Command | Description |
|---|---|
export-mods | Export module configs |
import-mods | Import module configs |
backup | Full system backup |
restore | Restore from backup |
share-mod | Share module as text |
Aliases
Built-in: ll = ls, h = help, cls = clear. Define custom: alias x=ls -la. Remove: unalias x. Persists in localStorage.
🔧 BusyBox Utilities
| Command | Description | Example |
|---|---|---|
which | Locate command in module registry + fuzzy suggestions | which ls |
env | List local env vars (webx11_, ollama, user profile) | env |
date | Current time (local, ISO, UTC, Unix timestamp) | date |
cal | ASCII calendar for any month/year | cal 12 2026 |
yes | Output repeated string (capped at 50) | yes test |
seq | Generate number sequence | seq 1 5 |
base64 | Base64 encode/decode | base64 -d aGVsbG8= |
printf | Formatted print (%s, %d, %f) | printf "hello %s" world |
cut | Extract column from file | cut -f2 -d, data.csv |
uniq | Filter adjacent duplicates | uniq lines.txt |
hostname | Show host/platform info | hostname |
whoami | Show current user | whoami |
basename | Strip directory from path | basename /a/b/c.txt |
dirname | Strip filename from path | dirname /a/b/c.txt |
sleep | Countdown delay (1-30s) | sleep 3 |
expand | Convert tabs to spaces | expand code.txt |
All file-reading commands (cut, uniq, expand) work with shell pipes: cat data.csv | cut -f2 -d, | uniq.
🐚 Shell
Pipes |
Chain commands by piping stdout to the next command's stdin. Pipe-aware commands (grep, head, tail, sort, wc, cut, uniq, expand) auto-read from pipe when no file argument is given.
# Filter file listing ls | grep .md # Count lines matching pattern cat notes.txt | grep error | wc # Pipeline: filter → sort → head cat data.csv | grep 2026 | sort | head -5
Redirects > >> <
# Write output to file cal > /tmp/calendar.txt # Append to file echo "new line" >> log.txt # Read file as stdin grep error < log.txt
Command Chaining
# AND: next runs only if previous succeeds touch test.txt && echo "created" # OR: next runs only if previous fails rm nonexistent || echo "failed" # Sequence: runs in order regardless cd /skills; ls
Variables
# Set a variable export GREET=hello # Reference in any command echo $GREET # List all vars set # Remove a var unset GREET
Scripts
VFS files with .sh extension can be executed line by line. Variables persist across lines.
# Create a script in VFS echo 'export NAME=WebX11' > greet.sh echo 'echo "Hello, $NAME!"' >> greet.sh # Run it script greet.sh
Shell Commands
| Command | Description |
|---|---|
export <var>=<val> | Set a shell variable |
unset <var> | Remove a shell variable |
set | List all shell variables |
script <path.sh> | Run a VFS script file |
💬 Sessions
Sessions persist AI conversation logs in VFS /memory/. The AI auto-loads recent sessions at start for continuity.
AI Tools
| Tool | Description |
|---|---|
session_save | Save summary |
session_load | Load by date |
session_recent | Show last N |
session_stats | Aggregate statistics |
The terminal auto-saves session state every 60s and auto-restores on page reload.
💾 Storage
# Clear all WebX11 data localStorage.clear() location.reload() # Back up / restore VFS vfs-export vfs-import
~5–10MB per domain. Only URLs (not code) are stored for modules.
🔒 Security
| Feature | Status |
|---|---|
| Input Validation | ✅ |
| Output Escaping | ✅ |
| No eval() on User Input | ✅ |
| Path Traversal Prevention | ✅ |
| Sandboxed File System | ✅ |
| AI Destructive Confirmations | ✅ Required + timeout |
| Iframe Preview Sandbox | ✅ allow-same-origin allow-scripts |
🔧 Troubleshooting
| Issue | Solution |
|---|---|
| AI not responding | Run ollamaconnect first, ensure Ollama is running |
| Voice not working | Chrome/Edge/Safari only. Grant mic permission |
| Module fails to load | Check CORS on the hosting server |
| Data lost after refresh | Check localStorage is enabled. Private mode clears data |
| AI actions not confirming | Confirm bar auto-denies after 120s. Type ai-allow |
| Sound not playing | Browser may need first user gesture. Toggle off/on |
| Ollama CORS error | OLLAMA_ORIGINS="*" ollama serve |
Debug
# Console F12 → Console # View AI state ai-system ai-context # Module status listmods
⚡ Quick Reference
📄 One-page Quick Reference cheat sheet — printable, dark mode, all commands.
📋 Changelog
- BusyBox — 16 new utility commands:
which,env,date,cal,yes,seq,base64,printf,cut,uniq,hostname,whoami,basename,dirname,sleep,expand - Shell — Full pipe (
|), redirect (>,>>,<), chain (&&,||,;), variable ($VAR), and VFS script execution (script) - Pipe-aware commands (
grep,head,tail,sort,wc,cut,uniq,expand) auto-read from pipe via temp file injection export,unset,set— shell variable management- Multiple ASI and VFS API bug fixes (
fs.fsWrite→fs.writeFileacross 3 modules) - Test Suite — 32 automated regression tests. Run with
load-local modules/test/test-suite.jsthentest,test auto, ortest list - Cache v34 — hard refresh required
- Editor —
edit <path>opens inline VFS editor modal - Diff —
diff a bLCS-based comparison +diff --module - Aliases —
ll,h,clsdefaults + custom alias definition - File Finder —
find <query>recursive VFS search - Agent loop: capped at 8 turns (was 1),
edit_moduledestructive confirmation, model auto-validation ai-stopnow cancels chat + stream, not just tool calls- Unknown commands awaited, "Command not found" suppressed on AI route
loopResultscope fix — no more undefined error on AI fail- Preview iframe allows JS (
allow-scripts), cache bumpv=18 - Splash fallback + startup modal list all 12 ext modules
- AI Agent with full tool-calling loop (28 tools)
- Inline destructive confirmation bar with 120s countdown timer
- Skills system (8 CLI commands + UI modal)
- Voice input (🎤 button, SpeechRecognition, show/hide toggle)
- Sound notification (🔊 toggle, WebAudio ding)
- AI spinner in status bar
- Session system (save/load/recent/stats)
- WebDAV sync (8 commands)
- Web search (SearXNG + DDG + URL fetch/extract)
- Config manager (6 commands + UI)
- Startup modules selector (⚙ gear on splash)
- Code editor modal (module editing, save & test live)
- HTML preview via srcdoc (mobile)
- File/dir autocomplete, pipe support
- Smart context profiles, dynamic prompts with variables
- Server monitor, ChatStudio overlay
- Modular architecture: 23 JS modules, async loader
- Monolith refactored into core/ext modules
- Async module loader with splash screen
- Config manager modal
- Bootloader fix for disabled modules