repome

Use cases

Five things repome does that account-bound, clone-first git hosting can't.

repome is git built for programs, not just people — anonymous, ephemeral, typed, and scoped. Each use case below leads with a scenario, then shows the smallest snippet that proves it.

Throwaway repos for agents

An agent that needs real git semantics for a 20-minute task — not a permanent home for the output. No signup, no cleanup, no orphaned repos: set a TTL and it's gone.

import { repome } from '@repome/sdk'

// No auth, no account. Repo evaporates in 6h.
const git = await repome.ephemeral({ ttl: '6h' })

await git.add('plan.md', '# Refactor plan\n...')
await git.commit('scratch: working state')

console.log(await git.log())
repome anon create --ttl 6h        # same thing from the CLI

The default TTL is 24 hours and the maximum is 72 hours. See Anonymous repos.

Commit from memory — no clone, no filesystem

A serverless function, Worker, or sandboxed agent runtime with no working tree. It produces files in memory and commits them atomically — no git clone, no temp dir, no git binary.

const git = await repome('codegen-out', {
  token: process.env.REPOME_API_KEY,
})

await git.add('src/client.ts', clientSrc)
await git.add('src/types.ts', typesSrc)
await git.remove('src/old-client.ts')

const commit = await git.commit('feat: regenerate client')
console.log(commit.url)

Every add/remove is staged in memory; commit writes them as a single atomic commit. See the Git SDK.

Hand a repo to another agent

A supervisor agent that spins up work and grants a sub-agent access to exactly one repo, for exactly as long as it needs. Tokens are scoped to a single repo and op, with policy TTL caps — an agent token lives 30 minutes, then dies.

# Mint a write token scoped to one repo, one session
repome tokens mint codegen-out --scope write --op agent
const { token } = await client.tokens.mint({
  name: 'codegen-out',
  scope: 'write',
  op: 'agent',
})

const git = await repome('codegen-out', { token }) // sub-agent uses it

For a full handoff bundle — clone URL, config snippet, and a paste-ready prompt — use repome share my-api --role write --expires 7d --json. See For agents.

Anyone pasting repo access into a chat, ticket, or another tool. The credential should never be the thing you paste. Invite links carry no secret — the token is minted fresh on reveal, capped by maxReveals, and revocable independently of the repo.

repome share my-api --role read --link
# → https://repome.sh/invites/<id>   (safe to paste in Slack)

A receiving agent can redeem it directly as markdown:

curl 'https://repome.sh/invites/<id>.md?reveal=1'

Anonymous repos work the same way with repome anon share <name> — zero auth on either side, and every share dies with the repo.

Inspect a repo without cloning it

A code-review agent, dashboard, or CI step that needs to read a repo, not check it out. History and diff computation come back as structured data.

repome git diff my-repo main feature/x --json     # structured diff
repome git compare my-repo main feature/x         # ahead/behind + mergeability
const { files, stats } = await client.git.diff({
  name: 'my-repo',
  base: 'main',
  head: 'feature/x',
  includePatch: true,
})
// stats → { additions, deletions, changedFiles }

For a single file, skip RPC entirely and pull raw bytes (up to 10 MiB):

curl -H "Authorization: Bearer rpme_..." \
  https://api.repome.sh/my-repo/raw/main/README.md

See the CLI reference and API reference.

On this page