Shell
Run provider-backed shell commands against workspace files or sandbox clients.
@vitehub/shell turns controlled file and sandbox APIs into Shell Runtime sessions.
Use Shell when an agent, workflow, or server route needs real shell syntax without exposing an unrestricted host shell.
import {
createShellRuntime,
} from '@vitehub/shell'
import { createJustBashProvider } from '@vitehub/shell/providers/just-bash'
import {
createReadonlyWorkspaceFs,
workspaceMountPoint,
} from '@vitehub/shell/workspace'
const runtime = createShellRuntime({
provider: createJustBashProvider({
commands: ['pwd', 'ls', 'cat', 'rg'],
cwd: workspaceMountPoint,
fs: createReadonlyWorkspaceFs(workspace),
}),
})
What Shell owns
Shell analysis
Parse commands with
sh-syntax for advisory metadata and guardrails.Workspace filesystems
Mount a ViteHub workspace under
/workspace with read-only or writable adapters.Runtime adapters
Use
just-bash for workspace-backed commands or cloudflare-shell for sandbox-backed execution.Runtime providers
| Provider | Use |
|---|---|
just-bash | Emulate shell commands against a ViteHub workspace filesystem. |
cloudflare-shell | Delegate raw shell command strings to a Cloudflare sandbox-compatible client. |

