WebX11 Docs

v4.2 26 core · 15 ext 135+ commands

🚀 Welcome to newOS4

🎮 New here? Type 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

helpShow all commands
lsList files
catView file content
clearClear terminal
touchCreate a file
aiAsk the AI assistant

📋 Workflow

  1. Type help — see every available command
  2. Type ls — browse files in your virtual drive
  3. Type touch hello.txt — create a file
  4. Type edit hello.txt — write something and save
  5. Type ai "summarize this" — let AI analyze your files
  6. 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:

MethodReturnsDescription
readFile(path)string or nullRead file content
writeFile(path, content)booleanWrite string to file
ls(path)arrayList directory entries
mkdir(path)booleanCreate directory
rm(path)booleanRemove file
rmdir(path)booleanRemove empty directory
touch(path)booleanCreate empty file
cd(path)booleanChange current directory
pwd()stringCurrent directory path
mv(old, new)booleanMove/rename file
cp(src, dst)booleanCopy 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/MethodDescription
.endpointCurrent Ollama API URL
.currentModelActive model name
.modelsArray of available models
.connectedBoolean 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

  1. Open index.html in Chrome/Edge
  2. Watch the splash screen load modules
  3. Type help + Enter
  4. 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
⌨️ Keyboard Shortcuts
  • Enter — Execute
  • Tab — Cycle autocomplete
  • ↑/↓ — Command history
  • Esc — Hide autocomplete / stop AI
  • | — Pipe: ls | grep hello

📖 Full Command Reference

System

CommandDescriptionExample
helpShow all commandshelp
clear / clsClear terminalcls
echoPrint textecho Hello
memShow memory usagemem
statusSystem statusstatus
font-sizeChange font size (8–32)font-size 16
load-localLoad module from VFS or URLload-local modules/ext/calc.js
startup-modulesOpen startup module selectorstartup-modules
previewPreview HTML in iframepreview test.html
factory-resetReset configfactory-reset
reset-vfsReset VFSreset-vfs

AI Assistant

CommandDescriptionExample
ai / askChat with AI (tool-calling)ai create a notes file
ai-clearReset conversation contextai-clear
ai-systemView/set system promptai-system
ai-contextShow conversation memoryai-context
ai-allowAllow pending destructive actionai-allow
ai-denyDeny pending destructive actionai-deny
ai-stopCancel running AI requestai-stop

Smart Context

CommandDescriptionExample
contextSet active profilecontext expert
contextsList profilescontexts
context-newCreate profilecontext-new myprofile
context-deleteDelete profilecontext-delete old
smart-askAsk with current profilesmart-ask explain this

Dynamic Prompts

CommandDescriptionExample
promptUse saved templateprompt summarize
prompt-saveSave templateprompt-save myprompt
prompt-listList saved promptsprompt-list
prompt-deleteDelete promptprompt-delete old
prompt-varSet template variableprompt-var name Alice
prompt-varsList variablesprompt-vars

Skills

CommandDescriptionExample
skill-listList all skillsskill-list
skill-viewView skill contentskill-view web-scraper
skill-createCreate a skillskill-create name desc "steps" tags
skill-patchUpdate a skillskill-patch name "new content"
skill-deleteDelete a skillskill-delete oldskill
skill-exportExport skill to JSONskill-export myskill
skill-importImport skill from JSONskill-import
skill-syncRebuild skill indexskill-sync

Config

CommandDescriptionExample
configGet a config valueconfig
config-setSet a config valueconfig-set key value
config-listList all configconfig-list
config-deleteDelete a config entryconfig-delete key
config-exportExport config as JSONconfig-export
config-resetReset all configconfig-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.

CommandDescriptionExample
ls / llList filesll
cdChange directorycd notes
pwdPrint working directorypwd
catView filecat readme.txt
putCreate file with contentput hello.txt Hello World
editOpen in modal editoredit notes.md
rmDelete filerm temp.txt
mkdirCreate directorymkdir projects
rmdirRemove directoryrmdir empty
mvMove/renamemv old.txt new.txt
cpCopy filecp a.txt b.txt
touchCreate empty filetouch newfile.txt
treeDirectory treetree
findRecursive file searchfind .txt
diffCompare two filesdiff a.txt b.txt
grepSearch file contentsgrep hello *.txt
headFirst N lineshead file.txt 10
tailLast N linestail file.txt 10
sortSort file linessort file.txt
wcCount lines/words/charswc file.txt
duDisk usagedu
uploadUpload file from deviceupload
downloadDownload filedownload file.txt
vfs-exportDownload VFS as JSONvfs-export
vfs-importImport VFS from JSONvfs-import

🤖 AI Assistant

Tool-Calling Agent The AI runs a full agent loop with 28 tools: filesystem, web search, URL fetch, skills, WPM, session memory, user profile, module introspection.

How It Works

  1. Type ai <request>
  2. AI loads relevant skills + recent session memory
  3. Decides which tools to call (up to 8 turns)
  4. Destructive tools trigger an inline confirm bar — no dark overlay
  5. 120s countdown: yellow → bold red at 30s → pulsing at 10s
  6. Type ai-allow / ai-deny or tap the buttons
  7. After complex tasks, AI suggests creating a skill
⚠️ Destructive Tools write_file, delete_file, run_command, make_directory, edit_module all require confirmation before executing.

Available Tools

ToolDescriptionDestructive?
list_filesList VFS directory
read_fileRead file (8k trunc)
write_fileWrite to file
make_directoryCreate directory
delete_fileDelete file/dir
get_statusSystem status
get_helpList commands
web_searchSearXNG + DDG
web_fetchExtract URL content
run_commandExecute terminal cmd
load_skillsSearch relevant skills
create/patch/list_skillsSkill management
view/edit/test/reloadModule operationsedit ✅
user_get/set/list/forgetUser profile
session_save/load/recent/statsSession 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

Procedural Memory Skills are reusable markdown procedures stored in VFS /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

Local or Remote AI WebX11 connects to any Ollama instance. All tool-calling and chat features require a connection.

Setup

# Install & pull a model
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama2

# Start Ollama
ollama serve

# In WebX11
ollamaconnect

Commands

CommandDescription
ollamaconnectConnect to Ollama
ollamasetproxySet remote endpoint
ollamamodelsList models
ollamasetmodelSet active model
ollamadisconnectDisconnect
ollamaOpen Ollama Manager UI
modelsList all models
model-infoModel details
model-pullPull a model
model-deleteDelete a model
model-runRun model with prompt
🔌 CORS for Remote OLLAMA_ORIGINS="*" ollama serve

🌐 Search & Web

SearXNG + DDG + URL Fetcher Three modules provide comprehensive web capabilities via the proxy API.
CommandModuleDescriptionExample
search / sSearXNGWeb searchsearch raspberry pi
ddg / duckDDGDuckDuckGo fallbackddg news today
fetch / webFetcherFetch URL contentfetch https://example.com
extractFetcherClean readable textextract https://news.article
imagesSearXNGImage searchimages cats

The AI agent also has web_search and web_fetch tools using the same APIs.

🎤 Voice & Sound

Speech Recognition A 🎤 button in the input area activates SpeechRecognition. Chrome, Edge, Safari 14.1+. Not Firefox.
  • 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

KeyDescriptionValues
webx11_config_ai_soundAI sound toggleon, off
webx11_config_voice_visibleMic button visibilityon, off

Persisted State

KeyDescription
webx11_filesystemVFS JSON
webx11_modulesLoaded module URLs
webx11_ollama_endpointOllama API URL
webx11_ollama_modelSelected model
webx11_startup_modulesStartup selection
webx11_font_sizeFont size (8–32)
webx11_command_historyCommand history
webx11_terminal_outputPersisted output
webx11_ai_contextAI conversation history
webx11_user_profileAI user profile
webx11_aliasesUser-defined aliases

🧩 Module System

26 Core + 14 Ext Modules loaded in dependency order at startup. Toggle ext modules with ⚙ gear on splash.

Commands

CommandDescription
modulesOpen Module Manager UI
loadmod <url>Load module from URL
removemod <name>Remove a module
listmodsList all loaded modules

Boot Order

  1. Splash screen with ⚙ gear
  2. Foundation: virtual-fs.jsmodule-manager.jsollama-manager.jsterminal.js
  3. Built-in modules loaded async
  4. Ext modules loaded if selected
  5. 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

CommandDescription
webdav-configConfigure server
webdav-statusConnection status
webdav-lsList remote dir
webdav-pushPush file
webdav-pullPull file
webdav-backupBackup VFS
webdav-restoreRestore VFS
webdav-backup-listList backups
webdav-browserVisual file explorer modal
webdav-explorerInteractive text browser

Calculator & Cron

CommandModuleDescription
calccalc.jsEvaluate math / unit conversion
cron-everycron.jsSchedule a command
cron-listcron.jsList scheduled jobs
cron-stopcron.jsStop a job
cron-clearcron.jsClear all jobs

Theme, WPM & Mindmap

CommandModuleDescription
themetheme.jsSet color theme (dark, light, amber, cyber, …)
wpmwpm.jsPackage manager
mindmapmindmap.jsShow file structure as mindmap

Server Monitor

CommandDescription
serverAdd server to monitor
serversList monitored servers
server-checkPing a server
server-removeRemove server
monitorToggle auto-monitoring

IO / Backup

CommandDescription
export-modsExport module configs
import-modsImport module configs
backupFull system backup
restoreRestore from backup
share-modShare 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

16 Unix Utility Commands Lightweight utility commands for everyday terminal work — identity, path, text, and system info tools. All work standalone and with shell pipes.
CommandDescriptionExample
whichLocate command in module registry + fuzzy suggestionswhich ls
envList local env vars (webx11_, ollama, user profile)env
dateCurrent time (local, ISO, UTC, Unix timestamp)date
calASCII calendar for any month/yearcal 12 2026
yesOutput repeated string (capped at 50)yes test
seqGenerate number sequenceseq 1 5
base64Base64 encode/decodebase64 -d aGVsbG8=
printfFormatted print (%s, %d, %f)printf "hello %s" world
cutExtract column from filecut -f2 -d, data.csv
uniqFilter adjacent duplicatesuniq lines.txt
hostnameShow host/platform infohostname
whoamiShow current userwhoami
basenameStrip directory from pathbasename /a/b/c.txt
dirnameStrip filename from pathdirname /a/b/c.txt
sleepCountdown delay (1-30s)sleep 3
expandConvert tabs to spacesexpand code.txt

All file-reading commands (cut, uniq, expand) work with shell pipes: cat data.csv | cut -f2 -d, | uniq.

🐚 Shell

Pipes · Redirects · Variables · Scripts The shell module sits on top of every command — pipes, redirections, variable substitution, command chaining, and VFS script execution work automatically without any prefix.

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

CommandDescription
export <var>=<val>Set a shell variable
unset <var>Remove a shell variable
setList 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

ToolDescription
session_saveSave summary
session_loadLoad by date
session_recentShow last N
session_statsAggregate statistics

The terminal auto-saves session state every 60s and auto-restores on page reload.

💾 Storage

localStorage Persistence Everything survives hard refreshes via 15+ localStorage keys.
# 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

FeatureStatus
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
⚠️ Module Loading Only load modules from trusted sources — they have full terminal access.

🔧 Troubleshooting

IssueSolution
AI not respondingRun ollamaconnect first, ensure Ollama is running
Voice not workingChrome/Edge/Safari only. Grant mic permission
Module fails to loadCheck CORS on the hosting server
Data lost after refreshCheck localStorage is enabled. Private mode clears data
AI actions not confirmingConfirm bar auto-denies after 120s. Type ai-allow
Sound not playingBrowser may need first user gesture. Toggle off/on
Ollama CORS errorOLLAMA_ORIGINS="*" ollama serve

Debug

# Console
F12 → Console

# View AI state
ai-system
ai-context

# Module status
listmods

⚡ Quick Reference

WebX11 v4.2
helpShow all commands
clsClear terminal
llList files
cd <dir>Change directory
cat <f>View file
edit <f>Edit file
ai <msg>Chat with AI
search <q>Web search
find <q>File search
diff a bCompare files
ollamaconnectConnect AI
ai-allowAllow destructive
ai-denyDeny destructive
modulesModule Manager
skill-listList skills
aliasList aliases
previewHTML preview
uploadUpload file
| pipeChain commands
> fileRedirect output
whichLocate command
envShow env vars
scriptRun .sh file
dateShow time
calShow calendar
base64Encode/decode
seqNumber sequence
whoamiShow user
basenameStrip dir path

📄 One-page Quick Reference cheat sheet — printable, dark mode, all commands.

📋 Changelog

v4.2.1 — May 20262026-05-27
  • 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.fsWritefs.writeFile across 3 modules)
  • Test Suite — 32 automated regression tests. Run with load-local modules/test/test-suite.js then test, test auto, or test list
  • Cache v34 — hard refresh required
v4.2 — May 20262026-05-25
  • Editoredit <path> opens inline VFS editor modal
  • Diffdiff a b LCS-based comparison + diff --module
  • Aliasesll, h, cls defaults + custom alias definition
  • File Finderfind <query> recursive VFS search
  • Agent loop: capped at 8 turns (was 1), edit_module destructive confirmation, model auto-validation
  • ai-stop now cancels chat + stream, not just tool calls
  • Unknown commands awaited, "Command not found" suppressed on AI route
  • loopResult scope fix — no more undefined error on AI fail
  • Preview iframe allows JS (allow-scripts), cache bump v=18
  • Splash fallback + startup modal list all 12 ext modules
v4.12026-05-23
  • 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
v4.02026-05-20
  • Monolith refactored into core/ext modules
  • Async module loader with splash screen
  • Config manager modal
  • Bootloader fix for disabled modules