import { ArrowRightIcon, CaretRightIcon, CheckIcon, CopyIcon, GithubIcon, } from "@refs/design-system/icons"; import { CodeGlobe, LinkButton, SwapIcon, ThemeMenu, Wordmark } from "@refs/design-system"; import { useEffect, useRef, useState } from "react"; import mergeLines from "../assets/merge-lines.webp"; import { AgentLanes, ApproveLoop, BranchLoop, ChallengeLoop, DecisionFold, MentionLoop, MergeNotify, PLATFORM_ART, PushRoute, artFrame, BuildAgentArt, KeysArt } from "./landing-scenes"; const AGENT = "@agent/7c1e"; const INSTALL_PARTS = ["curl -fsSL", "https://useref.dev/install | sh"] as const; const MCP = "https://useref.dev/mcp"; function Mention({ id = AGENT }: { id?: string }) { return {id}; } function Sha({ value }: { value: string }) { return {value}; } function Command({ parts, label, lines = false, prompt = true }: { parts: readonly string[]; label: string; lines?: boolean; prompt?: boolean }) { const [copied, setCopied] = useState(false); const timer = useRef>(undefined); useEffect(() => () => clearTimeout(timer.current), []); const shown = lines ? parts : [parts.join(" ")]; const copy = async () => { try { await navigator.clipboard.writeText(shown.join("\n")); setCopied(true); clearTimeout(timer.current); timer.current = setTimeout(() => setCopied(false), 2000); } catch { setCopied(false); } }; return (
{shown.map((line) => ( {prompt && $ } {line} ))} {copied ? `${label}: copied` : ""}
); } const SOURCE = "https://useref.dev/refs/source"; const GITHUB = "https://github.com/thisisamank/refs"; const DEPLOY = [`git clone ${SOURCE}.git`, "cd source && npm install", "npm run deploy"] as const; const STACK = ["Workflows", "Containers", "Cron Triggers", "Workers KV", "Email Service", "Rate Limiting", "Observability"] as const; const DOCS = [ { href: "/docs/quickstart", title: "Quickstart", line: "Create a repository and connect your first agent." }, { href: "/docs/pull-requests", title: "Review a pull request", line: "Read the reasoning, steer and branch." }, { href: "/docs/hosted-agents", title: "Use hosted agents", line: "Mention an agent, or run one in CI." }, { href: "/docs/decision-records", title: "Decision records", line: "What agents write, and how refs checks it." }, ] as const; const BUILT_IN = [ { handle: "@reviewer", line: "Lists real problems, the most severe first." }, { handle: "@security", line: "Finds missing checks, injection and leaked secrets." }, { handle: "@tests", line: "Finds changed behavior that no test covers." }, { handle: "@perf", line: "Finds queries in loops and unbounded work." }, { handle: "@explain", line: "Explains the change, or answers a question." }, { handle: "@docs", line: "Finds docs that the change makes wrong." }, ] as const; const CI_AGENT = ["jobs:", " review:", " agent: reviewer", " prompt: Check error handling."] as const; const PLATFORM = [ { art: "git", title: "Git hosting", line: "Public and private repositories, forks and imports.", href: "/docs/git" }, { art: "map", title: "Code map", line: "Zoom from folders to code, and see what calls a change.", href: "/docs/pull-requests#use-the-code-map" }, { art: "ci", title: "CI", line: "Pipelines run in containers on each push and pull request.", href: "/docs/ci" }, { art: "secrets", title: "Secrets and environments", line: "Sealed secrets. A deploy job waits for a person.", href: "/docs/ci#protect-deploys-with-environments" }, { art: "tasks", title: "Tasks", line: "A plain tracker with labels, assignees and comments.", href: "/docs/tasks" }, { art: "orgs", title: "Organizations", line: "Owner, admin and member roles. Invite by email.", href: "/docs/organizations" }, { art: "cli", title: "refs CLI", line: "Pull requests, tasks and CI runs from the terminal.", href: "/docs/cli" }, { art: "mcp", title: "MCP server", line: "Claude Code, Codex, OpenCode and any MCP client.", href: "/docs/connect-an-agent" }, ] as const; const CLIENTS = ["Claude Code", "Codex", "OpenCode", "Any MCP client"] as const; function Stage({ children, className = "" }: { children: React.ReactNode; className?: string }) { return
{children}
; } const TILES = [ { title: "See every agent at work.", line: "Each agent shows its person, its client and its branch.", scene: AgentLanes }, { title: "Steer any decision.", line: "The agent answers with a decision that replaces the old one.", scene: ChallengeLoop }, { title: "Branch from any step.", line: "Try a different path on a new branch, from any commit.", scene: BranchLoop }, { title: "Approve before it runs.", line: "A tool request comes to your browser. Allow or deny it.", scene: ApproveLoop }, ] as const; function Hero() { return (

Stop reading diffs.
Start reading decisions.

Your agents push thousands of lines. refs shows you the few choices that matter, so you can steer, branch or merge in minutes. Open source, and ready to deploy on your own Cloudflare account.

Try hosted refs Deploy your own
    {CLIENTS.map((client) => (
  • {client}
  • ))}
); } function Statement({ title, line }: { title: React.ReactNode; line?: string }) { return (

{title}

{line &&

{line}

}
); } export function SiteHeader({ wide = false, signedIn = false }: { wide?: boolean; signedIn?: boolean }) { return (
); } export function Landing() { return (
Agents do the work.
You make the decisions.} />
    {TILES.map(({ title, line, scene: Scene }) => (
  • {title}

    {line}
  • ))}
Built into every repository
    {BUILT_IN.map((agent) => (
  • {agent.handle} {agent.line}
  • ))}
  • Build your own agent.

    Give it a handle and instructions, for one repository or for every repository in your organization.
  • Bring your own keys.

    Agents run on Workers AI by default. Add an Anthropic, OpenAI or OpenRouter key to use your model. refs stores it encrypted.
  • Run one in CI.

    Add an agent job to your pipeline, and it reviews each pull request.
    {PLATFORM.map(({ art, title, line, href }) => { const Art = PLATFORM_ART[art]; return (
  • {title} {line}
  • ); })}

Yours to run.

Open source. Three commands put refs on your own Cloudflare account. Your code and its decisions stay with you.

View the source

Also on Cloudflare: {STACK.join(", ")}.

Read the docs.

All docs
); }