# 1-Click Setup & Pipeline Blueprints

Setting up production-grade continuous integration typically requires hours of research, manual YAML drafting, runner configuration, cache tuning, and branch protection adjustments. Membl automates the entire process with **1-Click Pipeline Blueprints**.

In 60 seconds, Membl inspects your repository stack, applies seven battle-tested CI best practices, and opens a ready-to-merge Draft PR on your repository.

<Cards>
  <Card title="Membl Pipelines" href="/docs/pipelines">
    Explore the four architectural pillars and runner compute models.
  </Card>

  <Card title="Workflow Schema" href="/docs/workflow-schema">
    Full reference for 

    `.membl/workflows/*.yml`

     syntax.
  </Card>

  <Card title="AI Agents & MCP" href="/docs/agents">
    Teach Claude Code, Codex, Cursor, and Antigravity to plan and validate pipelines.
  </Card>

  <Card title="Security" href="/security">
    How Membl isolates sandboxes, protects caches, and safeguards code.
  </Card>
</Cards>

## The 60-second onboarding workflow

<Steps>
  <Step>
    ### 1. Sign in and connect GitHub

    Sign in at [app.membl.io/sign-in](https://app.membl.io/sign-in) with Google or email and password. Under **Settings -> Connections**, install the Membl GitHub App for your organization. Every plan starts with a 7-day trial and **5,000 vCPU-minutes ($10 compute value)**.
  </Step>

  <Step>
    ### 2. Automatic stack scan

    Select a repository to onboard. Membl performs a bounded, read-only inspection of repository markers:

    * Package manifests (`package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`)
    * Monorepo definitions (`pnpm-workspace.yaml`, `turbo.json`, `nx.json`, Cargo workspaces)
    * Test configurations (Vitest, Jest, Playwright, Pytest, Nextest)
    * Build tooling, frameworks, and existing workflow definitions

    The scan operates under strict isolation: zero secret reads, zero token extraction, and zero persistence of source code.
  </Step>

  <Step>
    ### 3. Review the 1-click Draft PR

    Membl generates a tailored pipeline blueprint and opens a Draft PR for your repository:

    * **Drop-in GitHub Actions mode**: Updates `runs-on` in `.github/workflows/*.yml` to `membl-x64` (or `membl-arm` for Linux Arm64) while preserving previous values in comments.
    * **Native workflow option**: Optionally emits a declarative `.membl/workflows/ci.yml` file conforming to the Workflow Schema v1 specification.
    * Itemized breakdown of detected stack markers and applied optimizations.
    * Single required check gate (`CI / ci`) configured for branch protection.
  </Step>

  <Step>
    ### 4. First run and live receipts

    Trigger your first run by reviewing or merging the Draft PR. Workflows execute on managed single-use runners with mount-time cache overlays, and your dashboard renders an itemized cost and latency receipt for each job.
  </Step>
</Steps>

## Seven automatic best practices

Every pipeline generated by Membl automatically enforces seven essential engineering best practices:

### 1. Parallel fast-fail DAG

Monolithic CI workflows that run lint, typecheck, unit tests, and image builds in a single serial script create massive developer latency bottlenecks.

Membl restructures your pipeline into an asynchronous Directed Acyclic Graph (DAG). Independent check jobs run concurrently across parallel runners, failing immediately at the first syntax or test error to minimize feedback loops and compute costs.

### 2. Single `CI / ci` required gate

When repositories enforce branch protection with multiple individual check statuses (`lint`, `test-unit`, `test-e2e`), adding or renaming a test job breaks branch protection or deadlocks merges.

Membl establishes a single, stable aggregator gate named `CI / ci`:

* In default GitHub Actions workflows, an aggregator job runs with `if: always()` and verifies that all prerequisite check jobs succeeded.
* In native pipelines, `ci` is defined as `type: gate`, depending on upstream check jobs without consuming runner compute.

Branch protection rules on `main` stay permanently bound to `CI / ci`, allowing you to refactor internal workflow jobs without touching repository settings.

### 3. Security hardening

Pipelines run in production environments and must follow strict least-privilege principles:

* **Empty top-level permissions**: Workflows declare `permissions: {}` at the top level, revoking default read/write tokens. Only specific jobs that require repository access receive explicit scopes (such as `contents: read`).
* **40-character SHA pinning**: External third-party actions are pinned to immutable 40-character commit SHAs rather than mutable Git tags (e.g., `actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5`), preventing supply-chain tag-hijacking attacks.
* **Credential hygiene**: Checkouts set `persist-credentials: false` to ensure GitHub tokens are never left on runner disks, and all jobs specify explicit `timeout-minutes` to eliminate runaway jobs.

### 4. Zero-waste concurrency and path filters

Developer velocity suffers when stale commits queue redundant pipeline runs:

* **Superseded PR cancellation**: With `concurrency: { policy: "cancel-superseded-pr" }` in native workflows (or PR-scoped `cancel-in-progress: true` in GitHub Actions), pushing a new commit immediately cancels obsolete in-flight runs for that pull request.
* **Change-scoped test selection**: Use `.membl/tests.yml` or path filters (`paths` in `.membl/workflows/*.yml`, `paths` / `paths-ignore` in GitHub Actions) to skip unnecessary compilation and test suites when only unrelated files change.
* **Affected-only monorepo runs**: In monorepos using Turborepo, Nx, or Cargo workspaces, build and test steps evaluate workspace change-graphs to run only affected targets.

### 5. Instant shared caches & Liquid Runners

Manual cache key creation (`hashFiles('**/package-lock.json')`) is error-prone, brittle, and slow to restore over the network.

Membl blueprints configure tool-native cache presets (`cache: [pnpm, next]`, `cache: [cargo, sccache]`, `cache: [uv]`, `cache: [go]`). On Membl runners, caches mount as read-only block overlays in place. Jobs execute on self-sizing Liquid Runners (`compute: { size: auto, intent: balanced }` in native pipelines or `membl-x64` / `membl-arm` in GitHub Actions), matching CPU and memory automatically to actual build pressure so you never overpay for static VM sizes.

### 6. Structured test reporting and parallel sharding

Large test suites running on single runners waste developer time:

* **Parallel sharding**: Membl splits large test suites across parallel shards (`shard: { count: 4, strategy: "index" }`) so heavy suites complete faster without manual matrix boilerplate.
* **JUnit test reports**: Test runners emit structured reports (`reports: { junit: ["test-results/**/*.xml"] }`), surfacing failed assertions, flaky specs, slowest tests, and execution trends directly in your project Tests view.

### 7. Zero vendor lock-in

Membl champions open, portable workflows:

* Generates hardened `.github/workflows/ci.yml` workflows targeting `membl-x64` (or `membl-arm`) by default.
* Offers a 1-click option to emit native `.membl/workflows/ci.yml` files conforming strictly to the public JSON schema.

If you ever decide to transition away from Membl, your workflows retain standard GitHub Actions compatibility without complex refactoring or proprietary vendor DSLs. Before migrating a busy repository, you can estimate monthly compute charges in the [pricing calculator](/calculator) or review [side-by-side runner comparisons](/vs).

