The scm reef

Every command that lets Nereus reach a source host as an application, never as a person

O reef scm

Todos os comandos que deixam o Nereus alcançar um host de código como uma aplicação, nunca como uma pessoa

Opening · the kinds

A Connection names an organisation, a Mandate reaches it

  • Connection, the default kind: spec has org, mandate and default; status has installationId, repositorySelection and permissions
  • No vendor, no key, no token: the App is an authentication Mandate, the token its Token
  • One webhook per App: the scm reef receives it and checks its signature
Abertura · os kinds

Uma Connection nomeia uma organização, um Mandate a alcança

  • Connection, o kind padrão: o spec tem org, mandate e default; o status tem installationId, repositorySelection e permissions
  • Sem vendor, sem chave, sem token: o App é um Mandate do authentication, o token o seu Token
  • Um webhook por App: o reef scm o recebe e confere a sua assinatura
Setup

What comes before the first connection?

Preparação

O que vem antes da primeira conexão?

Setup · nereid applybuilt #1281

One github Nereid serves both reefs, opt-in

Preparação · nereid applypronto #1281

Um Nereid github serve os dois reefs, opcional

~/example
# Apply the github Nereid to both reefs$ nereus nereid apply github \    --reef authentication \    --reef scm✓ core/nereids/github created, Ready, pinned to sha256:1e74cbc6a968: see 'nereus authentication --help'  namespaces/nereus-system-github applied (the github Nereid's Role there, where vault default delivers the App keys) Next steps:   nereus mandate create github --reef authentication --nereid github --param appId=<id> --param privateKey=<secret> --param allow=<namespace>:<repository>:<permission>=<level> --default  nereus mandate create github-scm --reef scm --nereid github --param identity=github --default # Bind the scm reef to it, through the App github$ nereus mandate create github-scm \    --reef scm \    --nereid github \    --param identity=github \    --default✓ core/mandates/github-scm created (reef: scm, nereid: github, default)  clusterrole/controller-github configured (nereid github writes the status of mandate github-scm) Next steps:   nereus mandate list
Connection

Which organisation, through which App?

Conexão

Qual organização, por qual App?

Connection · connection createbuilt #1281

A Connection names an organisation, and nothing secret

Conexão · connection createpronto #1281

Uma Connection nomeia uma organização, e nada secreto

~/example
# The organisation, through the reef's default Mandate$ nereus scm connection create example \    --org example✓ scm/connections/example created (mandate github-scm) Next steps:   nereus scm connection get example # A second default is refused: one in the reef$ nereus scm connection create other \    --org example-other \    --default✗ scm/connections/example is the reef's default already: one in the reef. Nothing was changed.
Connection · connection listbuilt #1281

list says what each App reaches, and what is missing

Conexão · connection listpronto #1281

O list diz o que cada App alcança e o que falta

~/example
# Every Connection, with its status$ nereus scm connection listCONNECTION  ORG           MANDATE     STATUS              DEFAULTexample     example       github-scm  Ready               yeslabs        example-labs  github-scm  NotInstalled        nometa        example-meta  github-scm  MissingPermissions  nosome        example-some  github-scm  NotAllRepositories  no # One of them, with what to do$ nereus scm connection get metaName:          metaOrg:           example-metaMandate:       github-scmNereid:        githubDefault:       noStatus:        MissingPermissionsInstallation:  3Repositories:  allPermissions:   metadata=readMessage:       the App of mandate github lacks contents=read on example-meta: grant them in the App's settings, then accept them on the installation
Connection · connection deletebuilt #1281

delete removes the Connection, never the App

Conexão · connection deletepronto #1281

O delete remove a Connection, nunca o App

~/example
# Remove the Connection$ nereus scm connection delete labs✓ scm/connections/labs deleted Next steps:   nereus scm connection list
Mirror

Can the source live in the cluster?

Mirror

O código pode morar no cluster?

Mirror · nereid applybuilt #1255

The forgejo Nereid runs Forgejo in the cluster, in the profile

Mirror · nereid applypronto #1255

O Nereid forgejo roda o Forgejo no cluster, no profile

~/example
# Apply the forgejo Nereid to the scm reef; it needs the release and secrets reefs$ nereus nereid apply forgejo \    --reef scm✓ core/nereids/forgejo created, Ready: see 'nereus scm --help'  core/mandates/forgejo created (reef: scm, nereid: forgejo) Next steps:   nereus scm mirror create <name> --from https://github.com/<owner>/<repository>
Mirror · mirror createbuilt #1255

A Mirror copies a repository into the cluster

Mirror · mirror createpronto #1255

Um Mirror copia um repositório para o cluster

~/example
# Copy a public repository, pulled every 10 minutes$ nereus scm mirror create nereus \    --from https://github.com/getnereus/nereus \    --interval 10m✓ scm/mirrors/nereus created (mandate forgejo) Next steps:   nereus scm mirror get nereus
Mirror · mirror listbuilt #1255

list shows the commit each copy holds

Mirror · mirror listpronto #1255

O list mostra o commit que cada cópia tem

~/example
# Every Mirror, the commit it holds and its status$ nereus scm mirror listMIRROR   FROM                                       MANDATE  LAST SYNC             COMMIT   STATUSnereus   https://github.com/getnereus/nereus        forgejo  2026-11-10T12:00:00Z  68d7a0d  Readyoutside  https://example.com/example/outside        forgejo  -                     -        SourceUnreachable # One of them, and where the cluster clones it from$ nereus scm mirror get nereusName:         nereusFrom:         https://github.com/getnereus/nereusInterval:     10mMandate:      forgejoNereid:       forgejoStatus:       ReadyRepository:   getnereus/nereusClone:        http://forgejo-http.nereus-system-forgejo.svc:3000/getnereus/nereus.gitBranch:       mainCommit:       68d7a0d6f1c2b3a4d5e6f708192a3b4c5d6e7f80Last sync:    2026-11-10T12:00:00ZMessage:      getnereus/nereus holds 68d7a0d6f1c2 of main, pulled every 10m.
References · references

Where the ideas came from

Referências · referências

De onde vieram as ideias