ViteHub

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

ProviderUse
just-bashEmulate shell commands against a ViteHub workspace filesystem.
cloudflare-shellDelegate raw shell command strings to a Cloudflare sandbox-compatible client.

Start here

Quickstart
Create a read-only workspace shell runtime.
Usage
Configure command policy, path helpers, search, writable files, and sandbox clients.
Runtime API
Review exports, provider options, filesystem adapters, and result shapes.
Troubleshooting
Fix rejected commands, path escapes, read-only writes, and unsupported flags.
Copyright © 2026