开源 · 本地 CLI

CI 挂了?
Stitch 来修。

在本地运行你的 CI,用 AI 修复失败。Stitch 解析你现有的 CI 配置,几秒钟就能在你的机器上跑完任务,并把失败交给 AI 智能体来修复。无需 API key,无需配置文件。

立即开始
01 —— how it works

A bird that weaves the loose threads of your pipeline.

Stitch runs your CI config — but on your machine, before you push. When it finds a failure, it hands the context to Claude and applies the patch. No broken PR opened.

Read .github/workflows/ci.yml
Run jobs locally (Docker)
Detect failures and collect context
Hand errors + stack to the agent
Apply the patch and re-test
Green. Ready to push.
~/acme-api · stitch-agent live
0
配置文件
2
AI 智能体
~10s
反馈时间
100%
你的 CI 覆盖率
02 —— principles

Local by design.
Transparent by principle.

We never ship your code anywhere you did not authorize yourself. The agent reads, runs, patches — all inside your machine.

三个阶段。完全本地。

从配置到CI变绿,Stitch在您的机器上运行整个循环,无需离开终端。

解析

运行 stitch run claude。Stitch 解析您的 .gitlab-ci.yml 或 GitHub Actions 工作流,对作业进行分类,并自动跳过基础设施作业。

执行

作业在本地运行,带有超时和隔离。结果显示在带有进度跟踪的实时 TUI 中。秒级,而非分钟级。

修复

失败的作业会交给您的 AI 代理(Claude Code 或 Codex)。代理调查、编辑文件,Stitch 重新运行以验证。升级到您之前最多尝试 3 次。

I

Your repo. Your machine.

No intermediate server. Stitch runs in your shell, reads your file tree, and writes patches on top. Shut it down and nothing lingers.

II

Zero new API keys.

Uses the Claude Code credentials you already have. We do not ask for tokens, we do not store anything.

III

Everything is reversible.

Every patch lands in an isolated commit. git reset takes you back exactly where you were.

IV

No magic.

Whatever you would see in your cloud CI, you see in your terminal. Same jobs, same containers, same result — without the wait cycle.

03 —— 功能特性

CI 流水线自愈所需的一切

Stitch 捕获代码审查中遗漏的问题——lint 错误、类型不匹配、测试失败——在你察觉之前就完成修复。

零配置

直接使用你现有的 .gitlab-ci.yml 或 GitHub Actions 配置。无需安装,无需重写,无需额外的 YAML。

本地优先

几秒钟就能在你的机器上跑完任务。无需等待远程 CI runner 或流水线排队。

可插拔 AI 智能体

可接入 Claude Code 或 OpenAI Codex。使用你已有的订阅,无需管理任何 API key。

交互式 TUI

精美的终端界面,在 Stitch 运行时实时显示进度、job 状态和 driver 活动。

监听模式

编码时持续验证。文件一旦变化,自动重跑相关 job。

智能 Job 过滤

自动识别并跳过 deploy、publish、基础设施类 job,只跑本地真正需要的部分。

自动 Commit & Push

修复通过后,Stitch 自动 commit 并 push,让你保持心流状态。

多平台支持

GitLab CI 与 GitHub Actions,含自托管实例。原样读取你现有的配置。

04 —— 真实输出。不是 mockup。

这就是 Stitch,跑在真实机器上。

本页其他内容讲的是 Stitch 做什么。下面的录像是 Stitch 做这些事情时的样子。从真实终端录制,未经剪辑。

实时运行

作业失败时,智能体接手

一条命令。Stitch 解析你的 CI 配置,在本地运行 verify 作业,把失败交给 Claude Code 或 Codex,然后对修复结果再次验证。所有过程都在一个终端窗口里流动。

  • Pipeline stepper 顶部带实时进度指示器的 parse、execute、fix 三个阶段。
  • Live job table 每个作业的状态、尝试次数、耗时,随运行实时更新。
  • Driver panel 你能看到智能体到底在做什么:读了哪些文件,跑了哪些命令,打了哪些补丁。
~/repo $ npx stitch-agent run claude
Animated terminal recording of stitch run claude showing the TUI with pipeline stepper, job table, and agent driver panel
~/repo $ stitch history
Terminal screenshot of stitch history command showing STITCH ASCII logo, agent info, and a table of recent runs with pass, fixed, and ongoing states
运行历史

每次运行都会保留。连续通过、修复、上报。

Stitch 会按仓库记录每一次运行。你一眼就能看出哪些作业自己过关,哪些需要智能体帮忙,哪些被上报出来。没有面板,也没有账户,只是一份放在你机器上的文件。

  • Streaks PASS 连续记录显示那些无需干预就持续通过的 verify 作业。
  • Fixes FIXED 条目记录智能体解决失败的时刻,带上尝试次数和 commit。
  • Escalations 智能体在尝试上限内无法解决的失败会摆在明面上,而不是藏起来。
05 —— Claude Code 原生

智能体替你校验代码,你无需开口。

Stitch 自带一个 Claude Code skill。一次安装,Claude 会在四个最容易让坏代码溜过去的时刻自动运行 Stitch。无需 flag,无需命令,无需 prompt。

用起来是什么感觉

1

在 Claude Code 里输入 "commit and push"。

2
Claude

几秒内在本地运行 Stitch,TUI 直接在窗口里流式输出。

3
结果

绿灯,push 直接过。红灯,Claude 先修好再 push。

四个自动触发点

每次 push 之前

让 Claude push、commit 或开 PR,Stitch 先跑。任何一步失败,commit 就留在你的机器上。

一项任务结束时

功能完成、bug 修好、重构落地。Claude 在宣布工作结束之前,把 Stitch 作为最后一步跑一遍。

标记 todo 完成之前

如果 TodoWrite 里某项涉及到 pipeline 会检查的代码,Claude 会在打勾之前先跑 Stitch。

切换上下文时

你转到另一个改动,Claude 会回头检查前一个,不让坏掉的东西落在后面。

skill 只需安装一次

一个 symlink。Claude Code 会自动识别,并在遇到 "帮我校验一下" 或 "修一下 pipeline" 这类自然语言时自动触发。你也可以用 /stitch 直接调用。

从本地克隆
$ ln -s "$(pwd)/skills/stitch" ~/.claude/skills/stitch
从全局 npm 安装
$ ln -s "$(npm root -g)/stitch-agent/skills/stitch" ~/.claude/skills/stitch
06 —— 对比

Stitch 与同类产品对比

大多数 CI 助手都要你采用他们的云、他们的 monorepo 或他们的 SDK。Stitch 读取你已经有的东西,运行在你已经有的机器上。

能力 Stitch Gitar Nx Cloud Dagger + AI
使用你现有的 CI 配置
在本地运行作业 仅云端 仅云端 容器
可替换的 AI 智能体 任意 CLI 智能体 仅内置 仅内置 仅内置
需要新基础设施 SaaS 账户 Nx monorepo Dagger SDK
原生 Claude Code 集成 随附一个 skill
价格 免费 每用户每月 $20 起 Nx Cloud 套餐 免费 (OSS)
07 —— 用法

一条命令,沿用你现有的配置。

Stitch 直接读取你现有的 CI 配置,在本地运行相同的 job。无需改动流水线,无需额外服务,也无需再维护新的 YAML。

terminal
# Run every CI job locally
$ stitch run claude

# Only the jobs you care about
$ stitch run claude --jobs lint,test

# See what would run, without running it
$ stitch run claude --dry-run

# Re-run automatically on every file change
$ stitch run claude --watch --jobs lint,test
.gitlab-ci.yml
# Your existing CI config. Stitch reads it,
# no jobs to add, no changes to make.

lint:
  image: node:20
  script:
    - bun install
    - bun run lint

test:
  image: node:20
  script:
    - bun install
    - bun test

typecheck:
  image: node:20
  script:
    - bun install
    - bun run typecheck
08 —— 安全保障

硬性护栏,不是软绳子

Stitch 在您的仓库内运行,对时间、范围以及可以离开您机器的内容都有严格限制。不会在您背后做任何事。

执行超时

每个作业都以可配置的超时运行。失控的命令会被 SIGKILL 终止,永不放任。

基础设施自动跳过

部署、发布和版本发布作业被分类为 infra 并自动跳过。只有验证作业在本地运行。

Git 干净检查

只有在 Stitch 启动前分支干净时,才会触发自动提交和推送。您未提交的工作不会被动。

有限尝试

失败的作业最多重试 max_attempts 次(默认 3 次)。之后,Stitch 升级到您,而不是浪费 tokens。

保持本地

作业、日志和修复都在您的机器上运行。除非您配置,否则没有云端、遥测或 webhook。

.stitch.yml
languages: [typescript, python]
linter: eslint
test_runner: vitest
package_manager: pnpm
max_attempts: 3

conventions:
  - "Always use explicit return types on public functions."
  - "Never downgrade dependency versions."

auto_fix: [lint, format, simple_types, config_ci]
escalate: [logic_errors, breaking_changes, dependency_conflicts]

notify:
  channels:
    - type: slack
      webhook_url: https://hooks.slack.com/...
09 —— installation · 12 seconds

One command.
Zero config files.

node ≥20
v20.0+
claude code
installed
docker
optional
telemetry
never
10 —— questions

Questions we hear,
answered in plain words.

What does Stitch actually do?

Stitch reads your existing CI config (GitHub Actions or GitLab CI), runs the verify jobs locally on your machine, and hands any failure to your AI agent (Claude Code or Codex) to fix. When the fix passes locally, Stitch commits and pushes. No remote runner needed for the verify loop.

How is Stitch different from Nx Cloud, Gitar, or Dagger?

Nx Cloud, Gitar, and Dagger ask you to adopt their cloud, monorepo, or SDK. Stitch reads the CI config you already have and runs on the machine you already own. There is no SaaS account, no DSL, and the AI agent is whatever CLI you already use.

Does Stitch require API keys?

No. Stitch uses the Claude Code or Codex credentials you already have on your machine. There is nothing extra to manage and nothing extra to bill.

What CI providers are supported?

GitHub Actions and GitLab CI today, including self-hosted GitLab. Stitch parses the existing config and only runs verify-class jobs locally; deploy and publish jobs are skipped automatically.

Is Stitch free?

Yes. Stitch is open source under the MIT license, distributed on npm as stitch-agent. The only cost is whatever you already pay for your AI agent (Claude Code or Codex).

Does Stitch send my code anywhere?

No. Stitch runs locally. Your code stays on your machine. Your AI agent talks to its own API directly using your existing credentials, exactly the way it does when you run it manually. Stitch has no telemetry and no webhooks unless you configure them.

Can I use Stitch without Claude Code?

Yes. The agent layer is pluggable. Codex CLI works today; any CLI agent that takes a task description and returns code patches can be wired in. Claude Code is the default because we built the integration first, not because it is locked in.