orca README

项目的 README,来自 github.com/VirtusLab/orca。合并为一个 markdown 文件:README.md。

Orca

Deterministic, AI-driven development flows.

Orca allows you to programmatically define software development workflows where AI agents perform the coding. If you want AI-generated code to always be reviewed by another agent, don't try to coerce the agents; just express that requirement in code. Don't waste tokens on formatting, committing, or creating PRs - all of this can be handled by an ordinary script.

Orca comes with an orca cli and a skill, which can be used interactively by humans, or headlessly by humans and agents alike. A number of built-in flows, implementing e.g. a plan-implement-review loop, allow you to start using Orca right away.

Orca flow scripts are written in Scala, and can be run with a single command through scala-cli, which is installed by the orca installer. No other dependencies are needed - everything is automatically bootstrapped. Scala 3 looks like Python, but with types - so you get quick feedback if your flow script has any problems.

Orca's development flows are resumable, so that if work is interrupted mid-flow for any reason, it can be continued from the last commit.

You can use Orca to orchestrate development in any language and ecosystem.

Orca assumes that it has configured, logged-in access to Claude, Codex, OpenCode, Pi or Gemini (depending which backend you use), as well as gh and git.

[!NOTE] Orca is designed to be run as part of a single-developer workflow. For a platform designed for teams, see Visdom: VirtusLab's AI-native SDLC platform.

Documentation

Is available here: orca.virtuslab.com

Install

The below installs scala-cli (via its official installer) if you don't have it already, and writes the orca executable to ~/.local/bin/orca:

curl -fsSL https://raw.githubusercontent.com/VirtusLab/orca/master/install.sh | bash

To let a coding agent delegate work to Orca, install the orca skill. In Claude Code:

/plugin marketplace add VirtusLab/orca
/plugin install orca@orca-skills

In Pi: pi install git:github.com/VirtusLab/orca. For OpenCode, Codex and per-project installs, see skills/orca/README.md.

Start using

Run orca in your repository. The first run asks which agent and model to use for planning, coding and review. Then pick a flow (implement.sc comes first) and enter your prompt.

The same can be run non-interactively:

orca run implement.sc "add a rate limiter to /login"

Orca creates a feature branch, plans the change into tasks, implements and reviews each one, reviews the whole change, and opens a PR when the repository is on GitHub. Each stage is committed as it finishes; if the run is interrupted, run the same command again and it will continue from the last commit.

A flow is a scala-cli script, so it also runs with no install:

scala-cli run --workspace "$(mktemp -d)" implement.sc -- "add a rate limiter to /login"

[!WARNING] Orca should be used in a sandboxed environment! Coding agent tool usage is auto-approved by default: write-capable turns let the agent edit files and run shell commands without prompting. Use a VPS or a local sandbox such as Sandcat or Docker Sandboxes, or narrow the agents' tools in the flow.

A flow

Flows are ordinary Scala scripts. For example, the below one plans, implements each task with a review, and opens a PR:

//> using scala 3.9.0
//> using dep "org.virtuslab::orca:0.2.1"
//> using jvm 21

import orca.{*, given}

flow(OrcaArgs(args)):
  val plan = stage("Plan"):
    Plan.autonomous.from(userPrompt, planningAgent).value

  for task <- plan.tasks do
    stage(s"Task: ${task.title}"):
      val session = codingAgent.session("implementer", seed = plan.brief)
      session.run(task.description)
      reviewThenFix(coderSession = session, reviewers = allReviewers(reviewAgent), task = task)

  val openFindings = stage("Final review"):
    val finalFixer = codingAgent.session("final-fixer", seed = plan.brief)
    reviewAndFixLoop(
      coderSession = finalFixer,
      reviewers = allReviewers(reviewAgent),
      task = Task(Title("The whole planned change"), plan.brief),
      diff = ReviewDiff.WholeRun
    )

  openPrIfGitHub(summarisingAgent = codingAgent, openFindings = openFindings)

Each stage commits on completion and is skipped on resume. The tutorial at orca.virtuslab.com explains every line; the shipped flows live in flows/.

Documentation

License

Apache 2.0 — see LICENSE.

Copyright (C) 2026 VirtusLab https://virtuslab.com.

orca (VirtusLab/orca)

正在搜索数据库…

这是什么?Orca 是一个命令行工具,用来把软件开发流程定义成代码,真正的编码工作由 AI 编程代理完成——你描述流程,代理负责具体的实现步骤。
它是一个拿来就能运行的工具,还是一个需要我写代码对接的框架?两者都是:'orca' 命令行工具自带内置流程(比如计划-实现-审查的循环),开箱即用;你也可以用 Scala 3 编写自己的流程脚本,通过 scala-cli 一条命令就能运行。
我该怎么安装它并启动第一个流程?一条命令搞定:安装器会自动安装缺失的 scala-cli,并把 orca 写到 ~/.local/bin/orca。然后运行 'orca' 选择一个流程(列表里第一个是 implement.sc),或者使用 'orca run'——也可以在 CI 或其他代理中以无界面方式运行。
我事先需要准备好什么?需要一个已配置并登录的编程代理后端——Claude、Codex、OpenCode、Pi 或 Gemini——再加上 gh 和 git。其余的一切(包括 scala-cli)都会自动安装,没有其他依赖。
直接在我自己的电脑上运行安全吗?默认情况下,代理的工具调用是自动批准的:代理会直接编辑文件、执行 shell 命令,不会逐一询问。Orca 是为沙箱环境设计的——比如 VPS、Sandcat 或 Docker 沙箱——不过可以通过流程选项修改自动批准行为。
我的项目不是用 Scala 写的,我自己也不会 Scala——有影响吗?没有影响——Orca 可以编排任何语言和生态系统的开发工作。只有当你想编写自定义流程脚本时才会用到 Scala,而且即便如此,Scala 3 '看起来像 Python,只是多了类型'。
一个流程对我的 git 仓库实际会做什么?它会创建一个功能分支(由便宜的模型自动命名,也可以用 --branch 自己指定),提交和推送由运行时完成——而不是由代理来做。成功时会通过 gh 创建一个 PR,然后把你带回原来的分支;失败时你会留在功能分支上,方便继续测试或手动创建 PR。
如果一次运行被中断了,我必须从头开始吗?不用——重新运行同一条命令,流程会从最后一次提交的改动处继续,只有少量工作会重复执行。已完成的阶段记录在一个进度文件里,随代码一起提交,也就是说提交(commit)就是原子性的单位。
我能指定由哪个代理或模型来规划、编码和审查吗?可以——这些角色从 settings.properties 中解析,该文件由首次运行向导或 'orca config' 生成。在脚本里你还可以固定指定的后端和档位:比如最难的步骤用 claude.opus,简单的单次调用用 claude.haiku、codex.mini、gemini.flash 这类便宜的模型。
既然代码是 AI 写的,为什么还把流程称为确定性的?因为 AI 周围的流程本身就是普通代码:分支、提交、创建 PR,以及'必须由另一个代理审查工作'这类要求,都直接写进脚本里,而不是靠反复调教模型硬挤出来。杂活交给普通脚本处理,这样就不会浪费 token 在格式化或提交上。
作者
VirtusLab
大小
7.5 MB
星标
199
时长
7个月
提交 · 90 天