NEX OS ships two independent terminal emulators:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shadownrx/windows/llms.txt
Use this file to discover all available pages before exploring further.
Cmd.tsx (modeled after the Windows Command Prompt) and Terminal.tsx (modeled after a Bash/PowerShell environment). Both terminals share the same underlying runtime services — useNexRuntime() for package management and .nex execution, useFileSystem() for VFS operations, and useWindowManager() for launching apps — but differ in their prompt style, command syntax, and visual appearance.
Supported Commands
Both terminals support a common set of filesystem and utility commands, with syntax differences reflecting their respective OS styles.| Command | CMD Style | Terminal Pro Style | Description |
|---|---|---|---|
npm install <pkg> | ✅ | ✅ | Install a virtual npm package with simulated output |
npm run <script> | ✅ | ✅ | Run a virtual npm script |
pnpm add <pkg> | ✅ | ✅ | Install via pnpm with purple-colored output |
pnpm run <script> | ✅ | ✅ | Run a pnpm script |
./file.nex | ✅ | ✅ | Execute a .nex binary from the current path |
help | ✅ | ✅ | List all available commands |
cls / clear | ✅ | ✅ | Clear the terminal screen |
dir / ls | dir | ls | List contents of the current directory |
cd <path> | ✅ | ✅ | Change the current directory |
mkdir <name> | ✅ | ✅ | Create a new folder in the VFS |
touch <file> | ✅ | ✅ | Create a new file in the VFS |
echo <text> | ✅ | ✅ | Print a message to the terminal output |
del / rm | del | rm | Delete a file or folder |
ping <host> | ✅ | ✅ | Simulated network ping |
ipconfig | ✅ | — | Display simulated network configuration |
systeminfo | ✅ | — | Display OS and runtime version info |
tree | ✅ | — | Print the VFS directory tree |
node / node -v | ✅ | ✅ | Simulated Node.js runtime (v20.15.0) |
whoami | ✅ | ✅ | Display current user |
cat <file> | — | ✅ | Print file contents from the VFS |
pwd | — | ✅ | Print the current directory path |
env | — | ✅ | Print simulated environment variables |
which <cmd> | — | ✅ | Resolve command binary path |
uname | — | ✅ | Display kernel/OS information |
start <app> | ✅ | ✅ | Launch a registered NEX app by name |
ver | ✅ | — | Display NEX OS version string |
NPM and PNPM Workflow
When you run annpm or pnpm command in either terminal, the request is handed off to the NexRuntimeContext via the npmRun() or pnpmRun() methods. These functions return an AsyncGenerator<string> that yields output lines one at a time with realistic delays — giving the appearance of a live package installation. The terminal iterates the generator with for await:
⏳ indicator is shown. The VFS is mutated during the run: package.json, package-lock.json (or pnpm-lock.yaml), and node_modules/ entries are created or updated inside FileSystemContext.
Executing .nex Files from the Terminal
Both terminals support three forms of .nex invocation, all resolved via resolveNex() from NexRuntimeContext:
.nex binary is found, the terminal prints a launch message and calls openWindow() after a short delay:
command not found error.
CMD vs Terminal Pro
| Feature | CMD (Cmd.tsx) | Terminal Pro (Terminal.tsx) |
|---|---|---|
| Prompt format | C:\Users\> | user@nexos:c:\$ |
| Background | #0c0c0c (Windows black) | #0d1117 (GitHub dark) |
| Font | Consolas, Courier New | Cascadia Code, JetBrains Mono, Fira Code |
| npm output color | Green (#4ade80) | Green (#4ade80) |
| pnpm output color | Purple (#a78bfa) | Purple (#a78bfa) |
| Windows-only cmds | dir, ipconfig, systeminfo, tree, ver | — |
| Unix-only cmds | — | cat, pwd, env, which, uname |
| Tab autocomplete | ✅ | ✅ |
| Command history | ✅ (↑ / ↓) | ✅ (↑ / ↓) |
.nex execution | ✅ | ✅ |
NexRuntimeContext for package management and the same FileSystemContext for VFS operations, so changes made in CMD (e.g., mkdir my-project) are immediately visible in Terminal Pro and in File Explorer.
Example Terminal Session
Both CMD and Terminal Pro are simulated environments. They do not execute real system commands, access the host filesystem, make real network requests, or install actual npm packages. All operations are handled in-memory by
NexRuntimeContext and FileSystemContext. The output is designed to be realistic, but no real side effects occur outside the browser sandbox.