Interactive Development

View as Markdown

This guide walks through using Chaser as a persistent remote development environment with a real shell, file persistence, and port forwarding.

Set up a workspace

Create a named workspace so your files persist across sessions:

$chaser workspaces create --session-type sandbox --name dev --json

Optionally pin an OCI image for a custom base environment:

$chaser workspaces create --session-type sandbox --name dev \
> --image ghcr.io/example/dev:latest --json

Boot and connect

$# Create a session attached to your workspace
$SID="$(chaser sandbox --workspace dev --json | jq -r '.id')"
$
$# Open an interactive shell
$chaser shell "$SID"

Your shell drops you into /workspace where workspace files are mounted.

Run a dev server with port forwarding

Start a server inside the sandbox and access it locally:

$# Start a dev server
$chaser shell "$SID" -c "cd /workspace && npm run dev -- --host 0.0.0.0"
$
$# Open a local proxy (in another terminal)
$chaser forward "$SID" 3000 8080 --open

This binds http://127.0.0.1:8080 and proxies traffic to port 3000 in the sandbox. You can also access it directly at https://<session_id>.chaser.sh/forward/3000/.

Upload project files

Push local files to the sandbox:

$# Upload a single file
$chaser upload "$SID" ./package.json /workspace/package.json
$
$# Or use teleport to upload a whole directory and open a shell
$chaser teleport "$SID" --local ./my-app --remote /workspace

Snapshot before risky changes

Create a restore point before a major upgrade:

$chaser workspaces snapshots create dev --name before-upgrade --json

If something goes wrong, restore:

$chaser workspaces snapshots restore dev before-upgrade --force --json

Clone a workspace for branches

Create an independent copy of your workspace for parallel work:

$chaser workspaces create --clone-from dev --name dev-feature --json

Import from GitHub

Import a repository directly into a new workspace:

$curl -sS "$CHASER_API_URL/v1/workspaces/import" \
> -H "Authorization: Bearer $CHASER_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{"github_repo": "owner/repo"}' | jq

The repository is cloned into /workspace and the repo selector is saved on the workspace for re-bootstrap.