◐ Shell
reader mode source ↗
Skip to content
CtrlK
Cancel

Bastion

Bastion deploys virtual computers for coding agents.
Terminal window
curl -fsSL https://bastion.computer/install.sh | bash

Scale background coding agents

Run multiple background coding agents at the same time with zero runtime conflicts from other agents working in parallel.

Run agent environments in isolation

Every coding agent runs in a separate VM, giving agents complete control of its dev environment from file systems to background processes.

Define environments as JSON

All Bastion environments are initialized with schema validated JSON templates rather than manually configured.

Self-host on your infrastructure

Run Bastion on Linux systems with KVM support, from a local workstation to cloud instances like AWS EC2.

  1. Define your agent’s environment with JSON configuration.

    template.json
    {
    "agents": {
    "opencode": {
    "working_directory": "/workspace/acme-app",
    "auth": {
    "openai": {
    "type": "api",
    "key": "${{ env.OPENAI_API_KEY }}"
    }
    },
    "config": {
    "model": "openai/gpt-5.5",
    "permission": "allow"
    }
    }
    },
    "actions": {
    "init": [
    {
    "use": "setup_bun"
    },
    {
    "run": "git clone https://github.com/.../acme-app.git",
    "working_directory": "/workspace"
    },
    {
    "run": "bun install",
    "working_directory": "/workspace/acme-app"
    }
    ],
    "start": [
    {
    "run": "nohup bun run dev &",
    "working_directory": "/workspace/acme-app"
    }
    ]
    }
    }
  2. Initialize the template.

    Terminal window
    bastion templates create --key acme-app --file ./template.json
    # {
    # "id": "tpl_123",
    # "key": "acme-app",
    # "createdAt": "..."
    # }
  3. Deploy your agent.

    Terminal window
    bastion env create --template-key acme-app --key agent-1 --tag issue-32
    # {
    # "id": "env_abc",
    # "key": "agent-1",
    # "status": "running",
    # "templateId": "tpl_123",
    # "tags": ["issue-32"],
    # "createdAt": "...",
    # "updatedAt": "..."
    # }
  4. Interface directly via OpenCode or SSH.

    Terminal window
    bastion opencode --key agent-1