Shell
The Shell global runs shell commands inside the Scripting app via the embedded ios_system runtime. Useful for ad-hoc tooling — listing and editing files, processing text streams, fetching URLs with curl, archiving with tar, running python, etc.
Available commands are limited to what
ios_systemships. This is not a full POSIX shell. Only commands provided by the bundledios_systemmodules work: roughly the basic file / text / network utilities (ls,cp,mv,rm,cat,echo,grep,sed,awk,cut,sort,uniq,head,tail,wc,find,xargs,tar,gzip,curl,scp,sftp,ssh,python, ...) plus shell builtins (cd,pwd,env,export, pipes, redirects). External tools that are not bundled —git,make,node,npm,brew,gcc, etc. — are unavailable, and you cannot execute arbitrary binaries shipped with a script (iOS sandbox restriction).
Shell.run and Python.run share a single serial queue: while one is running, others wait. This is intentional — ios_system and the embedded Python interpreter share global state (env vars, sys.modules, current working directory) and cannot run concurrently.
Methods
Shell.run(command, options?): Promise<ShellExecutionResult>
Execute a shell command. Returns when the command exits or the timeout is reached. Non-zero exit codes resolve normally; only argument validation errors reject the promise.
