Skip to content

Instantly share code, notes, and snippets.

@dan-manges
Created March 11, 2026 22:54
Show Gist options
  • Select an option

  • Save dan-manges/c13dd17612b4842a35f5ff72290e49d4 to your computer and use it in GitHub Desktop.

Select an option

Save dan-manges/c13dd17612b4842a35f5ff72290e49d4 to your computer and use it in GitHub Desktop.

RWX CLI

A cloud platform powered by an accelerated container runtime.

RWX runs your CI, builds your container images, and gives your coding agents cloud sandboxes — all on a runtime purpose-built for speed. Content-based caching, DAG execution, and an agent-native UX mean sub-second cached builds and instant feedback without pushing to git.

Accelerated Container Runtime

RWX replaces BuildKit with a fundamentally better approach to running workloads in containers.

No build context uploads

BuildKit requires uploading your entire repository as a build context before anything runs. RWX clones the repository inside the runtime, eliminating the upload step entirely. For large codebases, this alone saves significant time.

# BuildKit: COPY . . (uploads entire repo from your machine)
# RWX: clones directly inside the runtime
tasks:
  - key: code
    call: git/clone 2.0.4
    with:
      repository: https://github.com/your-org/your-repo.git
      ref: ${{ init.commit-sha }}

Content-based caching that doesn't cascade

In a Dockerfile, changing an early layer invalidates every layer after it. Careful COPY/RUN ordering is the only mitigation, and it's fragile.

RWX caches each task by the contents of its filtered filesystem. Change your source code but not your dependencies? The install step stays cached. No cascade.

  - key: npm-install
    use: [code, node]
    run: npm install
    filter:
      - package.json
      - package-lock.json

With BuildKit, you need to carefully structure COPY package*.json before COPY . . to preserve this cache. On RWX, you start with all files and filter down — the runtime handles the rest.

DAG execution vs. sequential layers

Dockerfiles are sequential. Each instruction waits for the previous one. BuildKit added some parallelism for multi-stage builds, but the syntax is awkward and limited.

RWX tasks form a DAG. Independent tasks run in parallel automatically — declare dependencies with use, and the runtime schedules everything optimally:

tasks:
  - key: code
    call: git/clone 2.0.4
    with:
      repository: https://github.com/your-org/your-repo.git
      ref: ${{ init.commit-sha }}

  - key: go
    call: golang/install 1.2.1
    with:
      go-version: "1.23.0"

  - key: deps
    use: [go, code]
    call: golang/mod-download 1.0.1
    filter: [go.mod, go.sum]

  # lint and test run in parallel — both depend on deps, not each other
  - key: lint
    use: deps
    run: golangci-lint run ./...

  - key: test
    use: deps
    run: go test ./...

No && chaining, no layer gymnastics

Dockerfiles force you to chain commands with && to avoid extra layers. RWX tasks are multi-line shell scripts:

# BuildKit:
#   RUN apt-get update && apt-get install -y curl jq && apt-get clean

# RWX:
  - key: system
    run: |
      apt-get -y update
      apt-get -y install curl jq
      apt-get -y clean

Multi-stage builds without COPY --from

BuildKit multi-stage builds require manually copying files between named stages. RWX uses artifacts and task dependencies — compose stages naturally without bookkeeping:

  - key: build
    use: deps
    run: npm run build
    outputs:
      artifacts:
        - key: dist
          path: dist/

  - key: image
    run: echo "node dist/index.js" | tee $RWX_IMAGE/command

Native OCI image output

RWX builds produce OCI-compliant images you can push to any registry:

rwx image push <task-id> --to your-registry.com/your-image:tag

No separate docker build + docker push pipeline. No Docker daemon required.

Agent-Native UX

RWX is built for the workflow where AI agents write code and need fast CI feedback.

Local CLI — no push required

Run builds directly from your terminal. Your local changes are automatically included:

rwx run .rwx/ci.yml --wait --fail-fast

No commit. No push. No waiting for webhooks. Agents iterate on code and validate against real CI in a tight loop.

Agentic run loops

Give your agent a single instruction and let it iterate until CI passes:

Make sure CI passes by running rwx run .rwx/ci.yml --wait --fail-fast, and then commit and push.

When a run fails, the CLI outputs structured, actionable instructions — not raw log dumps — telling the agent exactly which tasks failed and how to pull logs or artifacts to diagnose the issue.

Semantic outputs

Test results are a semantic output on RWX. Instead of grepping through thousands of log lines, agents (and humans) get structured test failures with file paths, test names, and error messages:

  - key: test
    use: deps
    run: go test -json ./... > test-results.json
    outputs:
      test-results:
        - path: test-results.json

MCP server for debugging

RWX provides an MCP server that AI coding assistants can use to query test failures and pull logs directly:

# Add to Claude Code
claude mcp add rwx -- rwx mcp serve

Then just paste a run URL and ask your agent to fix the failures.

Cloud sandboxes for agents

Give coding agents isolated cloud environments with RWX sandboxes. File syncing, content-based caching, and full reproducibility — agents running in separate git worktrees automatically get isolated sandboxes:

rwx sandbox exec -- npm test

The RWX skill

The RWX skill teaches coding agents how to work with RWX — finding docs, linting configs, and kicking off run loops:

# Claude Code
/plugin marketplace add rwx-cloud/skills
/plugin install rwx

# Codex, Cursor, Copilot, and other agents
npx skills add rwx-cloud/skills

With the skill installed, agents can write and validate RWX configs autonomously.

More Features

Composable workflows

Call other workflow files as tasks. Build modular pipelines that share and reuse components:

tasks:
  - key: ci
    call: ${{ run.dir }}/ci.yml
    init:
      commit-sha: ${{ init.commit-sha }}

  - key: release
    after: [ci]
    call: ${{ run.dir }}/release.yml
    init:
      version: ${{ init.version }}

Concurrency pools

Control parallel execution and automatically cancel outdated runs:

concurrency-pools:
  - id: my-org/my-repo:ci-${{ init.ref }}
    capacity: 1
    on-overflow: cancel-running

Reusable packages

A curated ecosystem of packages for common tasks — language installs, dependency management, git operations:

  - key: node
    call: nodejs/install 1.1.11
    with:
      node-version: 20.12.1

Quick Start

Install

# macOS / WSL
brew install rwx-cloud/tap/rwx

# Linux — download from GitHub Releases

Authenticate

rwx login
rwx whoami

Create a workflow

Add a .rwx/ci.yml to your project:

base:
  image: ubuntu:24.04
  config: rwx/base 1.0.0

tasks:
  - key: hello
    run: echo "hello from RWX"

Run it

rwx run .rwx/ci.yml --open

Documentation

Full docs at rwx.com/docs:

Links

Contributing

Please read CONTRIBUTING.md for information around our development & contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment